feat: add home screen with agent list and orchestrator navigation
This commit is contained in:
@@ -2,14 +2,17 @@ import type { SessionNotification, RequestPermissionRequest } from "@agentclient
|
||||
|
||||
/**
|
||||
* Extended update types with messageId for proper deduplication
|
||||
* messageId is optional since some sources may not provide it
|
||||
*/
|
||||
type AgentMessageChunkWithId = Extract<SessionNotification['update'], { sessionUpdate: 'agent_message_chunk' }> & { messageId: string };
|
||||
type AgentThoughtChunkWithId = Extract<SessionNotification['update'], { sessionUpdate: 'agent_thought_chunk' }> & { messageId: string };
|
||||
type UserMessageChunkWithId = Extract<SessionNotification['update'], { sessionUpdate: 'user_message_chunk' }> & { messageId?: string };
|
||||
type AgentMessageChunkWithId = Extract<SessionNotification['update'], { sessionUpdate: 'agent_message_chunk' }> & { messageId?: string };
|
||||
type AgentThoughtChunkWithId = Extract<SessionNotification['update'], { sessionUpdate: 'agent_thought_chunk' }> & { messageId?: string };
|
||||
|
||||
export type EnrichedSessionUpdate =
|
||||
| UserMessageChunkWithId
|
||||
| AgentMessageChunkWithId
|
||||
| AgentThoughtChunkWithId
|
||||
| Exclude<SessionNotification['update'], { sessionUpdate: 'agent_message_chunk' | 'agent_thought_chunk' }>;
|
||||
| Exclude<SessionNotification['update'], { sessionUpdate: 'user_message_chunk' | 'agent_message_chunk' | 'agent_thought_chunk' }>;
|
||||
|
||||
export interface EnrichedSessionNotification extends Omit<SessionNotification, 'update'> {
|
||||
update: EnrichedSessionUpdate;
|
||||
|
||||
@@ -196,7 +196,8 @@ export const AgentUpdateMessageSchema = z.object({
|
||||
payload: z.object({
|
||||
agentId: z.string(),
|
||||
timestamp: z.date(),
|
||||
notification: z.any(), // SessionNotification from ACP - complex type, using any for simplicity
|
||||
// Runtime validation with z.any(), TypeScript enforces AgentNotification type
|
||||
notification: z.any(),
|
||||
}),
|
||||
});
|
||||
|
||||
|
||||
Reference in New Issue
Block a user