Atualizar web/chat.js

This commit is contained in:
2026-08-19 23:00:59 -03:00
parent e3f9a8a81f
commit bef4ad67df
+7 -3
View File
@@ -1,5 +1,7 @@
// All comments are in English.
// TODO: window.location = `/api/file/${file_id}/${original_name}`
let conversationId = null;
let conversations = [];
@@ -131,7 +133,9 @@ async function loadHistory() {
chat.appendChild(div);
});
// Load attachments
const a = await fetch(`/api/attachments/${conversationId}`);
const attachments = await a.json();
@@ -177,11 +181,11 @@ async function shareConversation() {
}
function exportMD() {
window.open(`/api/export/md/${conversationId}`, "_blank");
window.open(`/api/export/md/${conversationId}/conversa.md`, "_blank");
}
function exportPDF() {
window.open(`/api/export/pdf/${conversationId}`, "_blank");
window.open(`/api/export/pdf/${conversationId}/conversa.pdf`, "_blank");
}
async function importFile() {