Skip to content

Commit 00cd299

Browse files
committed
Update GitHub Agent Browser and API library
1 parent c85caa7 commit 00cd299

2 files changed

Lines changed: 14 additions & 2 deletions

File tree

src/components/GitHubAgentBrowser.tsx

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,8 +18,6 @@ import { Card, CardContent, CardFooter } from "@/components/ui/card";
1818
import { Badge } from "@/components/ui/badge";
1919
import { api, type GitHubAgentFile, type AgentExport } from "@/lib/api";
2020
import { AGENT_ICONS, type AgentIconName } from "./CCAgents";
21-
import { cn } from "@/lib/utils";
22-
2321
interface GitHubAgentBrowserProps {
2422
isOpen: boolean;
2523
onClose: () => void;

src/lib/api.ts

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -479,6 +479,20 @@ export const api = {
479479
}
480480
},
481481

482+
/**
483+
* Retrieves sessions for a specific project
484+
* @param projectId - The ID of the project to retrieve sessions for
485+
* @returns Promise resolving to an array of sessions
486+
*/
487+
async getProjectSessions(projectId: string): Promise<Session[]> {
488+
try {
489+
return await invoke<Session[]>('get_project_sessions', { projectId });
490+
} catch (error) {
491+
console.error("Failed to get project sessions:", error);
492+
throw error;
493+
}
494+
},
495+
482496
/**
483497
* Fetch list of agents from GitHub repository
484498
* @returns Promise resolving to list of available agents on GitHub

0 commit comments

Comments
 (0)