mirror of
https://github.com/google-gemini/gemini-cli.git
synced 2026-04-20 18:14:29 -07:00
fix: ACP: separate conversational text from execute tool command title (#23179)
This commit is contained in:
@@ -668,6 +668,39 @@ describe('ShellTool', () => {
|
||||
});
|
||||
});
|
||||
|
||||
describe('getDisplayTitle and getExplanation', () => {
|
||||
it('should return only the command for getDisplayTitle', () => {
|
||||
const invocation = shellTool.build({
|
||||
command: 'echo hello',
|
||||
description: 'prints hello',
|
||||
dir_path: 'foo/bar',
|
||||
is_background: true,
|
||||
});
|
||||
expect(invocation.getDisplayTitle?.()).toBe('echo hello');
|
||||
});
|
||||
|
||||
it('should return the context for getExplanation', () => {
|
||||
const invocation = shellTool.build({
|
||||
command: 'echo hello',
|
||||
description: 'prints hello',
|
||||
dir_path: 'foo/bar',
|
||||
is_background: true,
|
||||
});
|
||||
expect(invocation.getExplanation?.()).toBe(
|
||||
'[in foo/bar] (prints hello) [background]',
|
||||
);
|
||||
});
|
||||
|
||||
it('should construct explanation without optional parameters', () => {
|
||||
const invocation = shellTool.build({
|
||||
command: 'echo hello',
|
||||
});
|
||||
expect(invocation.getExplanation?.()).toBe(
|
||||
`[current working directory ${process.cwd()}]`,
|
||||
);
|
||||
});
|
||||
});
|
||||
|
||||
describe('llmContent output format', () => {
|
||||
const mockAbortSignal = new AbortController().signal;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user