Atualizar web/chat.js
This commit is contained in:
+7
-3
@@ -1,5 +1,7 @@
|
|||||||
// All comments are in English.
|
// All comments are in English.
|
||||||
|
|
||||||
|
// TODO: window.location = `/api/file/${file_id}/${original_name}`
|
||||||
|
|
||||||
let conversationId = null;
|
let conversationId = null;
|
||||||
let conversations = [];
|
let conversations = [];
|
||||||
|
|
||||||
@@ -131,7 +133,9 @@ async function loadHistory() {
|
|||||||
chat.appendChild(div);
|
chat.appendChild(div);
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
// Load attachments
|
// Load attachments
|
||||||
const a = await fetch(`/api/attachments/${conversationId}`);
|
const a = await fetch(`/api/attachments/${conversationId}`);
|
||||||
const attachments = await a.json();
|
const attachments = await a.json();
|
||||||
@@ -177,11 +181,11 @@ async function shareConversation() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
function exportMD() {
|
function exportMD() {
|
||||||
window.open(`/api/export/md/${conversationId}`, "_blank");
|
window.open(`/api/export/md/${conversationId}/conversa.md`, "_blank");
|
||||||
}
|
}
|
||||||
|
|
||||||
function exportPDF() {
|
function exportPDF() {
|
||||||
window.open(`/api/export/pdf/${conversationId}`, "_blank");
|
window.open(`/api/export/pdf/${conversationId}/conversa.pdf`, "_blank");
|
||||||
}
|
}
|
||||||
|
|
||||||
async function importFile() {
|
async function importFile() {
|
||||||
|
|||||||
Reference in New Issue
Block a user