mirror of
https://github.com/CherryHQ/cherry-studio.git
synced 2026-01-04 11:49:02 +08:00
refactor(types): replace GetAgentResponse interface with zod schema
Use zod schema for better type safety and validation
This commit is contained in:
parent
62d2da3815
commit
0a82955e91
@ -120,9 +120,11 @@ export const CreateAgentResponseSchema = AgentEntitySchema
|
||||
|
||||
export interface UpdateAgentRequest extends Partial<AgentBase> {}
|
||||
|
||||
export interface GetAgentResponse extends AgentEntity {
|
||||
built_in_tools?: Tool[] // Built-in tools available to the agent
|
||||
}
|
||||
export const GetAgentResponseSchema = AgentEntitySchema.extend({
|
||||
built_in_tools: z.array(ToolSchema).optional() // Built-in tools available to the agent
|
||||
})
|
||||
|
||||
export type GetAgentResponse = z.infer<typeof GetAgentResponseSchema>
|
||||
|
||||
export type CreateSessionRequest = AgentBase
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user