mirror of
https://github.com/pacnpal/Roo-Code.git
synced 2025-12-20 12:21:13 -05:00
Fix user_feedback word wrap issue; auto focus textarea when feedback is required
This commit is contained in:
@@ -125,6 +125,8 @@ const ChatRow: React.FC<ChatRowProps> = ({ message }) => {
|
|||||||
color: "var(--vscode-badge-foreground)",
|
color: "var(--vscode-badge-foreground)",
|
||||||
borderRadius: "3px",
|
borderRadius: "3px",
|
||||||
padding: "8px",
|
padding: "8px",
|
||||||
|
whiteSpace: "pre-line",
|
||||||
|
wordWrap: "break-word"
|
||||||
}}>
|
}}>
|
||||||
<span>{message.text}</span>
|
<span>{message.text}</span>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -255,6 +255,17 @@ const ChatView = ({ messages, isHidden }: ChatViewProps) => {
|
|||||||
// eslint-disable-next-line react-hooks/exhaustive-deps
|
// eslint-disable-next-line react-hooks/exhaustive-deps
|
||||||
}, [isHidden])
|
}, [isHidden])
|
||||||
|
|
||||||
|
useEffect(() => {
|
||||||
|
const timer = setTimeout(() => {
|
||||||
|
if (!textAreaDisabled) {
|
||||||
|
textAreaRef.current?.focus()
|
||||||
|
}
|
||||||
|
}, 50)
|
||||||
|
return () => {
|
||||||
|
clearTimeout(timer)
|
||||||
|
}
|
||||||
|
}, [textAreaDisabled])
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<div
|
<div
|
||||||
style={{
|
style={{
|
||||||
|
|||||||
Reference in New Issue
Block a user