From 01787a3d5bc089527eaef6c7a648ee54aec35a96 Mon Sep 17 00:00:00 2001 From: decolua Date: Mon, 30 Mar 2026 17:27:15 +0700 Subject: [PATCH] Fix bug --- open-sse/executors/antigravity.js | 44 +++++++++---------- .../translator/response/gemini-to-openai.js | 4 +- package.json | 2 +- 3 files changed, 26 insertions(+), 24 deletions(-) diff --git a/open-sse/executors/antigravity.js b/open-sse/executors/antigravity.js index e5a2d9c9..2a38b70e 100644 --- a/open-sse/executors/antigravity.js +++ b/open-sse/executors/antigravity.js @@ -340,111 +340,111 @@ export class AntigravityExecutor extends BaseExecutor { } } -// AG decoy tools — same names as AG native defaults, neutral description & minimal properties +// AG decoy tools — same names as AG native defaults, redirect to ide_ prefixed tools const AG_DECOY_TOOLS = [ { name: "browser_subagent", - description: "This tool is not available in the current context.", + description: "Use ide_ prefixed tools instead", parameters: { type: "OBJECT", properties: {}, required: [] } }, { name: "command_status", - description: "This tool is not available in the current context.", + description: "Use ide_ prefixed tools instead", parameters: { type: "OBJECT", properties: {}, required: [] } }, { name: "find_by_name", - description: "This tool is not available in the current context.", + description: "Use ide_ prefixed tools instead", parameters: { type: "OBJECT", properties: {}, required: [] } }, { name: "generate_image", - description: "This tool is not available in the current context.", + description: "Use ide_ prefixed tools instead", parameters: { type: "OBJECT", properties: {}, required: [] } }, { name: "grep_search", - description: "This tool is not available in the current context.", + description: "Use ide_ prefixed tools instead", parameters: { type: "OBJECT", properties: {}, required: [] } }, { name: "list_dir", - description: "This tool is not available in the current context.", + description: "Use ide_ prefixed tools instead", parameters: { type: "OBJECT", properties: {}, required: [] } }, { name: "list_resources", - description: "This tool is not available in the current context.", + description: "Use ide_ prefixed tools instead", parameters: { type: "OBJECT", properties: {}, required: [] } }, { name: "mcp_sequential-thinking_sequentialthinking", - description: "This tool is not available in the current context.", + description: "Use ide_ prefixed tools instead", parameters: { type: "OBJECT", properties: {}, required: [] } }, { name: "multi_replace_file_content", - description: "This tool is not available in the current context.", + description: "Use ide_ prefixed tools instead", parameters: { type: "OBJECT", properties: {}, required: [] } }, { name: "notify_user", - description: "This tool is not available in the current context.", + description: "Use ide_ prefixed tools instead", parameters: { type: "OBJECT", properties: {}, required: [] } }, { name: "read_resource", - description: "This tool is not available in the current context.", + description: "Use ide_ prefixed tools instead", parameters: { type: "OBJECT", properties: {}, required: [] } }, { name: "read_terminal", - description: "This tool is not available in the current context.", + description: "Use ide_ prefixed tools instead", parameters: { type: "OBJECT", properties: {}, required: [] } }, { name: "read_url_content", - description: "This tool is not available in the current context.", + description: "Use ide_ prefixed tools instead", parameters: { type: "OBJECT", properties: {}, required: [] } }, { name: "replace_file_content", - description: "This tool is not available in the current context.", + description: "Use ide_ prefixed tools instead", parameters: { type: "OBJECT", properties: {}, required: [] } }, { name: "run_command", - description: "This tool is not available in the current context.", + description: "Use ide_ prefixed tools instead", parameters: { type: "OBJECT", properties: {}, required: [] } }, { name: "search_web", - description: "This tool is not available in the current context.", + description: "Use ide_ prefixed tools instead", parameters: { type: "OBJECT", properties: {}, required: [] } }, { name: "send_command_input", - description: "This tool is not available in the current context.", + description: "Use ide_ prefixed tools instead", parameters: { type: "OBJECT", properties: {}, required: [] } }, { name: "task_boundary", - description: "This tool is not available in the current context.", + description: "Use ide_ prefixed tools instead", parameters: { type: "OBJECT", properties: {}, required: [] } }, { name: "view_content_chunk", - description: "This tool is not available in the current context.", + description: "Use ide_ prefixed tools instead", parameters: { type: "OBJECT", properties: {}, required: [] } }, { name: "view_file", - description: "This tool is not available in the current context.", + description: "Use ide_ prefixed tools instead", parameters: { type: "OBJECT", properties: {}, required: [] } }, { name: "write_to_file", - description: "This tool is not available in the current context.", + description: "Use ide_ prefixed tools instead", parameters: { type: "OBJECT", properties: {}, required: [] } } ]; diff --git a/open-sse/translator/response/gemini-to-openai.js b/open-sse/translator/response/gemini-to-openai.js index d54213e2..96c66ef9 100644 --- a/open-sse/translator/response/gemini-to-openai.js +++ b/open-sse/translator/response/gemini-to-openai.js @@ -70,7 +70,9 @@ export function geminiToOpenAIResponse(chunk, state) { // Emit function call, attaching the best available thoughtSignature if (hasFunctionCall) { - const fcName = part.functionCall.name; + const rawName = part.functionCall.name; + // Restore original tool name from mapping (AG cloaking) + const fcName = state.toolNameMap?.get(rawName) || rawName; const fcArgs = part.functionCall.args || {}; const toolCallIndex = state.functionIndex++; // Use signature from this part, or the one carried from a preceding part diff --git a/package.json b/package.json index 79554921..c21df767 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "9router-app", - "version": "0.3.64", + "version": "0.3.66", "description": "9Router web dashboard", "private": true, "scripts": {