Skip to content

feat(chat): add deep search toggle to chat composer - #141

Merged
suguanYang merged 2 commits into
stagingfrom
feat/wangbinqi/chat-use-agentic-toggle
Aug 10, 2026
Merged

feat(chat): add deep search toggle to chat composer#141
suguanYang merged 2 commits into
stagingfrom
feat/wangbinqi/chat-use-agentic-toggle

Conversation

@suguanYang

@suguanYang suguanYang commented Aug 9, 2026

Copy link
Copy Markdown
Contributor

Summary

Adds a Deep search toggle to the chat composer so users can enable or disable agentic retrieval per message. Defaults to on (useAgentic=true).

The toggle state flows from the composer through the chat send path into POST /api/chat, then into the Knowhere retrieval query as useAgentic (SDK param for the API use_agentic field). The hover tooltip explains the tradeoff:

Deep search plans document selection and navigation for more thorough answers. Turn off for faster classic search.

Changes

  • ChatComposer: new Deep search checkbox toggle (checked by default, disabled while sending), tooltip, and onSend now passes { useAgentic }.
  • ChatPanel / WorkspaceShellLayout / chat workflow: thread the send option through to sendChatMessage.
  • POST /api/chat: accepts optional useAgentic (defaults to true server-side), passed into handleChatTurn -> answerQuestionWithRetrieval -> retrieval query params.
  • buildRetrievalQueryParams: replaced the hardcoded useAgentic value with the per-request value (default true).
  • Tests updated/added for the toggle default, tooltip, off-state send, request parsing, workflow body, and retrieval query param assertions.

Verification

  • pnpm typecheck passes.
  • Full pnpm test: 694 passed, 14 skipped.

@vercel

vercel Bot commented Aug 9, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
knowhere-notebook-staging Ready Ready Preview Aug 10, 2026 1:39am
1 Skipped Deployment
Project Deployment Actions Updated (UTC)
knowhere-notebook Ignored Ignored Preview Aug 10, 2026 1:39am

Request Review

@suguanYang suguanYang changed the title feat(chat): add agentic retrieval toggle to chat composer feat(chat): add deep search toggle to chat composer Aug 10, 2026
@suguanYang
suguanYang merged commit 6c5a253 into staging Aug 10, 2026
7 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant