Skip to content

Commit e2be7a6

Browse files
authored
fix cli thinking streaming (#1802)
1 parent 1dd7355 commit e2be7a6

File tree

3 files changed

+13
-0
lines changed

3 files changed

+13
-0
lines changed

src/extension/agents/copilotcli/node/copilotcliSession.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -200,6 +200,7 @@ export class CopilotCLISession extends DisposableStore implements ICopilotCLISes
200200
}
201201
if (responsePart instanceof ChatResponseThinkingProgressPart) {
202202
stream.push(responsePart);
203+
stream.push(new ChatResponseThinkingProgressPart('', '', { vscodeReasoningDone: true }));
203204
}
204205
this.logService.trace(`Start Tool ${event.data.toolName || '<unknown>'}`);
205206
break;

src/extension/chatSessions/vscode-node/copilotCloudSessionContentBuilder.ts

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -245,6 +245,9 @@ export class ChatSessionContentBuilder {
245245
const toolPart = this.createToolInvocationPart(pullRequest, toolCall, args.name || delta.content);
246246
if (toolPart) {
247247
responseParts.push(toolPart);
248+
if (toolPart instanceof ChatResponseThinkingProgressPart) {
249+
responseParts.push(new ChatResponseThinkingProgressPart('', '', { vscodeReasoningDone: true }));
250+
}
248251
}
249252
}
250253
// Skip if content is empty (running state)
@@ -267,6 +270,9 @@ export class ChatSessionContentBuilder {
267270
const toolPart = this.createToolInvocationPart(pullRequest, toolCall, delta.content || '');
268271
if (toolPart) {
269272
responseParts.push(toolPart);
273+
if (toolPart instanceof ChatResponseThinkingProgressPart) {
274+
responseParts.push(new ChatResponseThinkingProgressPart('', '', { vscodeReasoningDone: true }));
275+
}
270276
}
271277
}
272278

src/extension/chatSessions/vscode-node/copilotCloudSessionsProvider.ts

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -841,6 +841,9 @@ export class CopilotCloudSessionsProvider extends Disposable implements vscode.C
841841
if (toolPart) {
842842
stream.push(toolPart);
843843
hasStreamedContent = true;
844+
if (toolPart instanceof vscode.ChatResponseThinkingProgressPart) {
845+
stream.push(new vscode.ChatResponseThinkingProgressPart('', '', { vscodeReasoningDone: true }));
846+
}
844847
}
845848
} else {
846849
// Running setup step - just track progress
@@ -861,6 +864,9 @@ export class CopilotCloudSessionsProvider extends Disposable implements vscode.C
861864
if (toolPart) {
862865
stream.push(toolPart);
863866
hasStreamedContent = true;
867+
if (toolPart instanceof vscode.ChatResponseThinkingProgressPart) {
868+
stream.push(new vscode.ChatResponseThinkingProgressPart('', '', { vscodeReasoningDone: true }));
869+
}
864870
}
865871
}
866872
}

0 commit comments

Comments
 (0)