incognitolm commited on
Commit ·
aca4793
1
Parent(s): e3076e0
Pasted Content
Browse files- public/js/app.js +2 -2
- public/js/chat.js +2 -0
public/js/app.js
CHANGED
|
@@ -341,7 +341,7 @@ function buildAttachmentItem(a, i) {
|
|
| 341 |
return wrap;
|
| 342 |
}
|
| 343 |
|
| 344 |
-
function renderFilePreviewRow() {
|
| 345 |
const centerRow = document.getElementById('center-file-preview-row');
|
| 346 |
const bottomRow = document.getElementById('file-preview-row');
|
| 347 |
|
|
@@ -354,7 +354,7 @@ function renderFilePreviewRow() {
|
|
| 354 |
});
|
| 355 |
}
|
| 356 |
|
| 357 |
-
function clearFilePreviewRow() {
|
| 358 |
pendingAttachments = [];
|
| 359 |
['center-file-preview-row', 'file-preview-row'].forEach(id => {
|
| 360 |
const row = document.getElementById(id);
|
|
|
|
| 341 |
return wrap;
|
| 342 |
}
|
| 343 |
|
| 344 |
+
export function renderFilePreviewRow() {
|
| 345 |
const centerRow = document.getElementById('center-file-preview-row');
|
| 346 |
const bottomRow = document.getElementById('file-preview-row');
|
| 347 |
|
|
|
|
| 354 |
});
|
| 355 |
}
|
| 356 |
|
| 357 |
+
export function clearFilePreviewRow() {
|
| 358 |
pendingAttachments = [];
|
| 359 |
['center-file-preview-row', 'file-preview-row'].forEach(id => {
|
| 360 |
const row = document.getElementById(id);
|
public/js/chat.js
CHANGED
|
@@ -5,6 +5,7 @@ import {
|
|
| 5 |
renderMarkdown, attachCodeCopyListeners, attachSvgPanelListeners,
|
| 6 |
escHtml, showNotification, autoResize,
|
| 7 |
} from './ui.js';
|
|
|
|
| 8 |
|
| 9 |
let activeSessionId = null;
|
| 10 |
let isStreaming = false;
|
|
@@ -723,6 +724,7 @@ function renderEditFilePreview(attachments, row) {
|
|
| 723 |
wrap.appendChild(rm);
|
| 724 |
row.appendChild(wrap);
|
| 725 |
});
|
|
|
|
| 726 |
}
|
| 727 |
|
| 728 |
function startAssistantEdit(wrap, index, msg) {
|
|
|
|
| 5 |
renderMarkdown, attachCodeCopyListeners, attachSvgPanelListeners,
|
| 6 |
escHtml, showNotification, autoResize,
|
| 7 |
} from './ui.js';
|
| 8 |
+
import { renderFilePreviewRow, clearFilePreviewRow } from './app.js';
|
| 9 |
|
| 10 |
let activeSessionId = null;
|
| 11 |
let isStreaming = false;
|
|
|
|
| 724 |
wrap.appendChild(rm);
|
| 725 |
row.appendChild(wrap);
|
| 726 |
});
|
| 727 |
+
renderFilePreviewRow();
|
| 728 |
}
|
| 729 |
|
| 730 |
function startAssistantEdit(wrap, index, msg) {
|