Update GitHub Agent Browser and API library
This commit is contained in:
@@ -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;
|
||||
|
@@ -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<Session[]> {
|
||||
try {
|
||||
return await invoke<Session[]>('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
|
||||
|
Reference in New Issue
Block a user