diff --git a/client/src/App.tsx b/client/src/App.tsx index 2fbc7494..d264a8fa 100644 --- a/client/src/App.tsx +++ b/client/src/App.tsx @@ -30,7 +30,10 @@ import React, { useState, } from "react"; import { useConnection } from "./lib/hooks/useConnection"; -import { useDraggablePane } from "./lib/hooks/useDraggablePane"; +import { + useDraggablePane, + useDraggableSidebar, +} from "./lib/hooks/useDraggablePane"; import { StdErrNotification } from "./lib/notificationTypes"; import { Tabs, TabsContent, TabsList, TabsTrigger } from "@/components/ui/tabs"; @@ -154,6 +157,11 @@ const App = () => { const progressTokenRef = useRef(0); const { height: historyPaneHeight, handleDragStart } = useDraggablePane(300); + const { + width: sidebarWidth, + isDragging: isSidebarDragging, + handleDragStart: handleSidebarDragStart, + } = useDraggableSidebar(320); const { connectionStatus, @@ -607,32 +615,58 @@ const App = () => { return (
- +
+ + {/* Drag handle for resizing sidebar */} +
+
{mcpClient ? ( diff --git a/client/src/components/Sidebar.tsx b/client/src/components/Sidebar.tsx index eee8eeaa..3985eb48 100644 --- a/client/src/components/Sidebar.tsx +++ b/client/src/components/Sidebar.tsx @@ -214,7 +214,7 @@ const Sidebar = ({ }, [generateMCPServerFile, toast, reportError]); return ( -
+

@@ -285,13 +285,28 @@ const Sidebar = ({ - setSseUrl(e.target.value)} - className="font-mono" - /> + {sseUrl ? ( + + + setSseUrl(e.target.value)} + className="font-mono" + /> + + {sseUrl} + + ) : ( + setSseUrl(e.target.value)} + className="font-mono" + /> + )}