Skip to content

Commit 22fbd16

Browse files
committed
formatting the stderr
1 parent 44a7dbc commit 22fbd16

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

packages/core/src/codewhispererChat/tools/executeBash.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -75,6 +75,7 @@ export class ExecuteBash {
7575
const stderrBuffer: string[] = []
7676

7777
let firstChunk = true
78+
let firstStderrChunk = true
7879
const childProcessOptions: ChildProcessOptions = {
7980
spawnOptions: {
8081
cwd: this.workingDirectory,
@@ -87,7 +88,8 @@ export class ExecuteBash {
8788
firstChunk = false
8889
},
8990
onStderr: (chunk: string) => {
90-
ExecuteBash.handleChunk(chunk, stderrBuffer, updates)
91+
ExecuteBash.handleChunk(firstStderrChunk ? '```console\n' + chunk : chunk, stderrBuffer, updates)
92+
firstStderrChunk = false
9193
},
9294
}
9395

0 commit comments

Comments
 (0)