diff --git a/client/src/App.tsx b/client/src/App.tsx index 26eb44c5e..95ae60a91 100644 --- a/client/src/App.tsx +++ b/client/src/App.tsx @@ -176,6 +176,7 @@ const App = () => { completionsSupported, connect: connectMcpServer, disconnect: disconnectMcpServer, + setRequestHistory, } = useConnection({ transportType, command, @@ -934,6 +935,7 @@ const App = () => { setRequestHistory([])} /> diff --git a/client/src/components/History.tsx b/client/src/components/History.tsx index 78394dea2..b2e677403 100644 --- a/client/src/components/History.tsx +++ b/client/src/components/History.tsx @@ -5,9 +5,11 @@ import JsonView from "./JsonView"; const HistoryAndNotifications = ({ requestHistory, serverNotifications, + onClearHistory, }: { requestHistory: Array<{ request: string; response?: string }>; serverNotifications: ServerNotification[]; + onClearHistory?: () => void; }) => { const [expandedRequests, setExpandedRequests] = useState<{ [key: number]: boolean; @@ -28,6 +30,12 @@ const HistoryAndNotifications = ({

History

+ {requestHistory.length === 0 ? (

No history yet diff --git a/client/src/lib/hooks/useConnection.ts b/client/src/lib/hooks/useConnection.ts index 9009e698f..a428d66c0 100644 --- a/client/src/lib/hooks/useConnection.ts +++ b/client/src/lib/hooks/useConnection.ts @@ -555,5 +555,6 @@ export function useConnection({ completionsSupported, connect, disconnect, + setRequestHistory, }; }