diff options
Diffstat (limited to 'renderer/src/components/ChatPane.tsx')
| -rw-r--r-- | renderer/src/components/ChatPane.tsx | 17 |
1 files changed, 16 insertions, 1 deletions
diff --git a/renderer/src/components/ChatPane.tsx b/renderer/src/components/ChatPane.tsx index 40e682c..c2cdfbb 100644 --- a/renderer/src/components/ChatPane.tsx +++ b/renderer/src/components/ChatPane.tsx | |||
| @@ -10,6 +10,8 @@ interface ChatPaneProps { | |||
| 10 | collapsed: boolean; | 10 | collapsed: boolean; |
| 11 | chatWidth: number; | 11 | chatWidth: number; |
| 12 | onToggleCollapse: () => void; | 12 | onToggleCollapse: () => void; |
| 13 | activityStatus?: string | null; | ||
| 14 | onCancel?: () => void; | ||
| 13 | } | 15 | } |
| 14 | 16 | ||
| 15 | export function ChatPane({ | 17 | export function ChatPane({ |
| @@ -21,6 +23,8 @@ export function ChatPane({ | |||
| 21 | collapsed, | 23 | collapsed, |
| 22 | chatWidth, | 24 | chatWidth, |
| 23 | onToggleCollapse, | 25 | onToggleCollapse, |
| 26 | activityStatus, | ||
| 27 | onCancel, | ||
| 24 | }: ChatPaneProps) { | 28 | }: ChatPaneProps) { |
| 25 | const [input, setInput] = useState(""); | 29 | const [input, setInput] = useState(""); |
| 26 | const messagesEndRef = useRef<HTMLDivElement>(null); | 30 | const messagesEndRef = useRef<HTMLDivElement>(null); |
| @@ -57,7 +61,18 @@ export function ChatPane({ | |||
| 57 | ))} | 61 | ))} |
| 58 | {isLoading && ( | 62 | {isLoading && ( |
| 59 | <div className="message assistant loading"> | 63 | <div className="message assistant loading"> |
| 60 | <div className="message-content">Thinking...</div> | 64 | <div className="message-content"> |
| 65 | <span>{activityStatus ?? "Thinking…"}</span> | ||
| 66 | {onCancel && ( | ||
| 67 | <button | ||
| 68 | className="loading-cancel-x" | ||
| 69 | onClick={onCancel} | ||
| 70 | title="Cancel (Esc)" | ||
| 71 | > | ||
| 72 | Ă— | ||
| 73 | </button> | ||
| 74 | )} | ||
| 75 | </div> | ||
| 61 | </div> | 76 | </div> |
| 62 | )} | 77 | )} |
| 63 | <div ref={messagesEndRef} /> | 78 | <div ref={messagesEndRef} /> |
