From 00cd299c2bab4eed3f4144e5c3862e331bab2571 Mon Sep 17 00:00:00 2001 From: Vivek R <123vivekr@gmail.com> Date: Tue, 24 Jun 2025 00:57:44 +0530 Subject: [PATCH] Update GitHub Agent Browser and API library --- src/components/GitHubAgentBrowser.tsx | 2 -- src/lib/api.ts | 14 ++++++++++++++ 2 files changed, 14 insertions(+), 2 deletions(-) diff --git a/src/components/GitHubAgentBrowser.tsx b/src/components/GitHubAgentBrowser.tsx index 239f8ca..408b37a 100644 --- a/src/components/GitHubAgentBrowser.tsx +++ b/src/components/GitHubAgentBrowser.tsx @@ -18,8 +18,6 @@ import { Card, CardContent, CardFooter } from "@/components/ui/card"; import { Badge } from "@/components/ui/badge"; import { api, type GitHubAgentFile, type AgentExport } from "@/lib/api"; import { AGENT_ICONS, type AgentIconName } from "./CCAgents"; -import { cn } from "@/lib/utils"; - interface GitHubAgentBrowserProps { isOpen: boolean; onClose: () => void; diff --git a/src/lib/api.ts b/src/lib/api.ts index aae67fd..ce59625 100644 --- a/src/lib/api.ts +++ b/src/lib/api.ts @@ -479,6 +479,20 @@ export const api = { } }, + /** + * Retrieves sessions for a specific project + * @param projectId - The ID of the project to retrieve sessions for + * @returns Promise resolving to an array of sessions + */ + async getProjectSessions(projectId: string): Promise { + try { + return await invoke('get_project_sessions', { projectId }); + } catch (error) { + console.error("Failed to get project sessions:", error); + throw error; + } + }, + /** * Fetch list of agents from GitHub repository * @returns Promise resolving to list of available agents on GitHub