mirror of
https://github.com/QwenLM/qwen-code.git
synced 2025-12-21 01:07:46 +00:00
feat: create draft framework for cli & sdk
This commit is contained in:
@@ -10,6 +10,7 @@ import type {
|
||||
ToolInvocation,
|
||||
ToolMcpConfirmationDetails,
|
||||
ToolResult,
|
||||
ToolConfirmationPayload,
|
||||
} from './tools.js';
|
||||
import {
|
||||
BaseDeclarativeTool,
|
||||
@@ -98,7 +99,10 @@ class DiscoveredMCPToolInvocation extends BaseToolInvocation<
|
||||
serverName: this.serverName,
|
||||
toolName: this.serverToolName, // Display original tool name in confirmation
|
||||
toolDisplayName: this.displayName, // Display global registry name exposed to model and user
|
||||
onConfirm: async (outcome: ToolConfirmationOutcome) => {
|
||||
onConfirm: async (
|
||||
outcome: ToolConfirmationOutcome,
|
||||
_payload?: ToolConfirmationPayload,
|
||||
) => {
|
||||
if (outcome === ToolConfirmationOutcome.ProceedAlwaysServer) {
|
||||
DiscoveredMCPToolInvocation.allowlist.add(serverAllowListKey);
|
||||
} else if (outcome === ToolConfirmationOutcome.ProceedAlwaysTool) {
|
||||
|
||||
Reference in New Issue
Block a user