From 7c4aa1c88b2702c4ee10abf8aea342a3a52dd3fc Mon Sep 17 00:00:00 2001 From: Zied Date: Wed, 25 Feb 2026 11:19:01 +0100 Subject: [PATCH] feat: add copy full content button --- web-app/src/pages/SkillDetail.jsx | 34 ++++++++++++++++++++++++------- 1 file changed, 27 insertions(+), 7 deletions(-) diff --git a/web-app/src/pages/SkillDetail.jsx b/web-app/src/pages/SkillDetail.jsx index 4d7c99df..ddc448db 100644 --- a/web-app/src/pages/SkillDetail.jsx +++ b/web-app/src/pages/SkillDetail.jsx @@ -10,6 +10,7 @@ export function SkillDetail() { const [content, setContent] = useState(''); const [loading, setLoading] = useState(true); const [copied, setCopied] = useState(false); + const [copiedFull, setCopiedFull] = useState(false); const [error, setError] = useState(null); const [customContext, setCustomContext] = useState(''); @@ -61,6 +62,16 @@ export function SkillDetail() { setTimeout(() => setCopied(false), 2000); }; + const copyFullToClipboard = () => { + const finalPrompt = customContext.trim() + ? `${content}\n\nContext:\n${customContext}` + : content; + + navigator.clipboard.writeText(finalPrompt); + setCopiedFull(true); + setTimeout(() => setCopiedFull(false), 2000); + }; + if (loading) { return (
@@ -109,13 +120,22 @@ export function SkillDetail() { {skill.description}

- +
+ + +