Skip to content

Commit

Permalink
agents from db
Browse files Browse the repository at this point in the history
  • Loading branch information
duke79 committed Jul 27, 2024
1 parent 2e65f8d commit 20c8929
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 6 deletions.
8 changes: 4 additions & 4 deletions src/ipc/channels.type.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import {
SummarizedResult,
SummarizedResultChunk,
UserMessage,
Agent,
AgentType,
} from '../types';
import { ToServer, ToClient } from './channels.enum';

Expand Down Expand Up @@ -61,10 +61,10 @@ export type ChannelBody<T extends ToServer | ToClient> =
T extends ToServer.GET_AGENTS
? {}
: T extends ToServer.SAVE_AGENT
? Agent & { id?: string }
? Omit<AgentType, 'id'> & { id?: number }
: T extends ToServer.DELETE_AGENT
? { id: string }
? { id: number }
: T extends ToClient.AGENTS
? Agent[]
? AgentType[]
: // --- Other Groups... ---
never;
6 changes: 4 additions & 2 deletions src/types/agent.type.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
export interface Agent {
id: string;
export interface AgentType {
id: number;
name: string;
systemInstructions: string;
editable?: boolean;
hidden?: boolean;
}

0 comments on commit 20c8929

Please sign in to comment.