refactor(cli): migrate core tools to native ToolDisplay property and fix UI rendering (#25186)

This commit is contained in:
Michael Bleigh
2026-05-06 14:23:26 -07:00
committed by GitHub
parent 4a10751b49
commit 90304b279c
33 changed files with 1033 additions and 57 deletions
+16
View File
@@ -942,8 +942,24 @@ export class ShellToolInvocation extends BaseToolInvocation<
};
}
const displayResultSummary = result.backgrounded
? `PID: ${result.pid}`
: result.exitCode !== null && result.exitCode !== 0
? `Exit Code: ${result.exitCode}`
: undefined;
return {
llmContent,
display: {
name: 'Shell',
description: this.getDescription(),
resultSummary: displayResultSummary,
result:
typeof returnDisplay === 'string'
? { type: 'text', text: returnDisplay }
: // TODO: Add support for terminal display type (AnsiOutput)
undefined,
},
returnDisplay,
data,
...executionError,