From f0ddc62b1aa82f9cc0de24d3c723c3d2fc246574 Mon Sep 17 00:00:00 2001 From: Junki Date: Wed, 24 Apr 2024 10:44:16 +0800 Subject: [PATCH] =?UTF-8?q?=E6=94=AF=E6=8C=81=E9=80=9A=E7=94=A8=E5=AF=B9?= =?UTF-8?q?=E8=AF=9D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- package.json | 4 ++-- src/renderer/src/store/assistant.ts | 5 ++++- yarn.lock | 16 ++++++++-------- 3 files changed, 14 insertions(+), 11 deletions(-) diff --git a/package.json b/package.json index 3c6ddc6..9cb3df5 100644 --- a/package.json +++ b/package.json @@ -31,7 +31,7 @@ "@electron-toolkit/utils": "^3.0.0", "@langchain/redis": "^0.0.3", "electron-store": "^8.2.0", - "langchain": "^0.1.34", + "langchain": "^0.1.35", "mammoth": "^1.7.1", "officeparser": "^4.0.8", "pdf-parse": "^1.1.1", @@ -62,7 +62,7 @@ "dayjs": "^1.11.10", "electron": "^30.0.1", "electron-builder": "^24.13.3", - "electron-vite": "^2.1.0", + "electron-vite": "^2.2.0", "eslint": "^8.57.0", "eslint-plugin-vue": "^9.25.0", "gpt-tokenizer": "^2.1.2", diff --git a/src/renderer/src/store/assistant.ts b/src/renderer/src/store/assistant.ts index 5c0dd20..dfb4edf 100644 --- a/src/renderer/src/store/assistant.ts +++ b/src/renderer/src/store/assistant.ts @@ -1,9 +1,12 @@ +import i18n from '@renderer/i18n' import { defaultAssistant } from '@renderer/utils/big-model/base-util' import { nowTimestamp } from '@renderer/utils/date-util' import { randomUUID } from '@renderer/utils/id-util' import { copyObj } from '@renderer/utils/object-util' import { defineStore } from 'pinia' +const { t } = i18n.global + export const useAssistantStore = defineStore({ id: 'assistant', state: () => ({ @@ -23,7 +26,7 @@ export const useAssistantStore = defineStore({ virtualAssistantList: [ { ...copyObj(defaultAssistant), - name: '', + name: t('assistantList.newChat'), id: randomUUID(), createTime: nowTimestamp(), lastUpdateTime: nowTimestamp(), diff --git a/yarn.lock b/yarn.lock index cf1626c..7b9117f 100644 --- a/yarn.lock +++ b/yarn.lock @@ -2717,10 +2717,10 @@ electron-to-chromium@^1.4.601: resolved "https://registry.npmmirror.com/electron-to-chromium/-/electron-to-chromium-1.4.617.tgz#3b0dde6c54e5f0f26db75ce6c6ae751e5df4bf75" integrity sha512-sYNE3QxcDS4ANW1k4S/wWYMXjCVcFSOX3Bg8jpuMFaXt/x8JCmp0R1Xe1ZXDX4WXnSRBf+GJ/3eGWicUuQq5cg== -electron-vite@^2.1.0: - version "2.1.0" - resolved "https://registry.npmmirror.com/electron-vite/-/electron-vite-2.1.0.tgz#33908c3b9c90bcab5c5f4c0f6c483263303cc5aa" - integrity sha512-DjToUW6q3ILoW79b1yBywC6LubnOw5Axr2zo9cHMlYf00zAO8oVzrCcqinJQTTbJLvqCuVcBzuICMl5MYshUnQ== +electron-vite@^2.2.0: + version "2.2.0" + resolved "https://registry.npmmirror.com/electron-vite/-/electron-vite-2.2.0.tgz#52976a71606afce2b2cf2b7489547db6bc3a1ea1" + integrity sha512-WvE8KlZTiay9uWqBRvnYuxg2JqIicaNqaz9qFvsZkIae2/FmqZC5jctziyduCuuwVxqJG0Sjh8RlTwSn8xcCoQ== dependencies: "@babel/core" "^7.23.5" "@babel/plugin-transform-arrow-functions" "^7.23.3" @@ -3868,10 +3868,10 @@ kuler@^2.0.0: resolved "https://registry.npmmirror.com/kuler/-/kuler-2.0.0.tgz#e2c570a3800388fb44407e851531c1d670b061b3" integrity sha512-Xq9nH7KlWZmXAtodXDDRE7vs6DU1gTU8zYDHDiWLSip45Egwq3plLHzPn27NgvzL2r1LMPC1vdqh98sQxtqj4A== -langchain@^0.1.34: - version "0.1.34" - resolved "https://registry.npmmirror.com/langchain/-/langchain-0.1.34.tgz#3c28a6bde69c5f4ac3931376d34187de0e44e43a" - integrity sha512-4TVH2mzhITrLPOeyfGucfqo1+360DJMl4+ItG56ApxVY1krO4hV0EkqcRLAxW06W6sIue8mIU70WbyhBYH68Ug== +langchain@^0.1.35: + version "0.1.35" + resolved "https://registry.npmmirror.com/langchain/-/langchain-0.1.35.tgz#6ee22c140201597d7983f3f12c75a3c6f16cbc0c" + integrity sha512-wTaTNzaAPb/umcoWxFupc0QGsEJvPB6pRE8Ecy8v4CCsn/a5O6QpfRylvJKXXWoxGG8BI4L3G+HjsXCDUNxVrQ== dependencies: "@anthropic-ai/sdk" "^0.9.1" "@langchain/community" "~0.0.47"