WeKnora/frontend/src/api
Claude 6864a9f9e2 feat(frontend): chunking debug panel with live preview
Adds a collapsible "Test with sample text" panel underneath the
chunking settings in the KB editor. Users paste a Markdown / plain-text
snippet, hit "Run preview", and see exactly how the current chunking
configuration would split it — without re-uploading any document.

The panel calls POST /api/v1/chunker/preview and renders:
- Selected tier (heading / heuristic / recursive / legacy) as a tag,
  with a warning when the chain fell through to legacy fallback
- Rejected tiers + reasons (so users see why "auto" picked tier X)
- DocProfile stats grid: lines, chars, headings, page-breaks,
  chapter markers, detected languages
- Chunk-size summary: count / avg / stddev / min / max
- Per-chunk cards with seq, size (chars + ~tokens), position range,
  context header (when set), content preview (expand/collapse)

The panel reads its config from the live form state so edits to
strategy / chunk-size / overlap / etc. are reflected on the next
preview run — no save needed.

Pieces:
- types/chunker.ts: TS types mirroring the backend response shape
- api/chunker/index.ts: previewChunking(body) wrapper
- views/knowledge/settings/KBChunkingDebug.vue: the panel component
- KBChunkingSettings.vue: embeds the panel + exposes a debugConfig
  computed prop
- i18n keys for en-US / zh-CN / ko-KR / ru-RU (8 keys each)

https://claude.ai/code/session_01XADhx6mtu2ZYW3DE9Lun6k
2026-05-06 17:17:07 +08:00
..
agent feat(im): tenant-wide IM channels overview under the user menu 2026-04-30 15:29:14 +08:00
auth fix oidc auth login 2026-05-05 00:21:41 +08:00
chat fix(sessions): review fixes for keyword search / pinning / IM titles 2026-04-30 16:23:00 +08:00
chunker feat(frontend): chunking debug panel with live preview 2026-05-06 17:17:07 +08:00
datasource feat(frontend): tree view resource selector with cascading selection 2026-04-08 16:31:25 +08:00
initialization feat(frontend): expose chunking strategy in KB editor 2026-05-06 17:17:07 +08:00
knowledge-base feat(knowledge-base): add document batch delete and list view 2026-04-29 12:01:38 +08:00
model feat(models): support custom HTTP headers across all remote model calls 2026-04-23 23:36:40 +08:00
organization feat(api): integrate per-organization resource counts into organization listing 2026-02-09 11:40:25 +08:00
skill feat: enhance agent skills sandbox configuration and availability 2026-02-04 20:58:24 +08:00
system feat(ks3): add KS3 object storage support 2026-05-05 00:22:27 +08:00
tenant feat(tenant): expose API Key reset from the API Info page 2026-04-29 20:07:38 +08:00
wiki feat: Enhance wiki API and repository with slug encoding and improved search functionality 2026-04-22 21:18:09 +08:00
chat-history.ts feat: implement chat history and retrieval settings 2026-03-09 11:46:56 +08:00
mcp-service.ts feat: add built-in MCP service support 2026-03-05 21:57:01 +08:00
retrieval.ts feat: implement chat history and retrieval settings 2026-03-09 11:46:56 +08:00
vector-store.ts feat: add VectorStore management UI settings page 2026-04-17 21:51:25 +08:00
web-search-provider.ts feat: search engine adds proxy addresses and adds SSRF verification. 2026-04-17 16:38:02 +08:00
web-search.ts feat(web-search): refactor web search provider 2026-03-31 20:22:34 +08:00