mirror of
https://github.com/google-gemini/gemini-cli.git
synced 2026-04-21 18:44:30 -07:00
fix(cli): correct shell height reporting (#21492)
This commit is contained in:
@@ -195,7 +195,7 @@ describe('<ShellToolMessage />', () => {
|
||||
[
|
||||
'uses ACTIVE_SHELL_MAX_LINES when availableTerminalHeight is large',
|
||||
100,
|
||||
ACTIVE_SHELL_MAX_LINES,
|
||||
ACTIVE_SHELL_MAX_LINES - 3,
|
||||
false,
|
||||
],
|
||||
[
|
||||
@@ -207,7 +207,7 @@ describe('<ShellToolMessage />', () => {
|
||||
[
|
||||
'defaults to ACTIVE_SHELL_MAX_LINES in alternate buffer when availableTerminalHeight is undefined',
|
||||
undefined,
|
||||
ACTIVE_SHELL_MAX_LINES,
|
||||
ACTIVE_SHELL_MAX_LINES - 3,
|
||||
false,
|
||||
],
|
||||
])('%s', async (_, availableTerminalHeight, expectedMaxLines, focused) => {
|
||||
@@ -301,8 +301,8 @@ describe('<ShellToolMessage />', () => {
|
||||
await waitUntilReady();
|
||||
await waitFor(() => {
|
||||
const frame = lastFrame();
|
||||
// Should still be constrained to ACTIVE_SHELL_MAX_LINES (15) because isExpandable is false
|
||||
expect(frame.match(/Line \d+/g)?.length).toBe(15);
|
||||
// Should still be constrained to 12 (15 - 3) because isExpandable is false
|
||||
expect(frame.match(/Line \d+/g)?.length).toBe(12);
|
||||
});
|
||||
expect(lastFrame()).toMatchSnapshot();
|
||||
unmount();
|
||||
|
||||
Reference in New Issue
Block a user