enable comma in tool list
This commit is contained in:
@@ -36,6 +36,7 @@ type EditableAgent = {
|
|||||||
pipelineId: string;
|
pipelineId: string;
|
||||||
promptSetId?: string;
|
promptSetId?: string;
|
||||||
toolKeys: string[];
|
toolKeys: string[];
|
||||||
|
toolKeysInput: string;
|
||||||
prompts: Record<string, string>;
|
prompts: Record<string, string>;
|
||||||
apiKey: string;
|
apiKey: string;
|
||||||
llmName: string;
|
llmName: string;
|
||||||
@@ -459,6 +460,7 @@ function toEditable(
|
|||||||
pipelineId: config.pipeline_id,
|
pipelineId: config.pipeline_id,
|
||||||
promptSetId: config.prompt_set_id,
|
promptSetId: config.prompt_set_id,
|
||||||
toolKeys: config.tool_keys || [],
|
toolKeys: config.tool_keys || [],
|
||||||
|
toolKeysInput: (config.tool_keys || []).join(", "),
|
||||||
prompts: config.prompt_dict || {},
|
prompts: config.prompt_dict || {},
|
||||||
apiKey: config.api_key || DEFAULT_API_KEY,
|
apiKey: config.api_key || DEFAULT_API_KEY,
|
||||||
llmName: DEFAULT_LLM_NAME,
|
llmName: DEFAULT_LLM_NAME,
|
||||||
@@ -750,6 +752,7 @@ export default function App() {
|
|||||||
graphId,
|
graphId,
|
||||||
prompts: { ...defaults.prompt_dict },
|
prompts: { ...defaults.prompt_dict },
|
||||||
toolKeys: defaults.tool_keys || [],
|
toolKeys: defaults.tool_keys || [],
|
||||||
|
toolKeysInput: (defaults.tool_keys || []).join(", "),
|
||||||
actBackend:
|
actBackend:
|
||||||
graphId === "deepagent"
|
graphId === "deepagent"
|
||||||
? prev.actBackend || DEFAULT_DEEPAGENT_ACT_BACKEND
|
? prev.actBackend || DEFAULT_DEEPAGENT_ACT_BACKEND
|
||||||
@@ -1366,8 +1369,12 @@ export default function App() {
|
|||||||
<label>
|
<label>
|
||||||
tool_keys (comma separated)
|
tool_keys (comma separated)
|
||||||
<input
|
<input
|
||||||
value={editor.toolKeys.join(", ")}
|
value={editor.toolKeysInput}
|
||||||
onChange={(e) => updateEditor("toolKeys", parseToolCsv(e.target.value))}
|
onChange={(e) => {
|
||||||
|
const raw = e.target.value;
|
||||||
|
updateEditor("toolKeysInput", raw);
|
||||||
|
updateEditor("toolKeys", parseToolCsv(raw));
|
||||||
|
}}
|
||||||
placeholder="tool_a, tool_b"
|
placeholder="tool_a, tool_b"
|
||||||
disabled={busy}
|
disabled={busy}
|
||||||
/>
|
/>
|
||||||
|
|||||||
Reference in New Issue
Block a user