mirror of
https://github.com/google-gemini/gemini-cli.git
synced 2026-05-14 13:53:02 -07:00
refactor(cli): migrate core tools to native ToolDisplay property and fix UI rendering (#25186)
This commit is contained in:
@@ -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,
|
||||
|
||||
Reference in New Issue
Block a user