Skip to content

Commit 271305b

Browse files
authored
Fix task progress message (microsoft#261280)
fix microsoft#261274
1 parent c162220 commit 271305b

File tree

1 file changed

+4
-4
lines changed
  • src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/task

1 file changed

+4
-4
lines changed

src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/task/runTaskTool.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -88,20 +88,20 @@ export class RunTaskTool implements IToolImpl {
8888
}
8989
let output = '';
9090
if (result?.exitCode) {
91-
output = `Task \`${taskLabel}\` failed with exit code ${result.exitCode}.`;
91+
output = localize('taskFailed', 'Task `{0}` failed with exit code {1}.', taskLabel, result.exitCode);
9292
} else {
9393
if (outputAndIdle.terminalExecutionIdleBeforeTimeout) {
94-
output += `Task \`${taskLabel}\` finished`;
94+
output = localize('taskFinished', 'Task `{0}` finished', taskLabel);
9595
} else {
96-
output += `Task \`${taskLabel}\` started and will continue to run in the background.`;
96+
output = localize('taskStartedBackground', 'Task `{0}` started and will continue to run in the background.', taskLabel);
9797
}
9898
}
9999
this._telemetryService.publicLog2?.<RunTaskToolEvent, RunTaskToolClassification>('copilotChat.runTaskTool.run', {
100100
taskId: args.id,
101101
bufferLength: outputAndIdle.output.length,
102102
pollDurationMs: outputAndIdle?.pollDurationMs ?? 0,
103103
});
104-
return { content: [{ kind: 'text', value: `The output was ${outputAndIdle.output}` }], toolResultMessage: output };
104+
return { content: [{ kind: 'text', value: `The output was ${outputAndIdle.output}` }], toolResultMessage: new MarkdownString(output) };
105105
}
106106

107107
private async _isTaskActive(task: Task): Promise<boolean> {

0 commit comments

Comments
 (0)