豆豆友情提示:这是一个非官方 GitHub 代理镜像,主要用于网络测试或访问加速。请勿在此进行登录、注册或处理任何敏感信息。进行这些操作请务必访问官方网站 github.com。 Raw 内容也通过此代理提供。
Skip to content

Commit 7c451d5

Browse files
authored
Fix tool invocation to remove unnecessary type casting for toolCallId (#4303)
1 parent 9095a69 commit 7c451d5

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/extension/chatSessions/copilotcli/common/copilotCLITools.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -788,7 +788,7 @@ export function createCopilotCLIToolInvocation(data: {
788788
if (!Object.hasOwn(ToolFriendlyNameAndHandlers, data.toolName)) {
789789
const mcpServer = l10n.t('MCP Server');
790790
const toolName = data.mcpServerName && data.mcpToolName ? `${data.mcpServerName}, ${data.mcpToolName} (${mcpServer})` : data.toolName;
791-
const invocation = new ChatToolInvocationPart(toolName ?? 'unknown', data.toolCallId ?? '', false as unknown as string);
791+
const invocation = new ChatToolInvocationPart(toolName ?? 'unknown', data.toolCallId ?? '');
792792
invocation.isConfirmed = false;
793793
invocation.isComplete = false;
794794
invocation.invocationMessage = l10n.t("Using tool: {0}", toolName ?? 'unknown');
@@ -817,7 +817,7 @@ export function createCopilotCLIToolInvocation(data: {
817817
}
818818

819819
const [friendlyToolName, formatter] = ToolFriendlyNameAndHandlers[toolCall.toolName];
820-
const invocation = new ChatToolInvocationPart(friendlyToolName ?? toolCall.toolName ?? 'unknown', toolCall.toolCallId ?? '', false as unknown as string);
820+
const invocation = new ChatToolInvocationPart(friendlyToolName ?? toolCall.toolName ?? 'unknown', toolCall.toolCallId ?? '');
821821
invocation.isConfirmed = false;
822822
invocation.isComplete = false;
823823

0 commit comments

Comments
 (0)