Skip to content

Commit b5793a6

Browse files
committed
[codecane] shorter placeholder for small width
1 parent 201b5d1 commit b5793a6

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

cli/src/chat.tsx

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,7 @@ export const Chat = ({
7878
const scrollRef = useRef<ScrollBoxRenderable | null>(null)
7979
const inputRef = useRef<MultilineInputHandle | null>(null)
8080

81-
const { separatorWidth } = useTerminalDimensions()
81+
const { separatorWidth, terminalWidth } = useTerminalDimensions()
8282

8383
const theme = useTheme()
8484
const markdownPalette = useMemo(() => createMarkdownPalette(theme), [theme])
@@ -795,7 +795,11 @@ export const Chat = ({
795795
value={inputValue}
796796
onChange={setInputValue}
797797
onSubmit={handleSubmit}
798-
placeholder="Enter a coding task or / for commands"
798+
placeholder={
799+
terminalWidth < 65
800+
? 'Enter a coding task'
801+
: 'Enter a coding task or / for commands'
802+
}
799803
focused={inputFocused}
800804
maxHeight={5}
801805
width={inputWidth}

0 commit comments

Comments
 (0)