diff --git a/frontend/src/components/workspace/copy-button.tsx b/frontend/src/components/workspace/copy-button.tsx index b279a56b..13d331b5 100644 --- a/frontend/src/components/workspace/copy-button.tsx +++ b/frontend/src/components/workspace/copy-button.tsx @@ -3,7 +3,6 @@ import { useCallback, useState, type ComponentProps } from "react"; import { Button } from "@/components/ui/button"; import { useI18n } from "@/core/i18n/hooks"; -import { copyToClipboard } from "@/lib/utils"; import { Tooltip } from "./tooltip"; @@ -16,7 +15,7 @@ export function CopyButton({ const { t } = useI18n(); const [copied, setCopied] = useState(false); const handleCopy = useCallback(() => { - void copyToClipboard(clipboardData); + void navigator.clipboard.writeText(clipboardData); setCopied(true); setTimeout(() => setCopied(false), 2000); }, [clipboardData]); diff --git a/frontend/src/components/workspace/recent-chat-list.tsx b/frontend/src/components/workspace/recent-chat-list.tsx index 90deff47..09f0b343 100644 --- a/frontend/src/components/workspace/recent-chat-list.tsx +++ b/frontend/src/components/workspace/recent-chat-list.tsx @@ -56,7 +56,6 @@ import { import type { AgentThread, AgentThreadState } from "@/core/threads/types"; import { pathOfThread, titleOfThread } from "@/core/threads/utils"; import { env } from "@/env"; -import { copyToClipboard } from "@/lib/utils"; export function RecentChatList() { const { t } = useI18n(); @@ -120,7 +119,7 @@ export function RecentChatList() { const baseUrl = isLocalhost ? VERCEL_URL : window.location.origin; const shareUrl = `${baseUrl}/workspace/chats/${threadId}`; try { - await copyToClipboard(shareUrl); + await navigator.clipboard.writeText(shareUrl); toast.success(t.clipboard.linkCopied); } catch { toast.error(t.clipboard.failedToCopyToClipboard);