mateclaw/mateclaw-ui/src
倪程伟 22a212a2e6 feat(agent): add wiki_disabled opt-out flag for knowledge bases
Issue #304. Operators who want an agent with NO knowledge base had no
way to express it: leaving the KB picker empty fell through to "inherit
workspace-wide" (every KB visible), so the agent ended up ingesting
every KB's context. This adds the same opt-out toggle that
skills_disabled (V126) / tools_disabled already provide.

Backend:
- V154 migration (h2 + mysql + kingbase): mate_agent.wiki_disabled
  BOOLEAN/TINYINT/SMALLINT NOT NULL DEFAULT FALSE. Legacy agents stay
  bit-identical.
- AgentEntity.wikiDisabled: Boolean field, @TableField("wiki_disabled").
- AgentBindingService.getBoundKbIds: short-circuit at the top —
  wiki_disabled=true returns Set.of() regardless of binding rows. Mirrors
  the precedence contract of getBoundSkillIds vs skills_disabled.
- AgentBindingService.setKbBindings: a non-empty save auto-clears a
  stale wiki_disabled flag (same contract as setSkillBindings /
  setToolBindings on their respective flags). Empty saves leave the flag
  untouched — the UI toggle owns the bit, not the binding writer.
- AgentBindingServiceWikiDisabledTest: 5 cases covering all three
  return states + the stale-flag auto-clear + empty-save no-op.

Frontend:
- Agents.vue KB picker: add the "此智能体不使用任何知识库" /
  "This agent uses no knowledge bases" toggle, mirroring the skills /
  tools picker layout. Tab badge shows "Off" when the toggle is on.
- types/index.ts: add Agent.wikiDisabled?: boolean.
- Save logic: when wikiDisabled is on, send an empty KB list (the
  setKbs contract then leaves the flag alone server-side, exactly as
  setSkills / setTools behave for their opt-out flags).
- i18n (zh + en): new strings for toggle label, hint, badge, and the
  scope description shown when the toggle is on.

Stacked on top of #382 (which introduced AgentBindingResolver
.getBoundKbIds). No agent-runtime changes — wiki tools already degrade
cleanly when getBoundKbIds returns Set.of().
2026-06-20 07:21:07 +08:00
..
api fix(ui): URL-encode conversationId in path segments 2026-06-19 06:20:59 +08:00
assets perf(chat): throttle streaming markdown render and defer chart mounts 2026-06-15 11:39:24 +08:00
components fix(channels): don't gate webchat creation on auto-generated API Key 2026-06-17 23:21:08 +08:00
composables feat(wiki): configurable entity types, type legend filter & theme-aligned graph colors (#336) 2026-06-19 07:18:09 +08:00
i18n feat(agent): add wiki_disabled opt-out flag for knowledge bases 2026-06-20 07:21:07 +08:00
router feat(agent): one-sentence AI employee creation wizard 2026-06-17 17:38:42 +08:00
stores feat(wiki): split KB management vs reading into separate workspace views (#309) 2026-06-10 13:40:57 +08:00
types feat(agent): add wiki_disabled opt-out flag for knowledge bases 2026-06-20 07:21:07 +08:00
utils feat(ui): add the xAI (Grok) provider brand icon 2026-05-18 10:01:05 +08:00
views feat(agent): add wiki_disabled opt-out flag for knowledge bases 2026-06-20 07:21:07 +08:00
App.vue fix(chat): 工具框乱序 + 流式/调试开关失效 + 思考堆积修复 2026-06-09 16:04:41 +08:00
main.ts feat(model3d): Tencent Hunyuan 3D provider — Pro/Rapid action routing + <model-viewer> preview 2026-05-01 22:39:13 +08:00
vite-env.d.ts Initial commit: MateClaw — Java + Vue 3 AI Assistant System 2026-04-04 19:03:49 +08:00