mirror of
https://github.com/google-gemini/gemini-cli.git
synced 2026-05-13 05:12:55 -07:00
feat(shell): Standardize pager to 'cat' for shell execution by model (#13878)
This commit is contained in:
@@ -221,6 +221,7 @@ export class ShellExecutionService {
|
|||||||
GEMINI_CLI: '1',
|
GEMINI_CLI: '1',
|
||||||
TERM: 'xterm-256color',
|
TERM: 'xterm-256color',
|
||||||
PAGER: 'cat',
|
PAGER: 'cat',
|
||||||
|
GIT_PAGER: 'cat',
|
||||||
},
|
},
|
||||||
});
|
});
|
||||||
|
|
||||||
@@ -434,6 +435,7 @@ export class ShellExecutionService {
|
|||||||
GEMINI_CLI: '1',
|
GEMINI_CLI: '1',
|
||||||
TERM: 'xterm-256color',
|
TERM: 'xterm-256color',
|
||||||
PAGER: shellExecutionConfig.pager ?? 'cat',
|
PAGER: shellExecutionConfig.pager ?? 'cat',
|
||||||
|
GIT_PAGER: shellExecutionConfig.pager ?? 'cat',
|
||||||
},
|
},
|
||||||
handleFlowControl: true,
|
handleFlowControl: true,
|
||||||
});
|
});
|
||||||
|
|||||||
@@ -222,7 +222,7 @@ describe('ShellTool', () => {
|
|||||||
expect.any(Function),
|
expect.any(Function),
|
||||||
expect.any(AbortSignal),
|
expect.any(AbortSignal),
|
||||||
false,
|
false,
|
||||||
{},
|
{ pager: 'cat' },
|
||||||
);
|
);
|
||||||
expect(result.llmContent).toContain('Background PIDs: 54322');
|
expect(result.llmContent).toContain('Background PIDs: 54322');
|
||||||
// The file should be deleted by the tool
|
// The file should be deleted by the tool
|
||||||
@@ -247,7 +247,7 @@ describe('ShellTool', () => {
|
|||||||
expect.any(Function),
|
expect.any(Function),
|
||||||
expect.any(AbortSignal),
|
expect.any(AbortSignal),
|
||||||
false,
|
false,
|
||||||
{},
|
{ pager: 'cat' },
|
||||||
);
|
);
|
||||||
});
|
});
|
||||||
|
|
||||||
@@ -268,7 +268,7 @@ describe('ShellTool', () => {
|
|||||||
expect.any(Function),
|
expect.any(Function),
|
||||||
expect.any(AbortSignal),
|
expect.any(AbortSignal),
|
||||||
false,
|
false,
|
||||||
{},
|
{ pager: 'cat' },
|
||||||
);
|
);
|
||||||
});
|
});
|
||||||
|
|
||||||
@@ -295,7 +295,7 @@ describe('ShellTool', () => {
|
|||||||
expect.any(Function),
|
expect.any(Function),
|
||||||
expect.any(AbortSignal),
|
expect.any(AbortSignal),
|
||||||
false,
|
false,
|
||||||
{},
|
{ pager: 'cat' },
|
||||||
);
|
);
|
||||||
},
|
},
|
||||||
20000,
|
20000,
|
||||||
|
|||||||
@@ -241,7 +241,7 @@ export class ShellToolInvocation extends BaseToolInvocation<
|
|||||||
},
|
},
|
||||||
combinedController.signal,
|
combinedController.signal,
|
||||||
this.config.getEnableInteractiveShell(),
|
this.config.getEnableInteractiveShell(),
|
||||||
shellExecutionConfig ?? {},
|
{ ...shellExecutionConfig, pager: 'cat' },
|
||||||
);
|
);
|
||||||
|
|
||||||
if (pid && setPidCallback) {
|
if (pid && setPidCallback) {
|
||||||
|
|||||||
Reference in New Issue
Block a user