Skip to content

Commit f80cfeb

Browse files
authored
Merge pull request #1092 from kev1n77/fmy/bugfix
fix(flow-chat): switch to multi-line input when target switcher is shown
2 parents 2c0ecba + 8a25be2 commit f80cfeb

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

src/web-ui/src/flow_chat/components/ChatInput.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -418,7 +418,7 @@ export const ChatInput: React.FC<ChatInputProps> = ({
418418
const measureIsMultiLine = useCallback((source: 'value-effect' | 'mutation-observer' | 'collapse-confirmation' | 'layout-change' = 'value-effect') => {
419419
const hasNewline = inputState.value.includes('\n');
420420
const hasImages = imageContexts.length > 0;
421-
if (hasNewline || hasImages) {
421+
if (hasNewline || hasImages || showTargetSwitcher) {
422422
setIsMultiLine(true);
423423
return;
424424
}
@@ -502,7 +502,7 @@ export const ChatInput: React.FC<ChatInputProps> = ({
502502
}
503503
lockedCapsuleInputWidthRef.current = nextLockedWidth;
504504
setIsMultiLine(nextIsMultiLine);
505-
}, [inputState.value, imageContexts.length, isMultiLine, measureCapsuleInputWidth]);
505+
}, [inputState.value, imageContexts.length, isMultiLine, measureCapsuleInputWidth, showTargetSwitcher]);
506506
measureIsMultiLineRef.current = measureIsMultiLine;
507507

508508
// Re-measure when value or image count changes (handles typing / deleting)

0 commit comments

Comments
 (0)