mirror of
https://github.com/RooVetGit/Roo-Code.git
synced 2026-08-28 05:27:24 +00:00
Fix user_feedback word wrap issue; auto focus textarea when feedback is required
This commit is contained in:
parent
cb985f3ce8
commit
e4710e8d2c
2 changed files with 13 additions and 0 deletions
|
|
@ -125,6 +125,8 @@ const ChatRow: React.FC<ChatRowProps> = ({ message }) => {
|
|||
color: "var(--vscode-badge-foreground)",
|
||||
borderRadius: "3px",
|
||||
padding: "8px",
|
||||
whiteSpace: "pre-line",
|
||||
wordWrap: "break-word"
|
||||
}}>
|
||||
<span>{message.text}</span>
|
||||
</div>
|
||||
|
|
|
|||
|
|
@ -255,6 +255,17 @@ const ChatView = ({ messages, isHidden }: ChatViewProps) => {
|
|||
// eslint-disable-next-line react-hooks/exhaustive-deps
|
||||
}, [isHidden])
|
||||
|
||||
useEffect(() => {
|
||||
const timer = setTimeout(() => {
|
||||
if (!textAreaDisabled) {
|
||||
textAreaRef.current?.focus()
|
||||
}
|
||||
}, 50)
|
||||
return () => {
|
||||
clearTimeout(timer)
|
||||
}
|
||||
}, [textAreaDisabled])
|
||||
|
||||
return (
|
||||
<div
|
||||
style={{
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue