Skip to content

Commit b3b77f9

Browse files
committed
πŸ› Bugfix: agent tools save or load parameters failed
1 parent f9d1966 commit b3b77f9

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

β€Žfrontend/app/[locale]/agents/components/AgentSetupOrchestrator.tsxβ€Ž

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -515,7 +515,7 @@ export default function AgentSetupOrchestrator({
515515
[updatedTool.id]:
516516
updatedTool.initParams?.map((param) => ({ ...param })) || [],
517517
}));
518-
setSelectedTools((prev) => {
518+
setSelectedTools((prev: Tool[]) => {
519519
if (!prev || prev.length === 0) {
520520
return prev;
521521
}

β€Žfrontend/types/agentConfig.tsβ€Ž

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,6 @@
11
// Agent Configuration Types
2+
import type { Dispatch, SetStateAction } from "react";
3+
24
import { ChatMessageType } from "./chat";
35
import { ModelOption } from "@/types/modelConfig";
46
import { GENERATE_PROMPT_STREAM_TYPES } from "../const/agentConfig";
@@ -90,7 +92,7 @@ export interface AgentSetupOrchestratorProps {
9092
setBusinessLogic: (value: string) => void;
9193
businessLogicError?: boolean;
9294
selectedTools: Tool[];
93-
setSelectedTools: (tools: Tool[]) => void;
95+
setSelectedTools: Dispatch<SetStateAction<Tool[]>>;
9496
isCreatingNewAgent: boolean;
9597
setIsCreatingNewAgent: (value: boolean) => void;
9698
mainAgentModel: string | null;

0 commit comments

Comments
Β (0)