summaryrefslogtreecommitdiff
path: root/packages/cli/src/ui/components/SuggestionsDisplay.tsx
diff options
context:
space:
mode:
authorMiguel Solorio <[email protected]>2025-05-15 16:35:21 -0700
committerGitHub <[email protected]>2025-05-15 16:35:21 -0700
commit9862cf3204c953b67425219193c4eb700084df9c (patch)
tree4c2ff8ef43ff8447e9b39a7708220765c7947efb /packages/cli/src/ui/components/SuggestionsDisplay.tsx
parent8d9e1118c6035185c54e4cd1f3162d3c6bb6e254 (diff)
UI improvements for suggestions & status (#373)
Diffstat (limited to 'packages/cli/src/ui/components/SuggestionsDisplay.tsx')
-rw-r--r--packages/cli/src/ui/components/SuggestionsDisplay.tsx12
1 files changed, 10 insertions, 2 deletions
diff --git a/packages/cli/src/ui/components/SuggestionsDisplay.tsx b/packages/cli/src/ui/components/SuggestionsDisplay.tsx
index 3f2094bb..fb8005f6 100644
--- a/packages/cli/src/ui/components/SuggestionsDisplay.tsx
+++ b/packages/cli/src/ui/components/SuggestionsDisplay.tsx
@@ -17,6 +17,7 @@ interface SuggestionsDisplayProps {
isLoading: boolean;
width: number;
scrollOffset: number;
+ userInput: string;
}
export const MAX_SUGGESTIONS_TO_SHOW = 8;
@@ -27,6 +28,7 @@ export function SuggestionsDisplay({
isLoading,
width,
scrollOffset,
+ userInput,
}: SuggestionsDisplayProps) {
if (isLoading) {
return (
@@ -60,9 +62,15 @@ export function SuggestionsDisplay({
return (
<Box key={`${suggestion}-${originalIndex}`} width={width}>
<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>
- </Box>
+ )}
{suggestion.description ? (
<Box flexGrow={1}>
<Text color={textColor} wrap="wrap">