WeKnora/frontend/src
wizardchen e15adca0a6 fix: Enable wiki_config updates in knowledge base configuration
Implemented three critical fixes to enable wiki_config persistence during
KB creation and updates:

1. Add WikiConfig field to KnowledgeBaseConfig struct
   - File: internal/types/knowledgebase.go
   - Enables JSON unmarshaling of wiki_config from update requests
   - Previously the field was silently dropped during deserialization

2. Update UpdateKnowledgeBase service to persist wiki_config
   - File: internal/application/service/knowledgebase.go
   - Added logic to apply wiki_config changes when config parameter is provided
   - Mirrors existing logic for FAQConfig persistence

3. Update frontend TypeScript types for IDE completion
   - File: frontend/src/api/knowledge-base/index.ts
   - Added WikiConfig type to createKnowledgeBase function signature
   - Added structured WikiConfig type to updateKnowledgeBase config parameter
   - Enables TypeScript IDE autocomplete and type checking

Flow:
- Frontend: updateKnowledgeBase({name, description, config: {wiki_config}})
- Handler: Parses into UpdateKnowledgeBaseRequest via KnowledgeBaseConfig
- Service: Applies wiki_config to KB entity via UpdateKnowledgeBase
- Database: Persists wiki_config JSONB field to postgres

Root cause analysis:
Previously, the KnowledgeBaseConfig struct was missing the WikiConfig field,
causing JSON unmarshaling to silently drop any wiki_config data sent in
PUT requests. KB creation worked because it used the full KnowledgeBase struct.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-22 21:17:20 +08:00
..
api fix: Enable wiki_config updates in knowledge base configuration 2026-04-22 21:17:20 +08:00
assets feat(datasource): add icons and improve data source feedback 2026-03-30 20:46:07 +08:00
components fix(frontend): 修复公式输出展示问题并引入 KaTeX 支持 (#912) 2026-04-22 16:38:24 +08:00
composables feat: implement theme synchronization and loading skeletons across various components, enhancing user experience during content loading 2026-04-11 18:51:16 +08:00
hooks feat(summary): enhance document summarization capabilities and UI 2026-04-02 18:34:39 +08:00
i18n feat: Implement comprehensive wiki feature for knowledge bases 2026-04-22 21:17:18 +08:00
router feat(router): implement auto-setup failure handling for Lite edition 2026-04-15 15:58:01 +08:00
stores Merge upstream main and resolve conflicts 2026-04-14 14:13:00 +08:00
types feat(knowledge): add channel support to knowledge entries and related components 2026-03-25 22:08:29 +08:00
utils fix(frontend): 修复公式输出展示问题并引入 KaTeX 支持 (#912) 2026-04-22 16:38:24 +08:00
views feat: Enhance wiki functionality with recent activity log 2026-04-22 21:17:19 +08:00
wailsjs feat: implement automatic update checking and downloading functionality in the desktop app, enhancing user experience with seamless updates and corresponding UI settings 2026-04-11 18:51:16 +08:00
App.vue feat: implement automatic update checking and downloading functionality in the desktop app, enhancing user experience with seamless updates and corresponding UI settings 2026-04-11 18:51:16 +08:00
main.ts feat: implement theme synchronization and loading skeletons across various components, enhancing user experience during content loading 2026-04-11 18:51:16 +08:00