import type { AgentCreate, AgentRead } from "@/api/generated/schemas";

export type AgentCreateFormValues = AgentCreate;

export type AgentEditFormValues = AgentCreate;

export function agentToEditFormValues(agent: AgentRead): AgentEditFormValues {
  return {
    name: agent.name,
    description: agent.description,
    icon_name: agent.icon_name,
    instruction: agent.instruction,
    model_id: agent.model?.id ?? null,
    usable_tool_ids: agent.usable_tools.map((tool) => tool.id),
  };
}
