feat(重构优化):前端 + 后端都需重新构建部署。复测预期:
deploy-hxtesting / build-and-deploy (push) Successful in 1m5s

上传 SOP → 输入框自动出现「翻译」并发送按钮亮起 → 一键发送
翻译完成 → 回复内文件名可点击、产物卡片可下载
产物预览中 sheet 名为英文(Assembly 等)且嵌入图片按原位显示
原件与译文自动入知识库(需已在智能体编辑中勾选知识库),可被问答
This commit is contained in:
runny committed 2026-12-01 07:03:20 +08:00
1 parent 90b843b4e8
commit 10db1be7fa
2 files changed
+28

No files matched your search

+22
View File
@@ -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) => {
@@ -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;