mirror of
https://github.com/google-gemini/gemini-cli.git
synced 2026-04-26 04:54:25 -07:00
fix: optimize height calculations for ask_user dialog (#19017)
This commit is contained in:
@@ -235,6 +235,10 @@ export const ToolConfirmationMessage: React.FC<
|
||||
return undefined;
|
||||
}
|
||||
|
||||
if (handlesOwnUI) {
|
||||
return availableTerminalHeight;
|
||||
}
|
||||
|
||||
// Calculate the vertical space (in lines) consumed by UI elements
|
||||
// surrounding the main body content.
|
||||
const PADDING_OUTER_Y = 2; // Main container has `padding={1}` (top & bottom).
|
||||
@@ -253,7 +257,7 @@ export const ToolConfirmationMessage: React.FC<
|
||||
1; // Reserve one line for 'ShowMoreLines' hint
|
||||
|
||||
return Math.max(availableTerminalHeight - surroundingElementsHeight, 1);
|
||||
}, [availableTerminalHeight, getOptions]);
|
||||
}, [availableTerminalHeight, getOptions, handlesOwnUI]);
|
||||
|
||||
const { question, bodyContent, options } = useMemo(() => {
|
||||
let bodyContent: React.ReactNode | null = null;
|
||||
|
||||
Reference in New Issue
Block a user