mirror of
https://github.com/google-gemini/gemini-cli.git
synced 2026-03-10 14:10:37 -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',
|
||||
TERM: 'xterm-256color',
|
||||
PAGER: 'cat',
|
||||
GIT_PAGER: 'cat',
|
||||
},
|
||||
});
|
||||
|
||||
@@ -434,6 +435,7 @@ export class ShellExecutionService {
|
||||
GEMINI_CLI: '1',
|
||||
TERM: 'xterm-256color',
|
||||
PAGER: shellExecutionConfig.pager ?? 'cat',
|
||||
GIT_PAGER: shellExecutionConfig.pager ?? 'cat',
|
||||
},
|
||||
handleFlowControl: true,
|
||||
});
|
||||
|
||||
@@ -222,7 +222,7 @@ describe('ShellTool', () => {
|
||||
expect.any(Function),
|
||||
expect.any(AbortSignal),
|
||||
false,
|
||||
{},
|
||||
{ pager: 'cat' },
|
||||
);
|
||||
expect(result.llmContent).toContain('Background PIDs: 54322');
|
||||
// The file should be deleted by the tool
|
||||
@@ -247,7 +247,7 @@ describe('ShellTool', () => {
|
||||
expect.any(Function),
|
||||
expect.any(AbortSignal),
|
||||
false,
|
||||
{},
|
||||
{ pager: 'cat' },
|
||||
);
|
||||
});
|
||||
|
||||
@@ -268,7 +268,7 @@ describe('ShellTool', () => {
|
||||
expect.any(Function),
|
||||
expect.any(AbortSignal),
|
||||
false,
|
||||
{},
|
||||
{ pager: 'cat' },
|
||||
);
|
||||
});
|
||||
|
||||
@@ -295,7 +295,7 @@ describe('ShellTool', () => {
|
||||
expect.any(Function),
|
||||
expect.any(AbortSignal),
|
||||
false,
|
||||
{},
|
||||
{ pager: 'cat' },
|
||||
);
|
||||
},
|
||||
20000,
|
||||
|
||||
@@ -241,7 +241,7 @@ export class ShellToolInvocation extends BaseToolInvocation<
|
||||
},
|
||||
combinedController.signal,
|
||||
this.config.getEnableInteractiveShell(),
|
||||
shellExecutionConfig ?? {},
|
||||
{ ...shellExecutionConfig, pager: 'cat' },
|
||||
);
|
||||
|
||||
if (pid && setPidCallback) {
|
||||
|
||||
Reference in New Issue
Block a user