From 454453788e759fa16442e755434fbb842fa1acab Mon Sep 17 00:00:00 2001 From: bndw Date: Sat, 28 Feb 2026 21:49:29 -0800 Subject: feat: **`globals.css`** — Edit `.chat-pane`: remove `width: 3… (+7 more) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - ✅ **`globals.css`** — Edit `.chat-pane`: remove `width: 380px`, add `min-width: 0`, `overflow: hidden`, `transition: width 0.2s ease` - ✅ **`globals.css`** — Insert `.chat-resize-handle`, `.chat-header`, `.chat-collapse-btn` rules after `.chat-pane` block - ✅ **`globals.css`** — Append `::-webkit-scrollbar` rules at end of file - ✅ **`ChatPane.tsx`** — Full rewrite: new props interface, header strip, conditional body, inline width style - ✅ **`App.tsx`** — Add `chatWidth` + `chatCollapsed` state with lazy localStorage initialisers - ✅ **`App.tsx`** — Add two `useEffect` persistence hooks - ✅ **`App.tsx`** — Add `handleResizeMouseDown` function - ✅ **`App.tsx`** — Update `.main-content` JSX: insert conditional resize handle div, pass new props to `` --- renderer/src/components/ChatPane.tsx | 80 +++++++++++++++++++++++------------- 1 file changed, 51 insertions(+), 29 deletions(-) (limited to 'renderer/src/components') diff --git a/renderer/src/components/ChatPane.tsx b/renderer/src/components/ChatPane.tsx index 917d462..40e682c 100644 --- a/renderer/src/components/ChatPane.tsx +++ b/renderer/src/components/ChatPane.tsx @@ -7,6 +7,9 @@ interface ChatPaneProps { isLoading: boolean; disabled: boolean; placeholder: string; + collapsed: boolean; + chatWidth: number; + onToggleCollapse: () => void; } export function ChatPane({ @@ -15,6 +18,9 @@ export function ChatPane({ isLoading, disabled, placeholder, + collapsed, + chatWidth, + onToggleCollapse, }: ChatPaneProps) { const [input, setInput] = useState(""); const messagesEndRef = useRef(null); @@ -30,37 +36,53 @@ export function ChatPane({ }; return ( -
-
- {messages.map((msg) => ( -
-
{msg.content}
-
- ))} - {isLoading && ( -
-
Thinking...
-
- )} -
-
- -
- setInput(e.target.value)} - onKeyDown={(e) => e.key === "Enter" && !e.shiftKey && handleSend()} - placeholder={placeholder} - disabled={disabled || isLoading} - /> -
+ + {!collapsed && ( + <> +
+ {messages.map((msg) => ( +
+
{msg.content}
+
+ ))} + {isLoading && ( +
+
Thinking...
+
+ )} +
+
+ +
+ setInput(e.target.value)} + onKeyDown={(e) => + e.key === "Enter" && !e.shiftKey && handleSend() + } + placeholder={placeholder} + disabled={disabled || isLoading} + /> + +
+ + )}
); } -- cgit v1.2.3