From 25f923e89ed5411b0dfb997ab9df99bbc57a666d Mon Sep 17 00:00:00 2001 From: LaZzyMan Date: Wed, 25 Feb 2026 17:19:27 +0800 Subject: [PATCH] fix: add tool annotations --- package-lock.json | 11 ++++++++++- packages/core/src/tools/mcp-tool.ts | 2 +- 2 files changed, 11 insertions(+), 2 deletions(-) diff --git a/package-lock.json b/package-lock.json index 5a2359a5d..b92f5ba01 100644 --- a/package-lock.json +++ b/package-lock.json @@ -3839,6 +3839,7 @@ "resolved": "https://registry.npmjs.org/@teddyzhu/clipboard/-/clipboard-0.0.5.tgz", "integrity": "sha512-XA6MG7nLPZzj51agCwDYaVnVVrt0ByJ3G9rl3ar6N4GETAjUKKup6u76SLp2C5yHRWYV9hwMYDn04OGLar0MVg==", "license": "MIT", + "optional": true, "engines": { "node": ">= 10.16.0 < 11 || >= 11.8.0 < 12 || >= 12.0.0" }, @@ -18774,7 +18775,6 @@ "@iarna/toml": "^2.2.5", "@modelcontextprotocol/sdk": "^1.25.1", "@qwen-code/qwen-code-core": "file:../core", - "@teddyzhu/clipboard": "^0.0.5", "@types/update-notifier": "^6.0.8", "ansi-regex": "^6.2.2", "command-exists": "^1.2.9", @@ -18834,6 +18834,15 @@ }, "engines": { "node": ">=20" + }, + "optionalDependencies": { + "@teddyzhu/clipboard": "^0.0.5", + "@teddyzhu/clipboard-darwin-arm64": "0.0.5", + "@teddyzhu/clipboard-darwin-x64": "0.0.5", + "@teddyzhu/clipboard-linux-arm64-gnu": "0.0.5", + "@teddyzhu/clipboard-linux-x64-gnu": "0.0.5", + "@teddyzhu/clipboard-win32-arm64-msvc": "0.0.5", + "@teddyzhu/clipboard-win32-x64-msvc": "0.0.5" } }, "packages/cli/node_modules/@google/genai": { diff --git a/packages/core/src/tools/mcp-tool.ts b/packages/core/src/tools/mcp-tool.ts index 4ba6c6893..5d48b68c7 100644 --- a/packages/core/src/tools/mcp-tool.ts +++ b/packages/core/src/tools/mcp-tool.ts @@ -360,7 +360,7 @@ export class DiscoveredMCPTool extends BaseDeclarativeTool< private readonly cliConfig?: Config, private readonly mcpClient?: McpDirectClient, private readonly mcpTimeout?: number, - private readonly annotations?: McpToolAnnotations, + readonly annotations?: McpToolAnnotations, ) { super( nameOverride ??