From 63be45bc13db755fdc5370a8339afd92bbfa0933 Mon Sep 17 00:00:00 2001 From: Logan Ramos Date: Thu, 15 Jan 2026 14:39:38 -0500 Subject: [PATCH] Fix create file not properly rendering (#288150) * Fix create file not properly rendering * Update src/vs/workbench/contrib/chat/common/model/chatProgressTypes/chatToolInvocation.ts Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> --------- Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> --- .../common/model/chatProgressTypes/chatToolInvocation.ts | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/vs/workbench/contrib/chat/common/model/chatProgressTypes/chatToolInvocation.ts b/src/vs/workbench/contrib/chat/common/model/chatProgressTypes/chatToolInvocation.ts index 6a24a622c8cc..8b7545f1bebf 100644 --- a/src/vs/workbench/contrib/chat/common/model/chatProgressTypes/chatToolInvocation.ts +++ b/src/vs/workbench/contrib/chat/common/model/chatProgressTypes/chatToolInvocation.ts @@ -6,6 +6,7 @@ import { encodeBase64 } from '../../../../../../base/common/buffer.js'; import { IMarkdownString } from '../../../../../../base/common/htmlContent.js'; import { IObservable, ISettableObservable, observableValue } from '../../../../../../base/common/observable.js'; +import { localize } from '../../../../../../nls.js'; import { ConfirmedReason, IChatExtensionsContent, IChatSubagentToolInvocationData, IChatTodoListContent, IChatToolInputInvocationData, IChatToolInvocation, IChatToolInvocationSerialized, ToolConfirmKind, type IChatTerminalToolInvocationData } from '../../chatService/chatService.js'; import { IPreparedToolInvocation, isToolResultOutputDetails, IToolConfirmationMessages, IToolData, IToolProgressStep, IToolResult, ToolDataSource } from '../../tools/languageModelToolsService.js'; @@ -62,7 +63,9 @@ export class ChatToolInvocation implements IChatToolInvocation { isStreaming: boolean = false, chatRequestId?: string ) { - this.invocationMessage = preparedInvocation?.invocationMessage ?? ''; + // For streaming invocations, use a default message until handleToolStream provides one + const defaultStreamingMessage = isStreaming ? localize('toolInvocationMessage', "Using \"{0}\"", toolData.displayName) : ''; + this.invocationMessage = preparedInvocation?.invocationMessage ?? defaultStreamingMessage; this.pastTenseMessage = preparedInvocation?.pastTenseMessage; this.originMessage = preparedInvocation?.originMessage; this.confirmationMessages = preparedInvocation?.confirmationMessages;