UI improvements for suggestions & status (#373)

This commit is contained in:
Miguel Solorio 2025-05-15 16:35:21 -07:00 committed by GitHub
parent 8d9e1118c6
commit 9862cf3204
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
5 changed files with 14 additions and 5 deletions

View File

@ -310,6 +310,7 @@ export const App = ({
isLoading={completion.isLoadingSuggestions} isLoading={completion.isLoadingSuggestions}
width={suggestionsWidth} width={suggestionsWidth}
scrollOffset={completion.visibleStartIndex} scrollOffset={completion.visibleStartIndex}
userInput={query}
/> />
</Box> </Box>
)} )}

View File

@ -24,7 +24,7 @@ export const Footer: React.FC<FooterProps> = ({
cliVersion, cliVersion,
geminiMdFileCount, geminiMdFileCount,
}) => ( }) => (
<Box> <Box marginTop={1}>
<Box> <Box>
{geminiMdFileCount > 0 && ( {geminiMdFileCount > 0 && (
<Text color={Colors.SubtleComment}> <Text color={Colors.SubtleComment}>

View File

@ -17,6 +17,7 @@ interface SuggestionsDisplayProps {
isLoading: boolean; isLoading: boolean;
width: number; width: number;
scrollOffset: number; scrollOffset: number;
userInput: string;
} }
export const MAX_SUGGESTIONS_TO_SHOW = 8; export const MAX_SUGGESTIONS_TO_SHOW = 8;
@ -27,6 +28,7 @@ export function SuggestionsDisplay({
isLoading, isLoading,
width, width,
scrollOffset, scrollOffset,
userInput,
}: SuggestionsDisplayProps) { }: SuggestionsDisplayProps) {
if (isLoading) { if (isLoading) {
return ( return (
@ -60,9 +62,15 @@ export function SuggestionsDisplay({
return ( return (
<Box key={`${suggestion}-${originalIndex}`} width={width}> <Box key={`${suggestion}-${originalIndex}`} width={width}>
<Box flexDirection="row"> <Box flexDirection="row">
<Box width={20} flexShrink={0}> {userInput.startsWith('/') ? (
// only use box model for (/) command mode
<Box width={20} flexShrink={0}>
<Text color={textColor}>{suggestion.label}</Text>
</Box>
) : (
// use regular text for other modes (@ context)
<Text color={textColor}>{suggestion.label}</Text> <Text color={textColor}>{suggestion.label}</Text>
</Box> )}
{suggestion.description ? ( {suggestion.description ? (
<Box flexGrow={1}> <Box flexGrow={1}>
<Text color={textColor} wrap="wrap"> <Text color={textColor} wrap="wrap">

View File

@ -102,7 +102,7 @@ export function ThemeDialog({
return ( return (
<Box <Box
borderStyle="round" borderStyle="round"
borderColor={Colors.AccentPurple} borderColor={Colors.SubtleComment}
flexDirection="row" flexDirection="row"
padding={1} padding={1}
width="100%" width="100%"

View File

@ -24,7 +24,7 @@ export const ToolGroupMessage: React.FC<ToolGroupMessageProps> = ({
const hasPending = !toolCalls.every( const hasPending = !toolCalls.every(
(t) => t.status === ToolCallStatus.Success, (t) => t.status === ToolCallStatus.Success,
); );
const borderColor = hasPending ? Colors.AccentYellow : Colors.AccentPurple; const borderColor = hasPending ? Colors.AccentYellow : Colors.SubtleComment;
return ( return (
<Box <Box