diff --git a/tools/server/webui/src/components/Sidebar.tsx b/tools/server/webui/src/components/Sidebar.tsx index b52a8df03c969..f5b8cb8504086 100644 --- a/tools/server/webui/src/components/Sidebar.tsx +++ b/tools/server/webui/src/components/Sidebar.tsx @@ -149,14 +149,16 @@ export default function Sidebar() { navigate('/'); } }} - onDownload={() => { + onDownload={async () => { if (isGenerating(conv.id)) { toast.error( 'Cannot download conversation while generating' ); return; } - const conversationJson = JSON.stringify(conv, null, 2); + const msgs = await StorageUtils.getMessages(conv.id); + const dict = { conv: conv, messages: msgs }; + const conversationJson = JSON.stringify(dict, null, 2); const blob = new Blob([conversationJson], { type: 'application/json', });