Files
Enterprise-Knowledge-Base/internal/types
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
..
2026-04-15 20:35:48 +08:00
2026-03-30 11:13:44 +08:00
2025-08-05 15:08:07 +08:00
2026-04-10 12:49:20 +08:00
2025-08-05 15:08:07 +08:00
2025-08-05 15:08:07 +08:00
2026-04-10 12:49:20 +08:00
2026-03-30 11:13:44 +08:00