mirror of
https://github.com/QwenLM/qwen-code.git
synced 2026-04-30 20:50:34 +00:00
UI improvements for suggestions & status (#373)
This commit is contained in:
parent
8d9e1118c6
commit
9862cf3204
5 changed files with 14 additions and 5 deletions
|
|
@ -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">
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue