Skip to content

Commit 245abaa

Browse files
committed
webui: add missing messages in export (ggml-org#13552)
1 parent bf9087f commit 245abaa

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

tools/server/webui/src/components/Sidebar.tsx

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -149,14 +149,16 @@ export default function Sidebar() {
149149
navigate('/');
150150
}
151151
}}
152-
onDownload={() => {
152+
onDownload={async () => {
153153
if (isGenerating(conv.id)) {
154154
toast.error(
155155
'Cannot download conversation while generating'
156156
);
157157
return;
158158
}
159-
const conversationJson = JSON.stringify(conv, null, 2);
159+
const msgs = await StorageUtils.getMessages(conv.id);
160+
const dict = { conv: conv, messages: msgs };
161+
const conversationJson = JSON.stringify(dict, null, 2);
160162
const blob = new Blob([conversationJson], {
161163
type: 'application/json',
162164
});

0 commit comments

Comments
 (0)