From 10db1be7fa0df3d47f02c00f79ca546e57421efc Mon Sep 17 00:00:00 2001 From: "DESKTOP-JKIE562\\PC" <1013397054@qq.com> Date: Tue, 1 Dec 2026 07:03:20 +0800 Subject: [PATCH] =?UTF-8?q?feat(=E9=87=8D=E6=9E=84=E4=BC=98=E5=8C=96):?= =?UTF-8?q?=E5=89=8D=E7=AB=AF=20+=20=E5=90=8E=E7=AB=AF=E9=83=BD=E9=9C=80?= =?UTF-8?q?=E9=87=8D=E6=96=B0=E6=9E=84=E5=BB=BA=E9=83=A8=E7=BD=B2=E3=80=82?= =?UTF-8?q?=E5=A4=8D=E6=B5=8B=E9=A2=84=E6=9C=9F=EF=BC=9A=20=E4=B8=8A?= =?UTF-8?q?=E4=BC=A0=20SOP=20=E2=86=92=20=E8=BE=93=E5=85=A5=E6=A1=86?= =?UTF-8?q?=E8=87=AA=E5=8A=A8=E5=87=BA=E7=8E=B0=E3=80=8C=E7=BF=BB=E8=AF=91?= =?UTF-8?q?=E3=80=8D=E5=B9=B6=E5=8F=91=E9=80=81=E6=8C=89=E9=92=AE=E4=BA=AE?= =?UTF-8?q?=E8=B5=B7=20=E2=86=92=20=E4=B8=80=E9=94=AE=E5=8F=91=E9=80=81=20?= =?UTF-8?q?=E7=BF=BB=E8=AF=91=E5=AE=8C=E6=88=90=20=E2=86=92=20=E5=9B=9E?= =?UTF-8?q?=E5=A4=8D=E5=86=85=E6=96=87=E4=BB=B6=E5=90=8D=E5=8F=AF=E7=82=B9?= =?UTF-8?q?=E5=87=BB=E3=80=81=E4=BA=A7=E7=89=A9=E5=8D=A1=E7=89=87=E5=8F=AF?= =?UTF-8?q?=E4=B8=8B=E8=BD=BD=20=E4=BA=A7=E7=89=A9=E9=A2=84=E8=A7=88?= =?UTF-8?q?=E4=B8=AD=20sheet=20=E5=90=8D=E4=B8=BA=E8=8B=B1=E6=96=87?= =?UTF-8?q?=EF=BC=88Assembly=20=E7=AD=89=EF=BC=89=E4=B8=94=E5=B5=8C?= =?UTF-8?q?=E5=85=A5=E5=9B=BE=E7=89=87=E6=8C=89=E5=8E=9F=E4=BD=8D=E6=98=BE?= =?UTF-8?q?=E7=A4=BA=20=E5=8E=9F=E4=BB=B6=E4=B8=8E=E8=AF=91=E6=96=87?= =?UTF-8?q?=E8=87=AA=E5=8A=A8=E5=85=A5=E7=9F=A5=E8=AF=86=E5=BA=93=EF=BC=88?= =?UTF-8?q?=E9=9C=80=E5=B7=B2=E5=9C=A8=E6=99=BA=E8=83=BD=E4=BD=93=E7=BC=96?= =?UTF-8?q?=E8=BE=91=E4=B8=AD=E5=8B=BE=E9=80=89=E7=9F=A5=E8=AF=86=E5=BA=93?= =?UTF-8?q?=EF=BC=89=EF=BC=8C=E5=8F=AF=E8=A2=AB=E9=97=AE=E7=AD=94?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- frontend/src/components/Input-field.vue | 22 ++++++++++++++++++++ frontend/src/components/document-preview.vue | 6 ++++++ 2 files changed, 28 insertions(+) diff --git a/frontend/src/components/Input-field.vue b/frontend/src/components/Input-field.vue index 697db63..20feaf3 100644 --- a/frontend/src/components/Input-field.vue +++ b/frontend/src/components/Input-field.vue @@ -101,6 +101,28 @@ const inputPlaceholder = computed(() => { } return t('input.placeholder'); }); +// SIP translator: a ready workbook auto-fills the default prompt so the +// send button activates immediately — one click starts the translation. +// The fill happens once per attachment set; clearing the input afterwards +// is respected until the attachment set changes again. +const sipAutoFilled = ref(false); +watch( + () => uploadedAttachments.value.map(a => `${a.name}:${a.documentId ?? a.status}`).join('|'), + signature => { + if (selectedAgentId.value !== SIP_TRANSLATOR_AGENT_ID) return; + const items = uploadedAttachments.value; + if (items.length === 0) { + sipAutoFilled.value = false; + return; + } + const ready = items.every(a => a.documentId && a.status !== 'failed'); + if (ready && !sipAutoFilled.value && !query.value.trim()) { + query.value = '翻译'; + sipAutoFilled.value = true; + } + }, +); + const CHAT_FILE_DROP_EVENT = 'academy:chat-file-drop'; const isImageFile = (file: File) => { diff --git a/frontend/src/components/document-preview.vue b/frontend/src/components/document-preview.vue index 6dc79e6..3ce9c1c 100644 --- a/frontend/src/components/document-preview.vue +++ b/frontend/src/components/document-preview.vue @@ -1686,7 +1686,13 @@ onUnmounted(() => { } :deep(.excel-sheet) { + position: relative; padding: 0; + .excel-preview-image { + position: absolute; + border: 1px solid rgba(0, 0, 0, 0.08); + z-index: 5; + } .excel-sheet-name { position: sticky; top: 0;