Merge branch 'main' of https://github.com/xerrors/Yuxi-Know
This commit is contained in:
commit
982d83da11
@ -61,6 +61,7 @@ dependencies = [
|
|||||||
"tomli-w",
|
"tomli-w",
|
||||||
"aiofiles>=24.1.0",
|
"aiofiles>=24.1.0",
|
||||||
"aiohttp>=3.9.0",
|
"aiohttp>=3.9.0",
|
||||||
|
"chardet>=5.0.0",
|
||||||
"deepagents>=0.2.5",
|
"deepagents>=0.2.5",
|
||||||
"json-repair>=0.54.0",
|
"json-repair>=0.54.0",
|
||||||
"openpyxl>=3.1.5",
|
"openpyxl>=3.1.5",
|
||||||
|
|||||||
@ -33,6 +33,7 @@
|
|||||||
"markmap-view": "^0.18.12",
|
"markmap-view": "^0.18.12",
|
||||||
"md-editor-v3": "^5.8.4",
|
"md-editor-v3": "^5.8.4",
|
||||||
"pinia": "^3.0.3",
|
"pinia": "^3.0.3",
|
||||||
|
"pinia-plugin-persistedstate": "^4.7.1",
|
||||||
"sigma": "^3.0.2",
|
"sigma": "^3.0.2",
|
||||||
"vue": "^3.5.21",
|
"vue": "^3.5.21",
|
||||||
"vue-router": "^4.5.1"
|
"vue-router": "^4.5.1"
|
||||||
|
|||||||
@ -71,6 +71,9 @@ importers:
|
|||||||
pinia:
|
pinia:
|
||||||
specifier: ^3.0.3
|
specifier: ^3.0.3
|
||||||
version: 3.0.3(vue@3.5.21)
|
version: 3.0.3(vue@3.5.21)
|
||||||
|
pinia-plugin-persistedstate:
|
||||||
|
specifier: ^4.7.1
|
||||||
|
version: 4.7.1(pinia@3.0.3(vue@3.5.21))
|
||||||
sigma:
|
sigma:
|
||||||
specifier: ^3.0.2
|
specifier: ^3.0.2
|
||||||
version: 3.0.2(graphology-types@0.24.8)
|
version: 3.0.2(graphology-types@0.24.8)
|
||||||
@ -1294,6 +1297,9 @@ packages:
|
|||||||
deep-is@0.1.4:
|
deep-is@0.1.4:
|
||||||
resolution: {integrity: sha512-oIPzksmTg4/MriiaYGO+okXDT7ztn/w3Eptv/+gSIdMdKsJo0u4CfYNFJPy+4SKMuCqGw2wxnA+URMg3t8a/bQ==}
|
resolution: {integrity: sha512-oIPzksmTg4/MriiaYGO+okXDT7ztn/w3Eptv/+gSIdMdKsJo0u4CfYNFJPy+4SKMuCqGw2wxnA+URMg3t8a/bQ==}
|
||||||
|
|
||||||
|
defu@6.1.4:
|
||||||
|
resolution: {integrity: sha512-mEQCMmwJu317oSz8CwdIOdwf3xMif1ttiM8LTufzc3g6kR+9Pe236twL8j3IYT1F7GfRgGcW6MWxzZjLIkuHIg==}
|
||||||
|
|
||||||
delaunator@5.0.1:
|
delaunator@5.0.1:
|
||||||
resolution: {integrity: sha512-8nvh+XBe96aCESrGOqMp/84b13H9cdKbG5P2ejQCh4d4sK9RL4371qou9drQjMhvnPmhWl5hnmqbEE0fXr9Xnw==}
|
resolution: {integrity: sha512-8nvh+XBe96aCESrGOqMp/84b13H9cdKbG5P2ejQCh4d4sK9RL4371qou9drQjMhvnPmhWl5hnmqbEE0fXr9Xnw==}
|
||||||
|
|
||||||
@ -1909,6 +1915,20 @@ packages:
|
|||||||
resolution: {integrity: sha512-uB80kBFb/tfd68bVleG9T5GGsGPjJrLAUpR5PZIrhBnIaRTQRjqdJSsIKkOP6OAIFbj7GOrcudc5pNjZ+geV2g==}
|
resolution: {integrity: sha512-uB80kBFb/tfd68bVleG9T5GGsGPjJrLAUpR5PZIrhBnIaRTQRjqdJSsIKkOP6OAIFbj7GOrcudc5pNjZ+geV2g==}
|
||||||
engines: {node: '>=6'}
|
engines: {node: '>=6'}
|
||||||
|
|
||||||
|
pinia-plugin-persistedstate@4.7.1:
|
||||||
|
resolution: {integrity: sha512-WHOqh2esDlR3eAaknPbqXrkkj0D24h8shrDPqysgCFR6ghqP/fpFfJmMPJp0gETHsvrh9YNNg6dQfo2OEtDnIQ==}
|
||||||
|
peerDependencies:
|
||||||
|
'@nuxt/kit': '>=3.0.0'
|
||||||
|
'@pinia/nuxt': '>=0.10.0'
|
||||||
|
pinia: '>=3.0.0'
|
||||||
|
peerDependenciesMeta:
|
||||||
|
'@nuxt/kit':
|
||||||
|
optional: true
|
||||||
|
'@pinia/nuxt':
|
||||||
|
optional: true
|
||||||
|
pinia:
|
||||||
|
optional: true
|
||||||
|
|
||||||
pinia@3.0.3:
|
pinia@3.0.3:
|
||||||
resolution: {integrity: sha512-ttXO/InUULUXkMHpTdp9Fj4hLpD/2AoJdmAbAeW2yu1iy1k+pkFekQXw5VpC0/5p51IOR/jDaDRfRWRnMMsGOA==}
|
resolution: {integrity: sha512-ttXO/InUULUXkMHpTdp9Fj4hLpD/2AoJdmAbAeW2yu1iy1k+pkFekQXw5VpC0/5p51IOR/jDaDRfRWRnMMsGOA==}
|
||||||
peerDependencies:
|
peerDependencies:
|
||||||
@ -3781,6 +3801,8 @@ snapshots:
|
|||||||
|
|
||||||
deep-is@0.1.4: {}
|
deep-is@0.1.4: {}
|
||||||
|
|
||||||
|
defu@6.1.4: {}
|
||||||
|
|
||||||
delaunator@5.0.1:
|
delaunator@5.0.1:
|
||||||
dependencies:
|
dependencies:
|
||||||
robust-predicates: 3.0.2
|
robust-predicates: 3.0.2
|
||||||
@ -4428,6 +4450,12 @@ snapshots:
|
|||||||
pify@4.0.1:
|
pify@4.0.1:
|
||||||
optional: true
|
optional: true
|
||||||
|
|
||||||
|
pinia-plugin-persistedstate@4.7.1(pinia@3.0.3(vue@3.5.21)):
|
||||||
|
dependencies:
|
||||||
|
defu: 6.1.4
|
||||||
|
optionalDependencies:
|
||||||
|
pinia: 3.0.3(vue@3.5.21)
|
||||||
|
|
||||||
pinia@3.0.3(vue@3.5.21):
|
pinia@3.0.3(vue@3.5.21):
|
||||||
dependencies:
|
dependencies:
|
||||||
'@vue/devtools-api': 7.7.7
|
'@vue/devtools-api': 7.7.7
|
||||||
|
|||||||
@ -1,5 +1,6 @@
|
|||||||
import { createApp } from 'vue'
|
import { createApp } from 'vue'
|
||||||
import { createPinia } from 'pinia'
|
import { createPinia } from 'pinia'
|
||||||
|
import piniaPluginPersistedstate from 'pinia-plugin-persistedstate'
|
||||||
|
|
||||||
import App from './App.vue'
|
import App from './App.vue'
|
||||||
import router from './router'
|
import router from './router'
|
||||||
@ -10,6 +11,7 @@ import '@/assets/css/main.css'
|
|||||||
|
|
||||||
const app = createApp(App)
|
const app = createApp(App)
|
||||||
const pinia = createPinia()
|
const pinia = createPinia()
|
||||||
|
pinia.use(piniaPluginPersistedstate)
|
||||||
|
|
||||||
app.use(pinia)
|
app.use(pinia)
|
||||||
app.use(router)
|
app.use(router)
|
||||||
|
|||||||
@ -87,8 +87,8 @@ export const useAgentStore = defineStore('agent', () => {
|
|||||||
await fetchAgents()
|
await fetchAgents()
|
||||||
await fetchDefaultAgent()
|
await fetchDefaultAgent()
|
||||||
|
|
||||||
if (!selectedAgentId.value || !agents.value.find(a => a.id === selectedAgentId.value)) {
|
if (!selectedAgent.value) {
|
||||||
if (defaultAgentId.value && agents.value.find(a => a.id === defaultAgentId.value)) {
|
if (defaultAgent.value) {
|
||||||
await selectAgent(defaultAgentId.value)
|
await selectAgent(defaultAgentId.value)
|
||||||
} else if (agents.value.length > 0) {
|
} else if (agents.value.length > 0) {
|
||||||
const firstAgentId = agents.value[0].id
|
const firstAgentId = agents.value[0].id
|
||||||
@ -356,6 +356,6 @@ export const useAgentStore = defineStore('agent', () => {
|
|||||||
persist: {
|
persist: {
|
||||||
key: 'agent-store',
|
key: 'agent-store',
|
||||||
storage: localStorage,
|
storage: localStorage,
|
||||||
paths: ['selectedAgentId', 'defaultAgentId']
|
pick: ['selectedAgentId']
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user