feat: Enhance agent settings navigation and error handling in UI components

- Introduced a new method to handle navigation to agent settings, improving code organization and reusability.
- Updated tooltip content in the agent mode button to include a link for quick access to agent settings.
- Enhanced error handling in the KnowledgeBase component to provide actionable links for VLM configuration errors.
- Added initial section handling in the KnowledgeBaseEditorModal for improved user experience during knowledge base editing.
This commit is contained in:
wizardchen
2025-11-07 16:40:53 +08:00
parent d387fd672f
commit f30720f99b
10 changed files with 133 additions and 48 deletions
+9 -1
View File
@@ -6,6 +6,7 @@ export const useUIStore = defineStore('ui', {
showKBEditorModal: false,
kbEditorMode: 'create' as 'create' | 'edit',
currentKBId: null as string | null,
kbEditorInitialSection: null as string | null,
settingsInitialSection: null as string | null,
settingsInitialSubSection: null as string | null
}),
@@ -27,21 +28,28 @@ export const useUIStore = defineStore('ui', {
this.showSettingsModal = !this.showSettingsModal
},
openKBSettings(kbId: string) {
openKBSettings(kbId: string, initialSection?: string) {
this.currentKBId = kbId
this.kbEditorMode = 'edit'
this.kbEditorInitialSection = initialSection || null
this.showKBEditorModal = true
},
openEditKB(kbId: string, initialSection?: string) {
this.openKBSettings(kbId, initialSection)
},
openCreateKB() {
this.currentKBId = null
this.kbEditorMode = 'create'
this.kbEditorInitialSection = null
this.showKBEditorModal = true
},
closeKBEditor() {
this.showKBEditorModal = false
this.currentKBId = null
this.kbEditorInitialSection = null
}
}
})