Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions client/src/App.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -176,6 +176,7 @@ const App = () => {
completionsSupported,
connect: connectMcpServer,
disconnect: disconnectMcpServer,
setRequestHistory,
} = useConnection({
transportType,
command,
Expand Down Expand Up @@ -934,6 +935,7 @@ const App = () => {
<HistoryAndNotifications
requestHistory={requestHistory}
serverNotifications={notifications}
onClearHistory={() => setRequestHistory([])}
/>
</div>
</div>
Expand Down
8 changes: 8 additions & 0 deletions client/src/components/History.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand All @@ -28,6 +30,12 @@ const HistoryAndNotifications = ({
<div className="bg-card overflow-hidden flex h-full">
<div className="flex-1 overflow-y-auto p-4 border-r">
<h2 className="text-lg font-semibold mb-4">History</h2>
<button
className="mb-4 px-3 py-1 bg-gray-800 text-white rounded hover:bg-gray-900 transition-colors"
onClick={onClearHistory}
>
Clear History
</button>
{requestHistory.length === 0 ? (
<p className="text-sm text-gray-500 dark:text-gray-400 italic">
No history yet
Expand Down
1 change: 1 addition & 0 deletions client/src/lib/hooks/useConnection.ts
Original file line number Diff line number Diff line change
Expand Up @@ -555,5 +555,6 @@ export function useConnection({
completionsSupported,
connect,
disconnect,
setRequestHistory,
};
}