summaryrefslogtreecommitdiff
path: root/packages/core/src/tools/shell.ts
diff options
context:
space:
mode:
authorN. Taylor Mullen <[email protected]>2025-07-12 21:09:12 -0700
committerGitHub <[email protected]>2025-07-13 04:09:12 +0000
commit44ef0408f3b09d9b161c64cf12bbf5ad13052598 (patch)
tree6d290529f52078756a3563a3a0528be65cb280d5 /packages/core/src/tools/shell.ts
parent09a3b7d5e18b345a5e89c766250014d80a1c5a08 (diff)
feat(tools): Centralize shell tool summarization (#4009)
Diffstat (limited to 'packages/core/src/tools/shell.ts')
-rw-r--r--packages/core/src/tools/shell.ts16
1 files changed, 12 insertions, 4 deletions
diff --git a/packages/core/src/tools/shell.ts b/packages/core/src/tools/shell.ts
index e9f59f10..7e79c717 100644
--- a/packages/core/src/tools/shell.ts
+++ b/packages/core/src/tools/shell.ts
@@ -27,7 +27,7 @@ export interface ShellToolParams {
directory?: string;
}
import { spawn } from 'child_process';
-import { llmSummarizer } from '../utils/summarizer.js';
+import { summarizeToolOutput } from '../utils/summarizer.js';
const OUTPUT_UPDATE_INTERVAL_MS = 1000;
@@ -74,8 +74,6 @@ Process Group PGID: Process group started or \`(none)\``,
},
false, // output is not markdown
true, // output can be updated
- llmSummarizer,
- true, // should summarize display output
);
}
@@ -490,6 +488,16 @@ Process Group PGID: Process group started or \`(none)\``,
// returnDisplayMessage will remain empty, which is fine.
}
}
- return { llmContent, returnDisplay: returnDisplayMessage };
+
+ const summary = await summarizeToolOutput(
+ llmContent,
+ this.config.getGeminiClient(),
+ abortSignal,
+ );
+
+ return {
+ llmContent: summary,
+ returnDisplay: returnDisplayMessage,
+ };
}
}