aboutsummaryrefslogtreecommitdiffstats
path: root/renderer/src/components/ChatPane.tsx
diff options
context:
space:
mode:
authorbndw <ben@bdw.to>2026-03-01 08:10:35 -0800
committerbndw <ben@bdw.to>2026-03-01 08:10:35 -0800
commitafdf3d57cb7ae4cbf0a519d1b53872f151ecba87 (patch)
tree601cf9cfa293c2287d6f4fc0aefefd37c99a29b7 /renderer/src/components/ChatPane.tsx
parent454453788e759fa16442e755434fbb842fa1acab (diff)
feat: Add `activityStatus` state and `handleCancel` to App.ts… (+4 more)
- ✅ Add `activityStatus` state and `handleCancel` to App.tsx; update Escape handler - ✅ Extend `onClaudeMessage` handler: tool_progress, task_progress, restructure result block - ✅ Pass `activityStatus` and `onCancel` props to `<ChatPane>` in App.tsx - ✅ Update ChatPane.tsx props interface and loading bubble render - ✅ Add loading bubble CSS (flex layout, cancel × styles, pulse animation)
Diffstat (limited to 'renderer/src/components/ChatPane.tsx')
-rw-r--r--renderer/src/components/ChatPane.tsx17
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
15export function ChatPane({ 17export 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} />