From 1f974558f8100c668cc628d7d0f88655e6d0b8c1 Mon Sep 17 00:00:00 2001 From: Vaayne Date: Thu, 11 Sep 2025 12:28:43 +0800 Subject: [PATCH] feat: enhance agent and session entity types with additional properties --- src/renderer/src/types/agent.ts | 16 ++++++++++++---- src/renderer/src/types/index.ts | 1 + 2 files changed, 13 insertions(+), 4 deletions(-) diff --git a/src/renderer/src/types/agent.ts b/src/renderer/src/types/agent.ts index e6579a8fcf..d81c5128c8 100644 --- a/src/renderer/src/types/agent.ts +++ b/src/renderer/src/types/agent.ts @@ -9,9 +9,16 @@ export interface AgentEntity { name: string description?: string avatar?: string + instructions?: string // System prompt + model: string // Model ID (required) - tools?: string[] // Array of enabled tool IDs + plan_model?: string // Optional plan/thinking model ID + small_model?: string // Optional small/fast model ID + + built_in_tools?: string[] // Array of built-in tool IDs + mcps?: string[] // Array of MCP tool IDs + knowledges?: string[] // Array of enabled knowledge base IDs configuration?: Record // Extensible settings like temperature, top_p created_at: string @@ -24,12 +31,13 @@ export type PermissionMode = 'readOnly' | 'acceptEdits' | 'bypassPermissions' // AgentSession entity representing a conversation session with one or more agents export interface AgentSessionEntity { id: string - agent_id: string // Agent ID involved + main_agent_id: string // Primary agent ID for the session + sub_agent_ids?: string[] // Array of sub-agent IDs involved in the session user_goal?: string // Initial user goal for the session status: SessionStatus accessible_paths?: string[] // Array of directory paths the agent can access - agent_session_id?: string // Latest Claude SDK session ID for continuity - max_turns?: number // Maximum number of turns allowed in the session, default 10 + external_session_id?: string // Agent session for external agent management/tracking + max_steps?: number // Maximum number of steps the agent can take, default 10 permission_mode?: PermissionMode // Permission mode for the session created_at: string updated_at: string diff --git a/src/renderer/src/types/index.ts b/src/renderer/src/types/index.ts index 40b7d4e139..7dbc7b8a33 100644 --- a/src/renderer/src/types/index.ts +++ b/src/renderer/src/types/index.ts @@ -15,6 +15,7 @@ import { MCPConfigSample, McpServerType } from './mcp' import type { Message } from './newMessage' import type { BaseTool, MCPTool } from './tool' +export * from './agent' export * from './knowledge' export * from './mcp' export * from './ocr'