@@ -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={{