From c32888796ebef2c47ff5f8caffe97b84b3f8124d Mon Sep 17 00:00:00 2001 From: kura Date: Sat, 2 May 2026 00:12:46 +0800 Subject: [PATCH] =?UTF-8?q?=E5=A4=84=E7=90=86=E4=BB=BB=E5=8A=A1=E5=AE=8C?= =?UTF-8?q?=E6=88=90=EF=BC=8C=E8=BF=9B=E5=BA=A6=E6=9D=A1=E5=BC=82=E5=B8=B8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/App.vue | 6 +++--- src/stores/tasks.ts | 6 +++--- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/src/App.vue b/src/App.vue index 53299a3..d855fef 100644 --- a/src/App.vue +++ b/src/App.vue @@ -65,9 +65,9 @@ const defaultModelPaths = ref(null) const translationConfig = ref({ apiBase: localStorage.getItem('llm.apiBase') ?? 'https://open.bigmodel.cn/api/paas/v4', apiKey: localStorage.getItem('llm.apiKey') ?? '', - model: localStorage.getItem('llm.model') ?? 'GLM-4-Flash-250414', - batchSize: Number(localStorage.getItem('llm.batchSize') ?? '12'), - contextSize: Number(localStorage.getItem('llm.contextSize') ?? '3'), + model: localStorage.getItem('llm.model') ?? 'GLM-4.7-Flash', + batchSize: Number(localStorage.getItem('llm.batchSize') ?? '60'), + contextSize: Number(localStorage.getItem('llm.contextSize') ?? '5'), }) const pending = ref(false) const feedback = ref('') diff --git a/src/stores/tasks.ts b/src/stores/tasks.ts index 5b6ab8f..d9b56fb 100644 --- a/src/stores/tasks.ts +++ b/src/stores/tasks.ts @@ -94,9 +94,9 @@ export const useTaskStore = defineStore('tasks', { const doneUnlisten = await listen('task:done', ({ payload }) => { sortSegments(payload.segments) - const index = this.tasks.findIndex((item) => item.id === payload.id) - if (index >= 0) { - this.tasks[index] = payload + const task = this.tasks.find((item) => item.id === payload.id) + if (task) { + Object.assign(task, payload) } else { this.tasks.unshift(payload) }