Skip to content

Commit ce135b9

Browse files
authored
Fix task completion messages to include task name and exit code (microsoft#259052)
1 parent 8aa5d2f commit ce135b9

File tree

2 files changed

+6
-6
lines changed

2 files changed

+6
-6
lines changed

src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/task/createAndRunTaskTool.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -131,12 +131,12 @@ export class CreateAndRunTaskTool implements IToolImpl {
131131
}
132132
let output = '';
133133
if (result?.exitCode) {
134-
output = `Task failed with exit code.`;
134+
output = `Task '${args.task.label}' failed with exit code ${result.exitCode}.`;
135135
} else {
136136
if (outputAndIdle.terminalExecutionIdleBeforeTimeout) {
137-
output += `Task finished`;
137+
output += `Task '${args.task.label}' finished`;
138138
} else {
139-
output += `Task started and will continue to run in the background.`;
139+
output += `Task '${args.task.label}' started and will continue to run in the background.`;
140140
}
141141
}
142142
this._telemetryService.publicLog2?.<CreateAndRunTaskToolEvent, CreateAndRunTaskToolClassification>('copilotChat.runTaskTool.createAndRunTask', {

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

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -88,12 +88,12 @@ export class RunTaskTool implements IToolImpl {
8888
}
8989
let output = '';
9090
if (result?.exitCode) {
91-
output = `Task failed with exit code.`;
91+
output = `Task '${taskLabel}' failed with exit code ${result.exitCode}.`;
9292
} else {
9393
if (outputAndIdle.terminalExecutionIdleBeforeTimeout) {
94-
output += `Task finished`;
94+
output += `Task '${taskLabel}' finished`;
9595
} else {
96-
output += `Task started and will continue to run in the background.`;
96+
output += `Task '${taskLabel}' started and will continue to run in the background.`;
9797
}
9898
}
9999
this._telemetryService.publicLog2?.<RunTaskToolEvent, RunTaskToolClassification>('copilotChat.runTaskTool.run', {

0 commit comments

Comments
 (0)