diff --git a/src/components/settings/acp-agent-settings.tsx b/src/components/settings/acp-agent-settings.tsx index 6133ad4..203f0fd 100644 --- a/src/components/settings/acp-agent-settings.tsx +++ b/src/components/settings/acp-agent-settings.tsx @@ -64,7 +64,7 @@ import { ComboboxLabel, ComboboxList, } from "@/components/ui/combobox" -import { cn } from "@/lib/utils" +import { cn, randomUUID } from "@/lib/utils" import { acpClearBinaryCache, acpDetectAgentLocalVersion, @@ -3052,7 +3052,7 @@ export function AcpAgentSettings() { [agent.agent_type]: kind ?? (mode === "download" ? "download_binary" : "upgrade_binary"), })) - const taskId = crypto.randomUUID() + const taskId = randomUUID() setStreamAgentType(agent.agent_type) await installStream.start(taskId) try { @@ -3118,7 +3118,7 @@ export function AcpAgentSettings() { ...prev, [agent.agent_type]: mode === "install" ? "install_npx" : "upgrade_npx", })) - const taskId = crypto.randomUUID() + const taskId = randomUUID() setStreamAgentType(agent.agent_type) await installStream.start(taskId) try { @@ -3198,7 +3198,7 @@ export function AcpAgentSettings() { ? "uninstall_binary" : "uninstall_npx", })) - const taskId = crypto.randomUUID() + const taskId = randomUUID() setStreamAgentType(agent.agent_type) await installStream.start(taskId) try { diff --git a/src/components/settings/opencode-plugins-modal.tsx b/src/components/settings/opencode-plugins-modal.tsx index a68bd07..d85c1e1 100644 --- a/src/components/settings/opencode-plugins-modal.tsx +++ b/src/components/settings/opencode-plugins-modal.tsx @@ -17,6 +17,7 @@ import { opencodeUninstallPlugin, } from "@/lib/api" import { usePluginInstallStream } from "@/hooks/use-plugin-install-stream" +import { randomUUID } from "@/lib/utils" import type { PluginCheckSummary, PluginInfo } from "@/lib/types" interface OpencodePluginsModalProps { @@ -74,7 +75,7 @@ export function OpencodePluginsModal({ }, [stream.status]) const handleInstallAll = useCallback(async () => { - const taskId = crypto.randomUUID() + const taskId = randomUUID() await stream.start(taskId) try { await opencodeInstallPlugins(taskId) @@ -85,7 +86,7 @@ export function OpencodePluginsModal({ const handleInstallOne = useCallback( async (name: string) => { - const taskId = crypto.randomUUID() + const taskId = randomUUID() await stream.start(taskId) try { await opencodeInstallPlugins(taskId, [name])