{
- navigator.clipboard.writeText(row.original.model).then(() => {
+ writeTextToClipboard(row.original.model).then(() => {
toast.success(t("common.copied"));
+ }).catch(() => {
+ toast.error(t("common.copyFailed"));
});
}}
>
diff --git a/web/src/feature/model/components/api-doc/ApiDoc.tsx b/web/src/feature/model/components/api-doc/ApiDoc.tsx
index 1a22f823..c20c71ab 100644
--- a/web/src/feature/model/components/api-doc/ApiDoc.tsx
+++ b/web/src/feature/model/components/api-doc/ApiDoc.tsx
@@ -10,6 +10,7 @@ import { useTranslation } from 'react-i18next'
import CodeBlock from './CodeHight'
import { toast } from 'sonner'
import { TFunction } from 'i18next'
+import { writeTextToClipboard } from '@/lib/clipboard'
interface ApiDocContent {
title: string
@@ -1002,7 +1003,7 @@ const ApiDocDrawer: React.FC
= ({ isOpen, onClose, modelConfi