From 60728978e143b5c8562d9e19380e53f3e56e4b2f Mon Sep 17 00:00:00 2001 From: Aaron Nelson Date: Wed, 29 Apr 2026 17:28:04 +0000 Subject: [PATCH] add copy conversation to clipboard button in settings --- components/SettingsPanel.tsx | 19 +++++++++++++++++-- 1 file changed, 17 insertions(+), 2 deletions(-) diff --git a/components/SettingsPanel.tsx b/components/SettingsPanel.tsx index 9f3f423..8f2e02f 100644 --- a/components/SettingsPanel.tsx +++ b/components/SettingsPanel.tsx @@ -85,6 +85,18 @@ export default function SettingsPanel() { a.click(); } + async function copyConversation() { + const messages = useStore.getState().messages; + if (!messages.length) { alert('No messages to copy.'); return; } + let md = `# Conversation Export\n\nExported: ${new Date().toLocaleString()}\n\n---\n\n`; + messages.forEach(m => { + md += `**${m.role === 'user' ? 'You' : 'Aaron AI'}**\n\n${m.content}\n\n`; + if (m.sources?.length) md += `*Sources: ${m.sources.join(', ')}*\n\n`; + md += '---\n\n'; + }); + await navigator.clipboard.writeText(md); + } + async function logout() { await auth.logout(); window.location.href = '/login'; @@ -218,8 +230,11 @@ export default function SettingsPanel() { {status?.conversation_count || 0} - - Export + +
+ Export + Copy +
Clear