diff --git a/static/src/app/methods/upload.ts b/static/src/app/methods/upload.ts index 54e329e..897f62d 100644 --- a/static/src/app/methods/upload.ts +++ b/static/src/app/methods/upload.ts @@ -125,6 +125,8 @@ export const uploadMethods = { this.inputAddSelectedImage(item.path); this.upsertImageEntry(item.path, item.filename); }); + // 上传完成后自动关闭选择窗口 + this.closeImagePicker(); }, async handleLocalVideoFiles(files) { diff --git a/static/src/components/chat/ChatArea.vue b/static/src/components/chat/ChatArea.vue index cb95b6d..e4bfd3a 100644 --- a/static/src/components/chat/ChatArea.vue +++ b/static/src/components/chat/ChatArea.vue @@ -10,10 +10,14 @@
@@ -430,6 +434,11 @@ function formatImageName(path: string): string { return parts[parts.length - 1] || path; } +function getPreviewUrl(path: string): string { + if (!path) return ''; + return `/api/gui/files/download?path=${encodeURIComponent(path)}`; +} + const isStackable = (action: any) => action && (action.type === 'thinking' || action.type === 'tool'); const isEmptyTextAction = (action: any) => { if (!action || action.type !== 'text') { diff --git a/static/src/components/input/InputComposer.vue b/static/src/components/input/InputComposer.vue index d2a0981..4d047b4 100644 --- a/static/src/components/input/InputComposer.vue +++ b/static/src/components/input/InputComposer.vue @@ -10,19 +10,19 @@ 'has-text': (inputMessage || '').trim().length > 0 }" > - +