Atualizar web/chat.js
This commit is contained in:
+7
-3
@@ -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() {
|
||||
|
||||
Reference in New Issue
Block a user