WeKnora/internal/im
wizardchen d199628701 fix(agent): exclude wiki-only KBs from quick-answer (RAG) mode
Quick-answer agent mode retrieves purely through vector/keyword chunk
search and ships with no `allowed_tools`, so the existing capability
filter (which only reads from `allowed_tools`) let wiki-only KBs through
in every entry point. End result: users could @-mention, select, and
receive suggested questions from wiki-only KBs in quick-answer mode,
but the underlying retrieval always returned empty.

Treat "RAG-only" as an implicit property of `agent_mode = quick-answer`
and union it with the tool-derived filter. The same predicate is now
used everywhere the user can pick or be steered toward a KB:

Backend
- `tools.DeriveKBFilterForAgent` / `KBSatisfiesAgentRequirements`
  layer the implicit quick-answer requirement on top of tool derivation.
- `ListKnowledgeBases`, `SearchKnowledge` (shared-agent `@file`),
  `resolveKnowledgeBasesFromAgent` (chat runtime), `/search` IM command,
  and `GetSuggestedQuestions` now all use the agent-mode-aware variant.
- `GetSuggestedQuestions` also skips the wiki-page fallback for
  quick-answer agents to cover the `selected` / explicit-kb-ids paths
  where a wiki-only KB could still slip through.

Frontend
- `deriveKbFilterForAgent` / `kbSatisfiesAgentRequirements` mirror the
  Go helpers.
- `@` mention dropdown (`Input-field.vue`) uses the new helper.
- Agent editor's "specified KB" picker (`AgentEditorModal.vue`) grays
  out wiki-only KBs for quick-answer agents with a tooltip, and the
  pre-save warning fires for quick-answer mode too.
- i18n: add `agentEditor.agentType.kbMismatch.quickAnswer` across all
  four locales.
2026-05-12 16:27:28 +08:00
..
dingtalk refactor(im): move adapter factories into per-platform subpackages 2026-04-29 20:08:22 +08:00
feishu refactor(im): move adapter factories into per-platform subpackages 2026-04-29 20:08:22 +08:00
mattermost refactor(im): move adapter factories into per-platform subpackages 2026-04-29 20:08:22 +08:00
slack refactor(im): move adapter factories into per-platform subpackages 2026-04-29 20:08:22 +08:00
telegram refactor(im): move adapter factories into per-platform subpackages 2026-04-29 20:08:22 +08:00
wechat fix(im): clamp reconnect backoff to avoid int64 overflow → busy loop 2026-05-05 00:36:18 +08:00
wecom fix(im): clamp reconnect backoff to avoid int64 overflow → busy loop 2026-05-05 00:36:18 +08:00
adapter.go feat(im): add WeChat integration with QR code login and long-polling support 2026-04-13 14:17:57 +08:00
cmd_clear.go feat(im): add slash-command system with /help, /info, /search, /stop, /clear 2026-03-20 15:49:59 +08:00
cmd_help.go feat(im): add slash-command system with /help, /info, /search, /stop, /clear 2026-03-20 15:49:59 +08:00
cmd_info.go feat(im): add slash-command system with /help, /info, /search, /stop, /clear 2026-03-20 15:49:59 +08:00
cmd_search.go fix(agent): exclude wiki-only KBs from quick-answer (RAG) mode 2026-05-12 16:27:28 +08:00
cmd_stop.go feat(im): add slash-command system with /help, /info, /search, /stop, /clear 2026-03-20 15:49:59 +08:00
command.go feat(im): add slash-command system with /help, /info, /search, /stop, /clear 2026-03-20 15:49:59 +08:00
command_registry.go feat(im): add slash-command system with /help, /info, /search, /stop, /clear 2026-03-20 15:49:59 +08:00
content_rewrite_test.go fix(im): rewrite private storage URLs to HTTP in IM channel replies 2026-04-30 11:40:30 +08:00
credentials.go refactor(im): move adapter factories into per-platform subpackages 2026-04-29 20:08:22 +08:00
mode.go refactor(im): move adapter factories into per-platform subpackages 2026-04-29 20:08:22 +08:00
qaqueue.go fix(im): rewrite private storage URLs to HTTP in IM channel replies 2026-04-30 11:40:30 +08:00
ratelimit.go feat(im): add multi-instance support with Redis-based distributed coordination 2026-03-20 15:49:59 +08:00
service.go refactor(agent): rebuild multi-turn history from DB, drop llmcontext layer 2026-05-12 12:26:24 +08:00
service_quote_test.go fix(im): anti-hallucination for non-text quotes and unprocessable media messages 2026-04-03 11:34:22 +08:00
session_test.go [NELO-1102] feat(im): add thread-based session mode for IM channels 2026-03-30 10:43:14 +08:00
session_title_test.go fix(sessions): review fixes for keyword search / pinning / IM titles 2026-04-30 16:23:00 +08:00
stream_test.go feat: enhance IM integration with streaming support and documentation 2026-03-16 02:26:17 +08:00
think.go feat(im): add AI card streaming for DingTalk and improve IM platform robustness 2026-03-24 22:12:08 +08:00
types.go feat(im): add WeChat integration with QR code login and long-polling support 2026-04-13 14:17:57 +08:00
types_test.go [NELO-1102] feat(im): add thread-based session mode for IM channels 2026-03-30 10:43:14 +08:00