Shared task board where people and AI coding agents work as teammates. Source-available, self-hostable.
Go
fix(views): use createSafeId in custom args tab (#1247)
Bohan Jiang702156904a7c
diff --git a/packages/views/agents/components/tabs/custom-args-tab.tsx b/packages/views/agents/components/tabs/custom-args-tab.tsxindex 56aa5b0d4d..587d92300f 100644--- a/packages/views/agents/components/tabs/custom-args-tab.tsx+++ b/packages/views/agents/components/tabs/custom-args-tab.tsx@@ -8,6 +8,7 @@ import {Trash2,} from "lucide-react";import type { Agent } from "@multica/core/types";+import { createSafeId } from "@multica/core/utils";import { Button } from "@multica/ui/components/ui/button";import { Input } from "@multica/ui/components/ui/input";import { Label } from "@multica/ui/components/ui/label";@@ -19,7 +20,7 @@ interface ArgEntry {}function argsToEntries(args: string[]): ArgEntry[] {- return args.map((value) => ({ id: crypto.randomUUID(), value }));+ return args.map((value) => ({ id: createSafeId(), value }));}function entriesToArgs(entries: ArgEntry[]): string[] {@@ -43,7 +44,7 @@ export function CustomArgsTab({const dirty = JSON.stringify(currentArgs) !== JSON.stringify(originalArgs);const addEntry = () => {- setEntries([...entries, { id: crypto.randomUUID(), value: "" }]);+ setEntries([...entries, { id: createSafeId(), value: "" }]);};const removeEntry = (index: number) => {