WeKnora/internal
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
..
agent feat: Enhance wiki functionality with recent activity log 2026-04-22 21:17:19 +08:00
application fix: Enable wiki_config updates in knowledge base configuration 2026-04-22 21:17:20 +08:00
assets feat(assets): add ASR test audio file and embed it in the application 2026-04-02 21:27:27 +08:00
common feat: add organization management features 2026-02-09 11:40:25 +08:00
config feat(agent): support customizable LLM call timeout and add docker-compose mapping 2026-04-07 11:26:52 +08:00
container feat: Implement comprehensive wiki feature for knowledge bases 2026-04-22 21:17:18 +08:00
database fix: update environment configuration for debugging and logging, enhance SQLite FTS5 table management, and improve API base URL handling 2026-04-11 18:51:16 +08:00
datasource fix(feishu): truncate sanitized filenames at UTF-8 rune boundary 2026-04-22 16:39:55 +08:00
errors feat: Add agent configuration and cleanup scripts for database migrations 2025-11-05 23:18:44 +08:00
event refactor(agent): remove query display from DatabaseQuery component and update tool result structure 2026-03-25 22:08:29 +08:00
handler feat: Implement comprehensive wiki feature for knowledge bases 2026-04-22 21:17:18 +08:00
im feat(im): support custom endpoints for private WeCom deployments 2026-04-13 22:54:42 +08:00
infrastructure feat: search engine adds proxy addresses and adds SSRF verification. 2026-04-17 16:38:02 +08:00
logger feat(datasource): add Yuque (语雀) connector 2026-04-22 16:39:55 +08:00
mcp feat(mcp): implement reconnection logic for MCP tool calls and tool listing 2026-03-31 11:57:15 +08:00
middleware fix: use constant-time comparison for API key validation 2026-04-19 21:41:22 +08:00
models fix: ReadEvent incompatible sse data format 2026-04-20 22:29:38 +08:00
router feat: Implement comprehensive wiki feature for knowledge bases 2026-04-22 21:17:18 +08:00
runtime init commit 2025-08-05 15:08:07 +08:00
sandbox feat: optimize security and deployment of agent skills 2026-02-04 20:08:49 +08:00
searchutil feat(prompt): enhance question rewriting and intent classification in prompt templates 2026-04-16 23:15:02 +08:00
stream feat(redis): add REDIS_USERNAME support for Redis ACL 2026-02-04 19:38:40 +08:00
tracing init commit 2025-08-05 15:08:07 +08:00
types fix: Enable wiki_config updates in knowledge base configuration 2026-04-22 21:17:20 +08:00
utils fix(storage): auto-detect content-type to resolve image rendering issues 2026-04-20 21:59:54 +08:00