mirror of
https://github.com/google-gemini/gemini-cli.git
synced 2026-07-15 20:40:35 -07:00
feat(acp): Implemented the structured terminal lifecycle for ACP.
- Modified `packages/core/src/tools/shell.ts` to always include `exitCode` and `signal` in `ToolResult.data`. - Modified `packages/cli/src/acp/acpClient.ts` to send `_meta.terminal_info` on start, `_meta.terminal_output` during streaming (deltas), and `_meta.terminal_exit` on completion. - Added verification tests in `packages/cli/src/acp/acpClient.test.ts`
This commit is contained in:
@@ -452,12 +452,15 @@ export class ShellToolInvocation extends BaseToolInvocation<
|
||||
|
||||
if (result.exitCode !== null && result.exitCode !== 0) {
|
||||
llmContentParts.push(`Exit Code: ${result.exitCode}`);
|
||||
data = {
|
||||
exitCode: result.exitCode,
|
||||
isError: true,
|
||||
};
|
||||
}
|
||||
|
||||
data = {
|
||||
exitCode: result.exitCode,
|
||||
signal: result.signal,
|
||||
isError: result.exitCode !== 0 || !!result.error || !!result.signal,
|
||||
pid: result.pid,
|
||||
};
|
||||
|
||||
if (result.signal) {
|
||||
llmContentParts.push(`Signal: ${result.signal}`);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user