mirror of
https://github.com/google-gemini/gemini-cli.git
synced 2026-07-22 15:51:18 -07:00
fix(cli): restore file path display in edit and write tool confirmations (#24974)
This commit is contained in:
@@ -34,6 +34,28 @@ describe('DenseToolMessage', () => {
|
||||
terminalWidth: 80,
|
||||
};
|
||||
|
||||
it('explicitly renders the filename in the header for FileDiff results', async () => {
|
||||
const fileDiff: FileDiff = {
|
||||
fileName: 'test-file.ts',
|
||||
filePath: '/test-file.ts',
|
||||
fileDiff:
|
||||
'--- a/test-file.ts\n+++ b/test-file.ts\n@@ -1 +1 @@\n-old\n+new',
|
||||
originalContent: 'old',
|
||||
newContent: 'new',
|
||||
};
|
||||
|
||||
const { lastFrame, waitUntilReady } = await renderWithProviders(
|
||||
<DenseToolMessage
|
||||
{...defaultProps}
|
||||
name="Edit"
|
||||
resultDisplay={fileDiff as unknown as ToolResultDisplay}
|
||||
/>,
|
||||
);
|
||||
await waitUntilReady();
|
||||
const output = lastFrame();
|
||||
expect(output).toContain('test-file.ts');
|
||||
});
|
||||
|
||||
it('renders correctly for a successful string result', async () => {
|
||||
const { lastFrame, waitUntilReady } = await renderWithProviders(
|
||||
<DenseToolMessage {...defaultProps} />,
|
||||
|
||||
Reference in New Issue
Block a user