fix(cli): eliminate slash command menu render flicker (#775)

Co-authored-by: Letta <noreply@letta.com>
This commit is contained in:
Charles Packer
2026-02-01 17:13:17 -08:00
committed by GitHub
parent 7584f4291f
commit 5598c09d08
2 changed files with 52 additions and 47 deletions

View File

@@ -115,6 +115,7 @@ const InputFooter = memo(function InputFooter({
isOpenAICodexProvider,
isByokProvider,
isAutocompleteActive,
hideFooter,
}: {
ctrlCPressed: boolean;
escapePressed: boolean;
@@ -127,9 +128,10 @@ const InputFooter = memo(function InputFooter({
isOpenAICodexProvider: boolean;
isByokProvider: boolean;
isAutocompleteActive: boolean;
hideFooter: boolean;
}) {
// Hide footer when autocomplete is showing
if (isAutocompleteActive) {
if (hideFooter || isAutocompleteActive) {
return null;
}
@@ -258,6 +260,7 @@ export function Input({
const [cursorPos, setCursorPos] = useState<number | undefined>(undefined);
const [currentCursorPosition, setCurrentCursorPosition] = useState(0);
const interactionEnabled = visible && inputEnabled;
const hideFooter = interactionEnabled && value.startsWith("/");
// Command history
const [history, setHistory] = useState<string[]>([]);
@@ -1002,6 +1005,7 @@ export function Input({
currentModelProvider === OPENAI_CODEX_PROVIDER_NAME
}
isAutocompleteActive={isAutocompleteActive}
hideFooter={hideFooter}
/>
</Box>
</Box>