mirror of
https://github.com/claude-code-best/claude-code.git
synced 2026-06-17 22:05:50 +00:00
feat: Remote Control 条件工具注入 — PushNotification/SendUserFile/Brief 仅 bridge 启用时可用
- PushNotificationTool、SendUserFileTool 添加 isEnabled() 使用 isBridgeEnabled() - BriefTool 的 isEnabled() 从 isBriefEnabled() 改为 isBridgeEnabled() - ExecuteTool 添加 isEnabled() 兜底检查,不可用时返回友好错误 - useReplBridge bridge 首次连接时插入 system 消息通知模型新工具可用 - 移除 toolSearch 中 firstParty base URL 白名单检测,默认启用 tool search Co-Authored-By: glm-5.1[1m] <zai-org@claude-code-best.win>
This commit is contained in:
@@ -302,6 +302,7 @@ export function useReplBridge(
|
||||
});
|
||||
break;
|
||||
case 'connected': {
|
||||
const wasSessionActive = store.getState().replBridgeSessionActive;
|
||||
setAppState(prev => {
|
||||
if (prev.replBridgeSessionActive) return prev;
|
||||
return {
|
||||
@@ -312,6 +313,16 @@ export function useReplBridge(
|
||||
replBridgeError: undefined,
|
||||
};
|
||||
});
|
||||
// Notify model about newly available bridge-dependent tools
|
||||
if (!wasSessionActive) {
|
||||
setMessages(prev => [
|
||||
...prev,
|
||||
createSystemMessage(
|
||||
'Remote Control 已连接。现在可以使用 PushNotification、SendUserFile、Brief 工具,请使用 ToolSearch 搜索发现。',
|
||||
'info',
|
||||
),
|
||||
]);
|
||||
}
|
||||
// Send system/init so remote clients (web/iOS/Android) get
|
||||
// session metadata. REPL uses query() directly — never hits
|
||||
// QueryEngine's SDKMessage layer — so this is the only path
|
||||
|
||||
Reference in New Issue
Block a user