Skip to content

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

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

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

Conversation

@suguanYang

@suguanYang suguanYang commented Aug 9, 2026

Copy link
Copy Markdown
Contributor

Summary

Cherry-pick of the Deep search toggle (PR #141, targeting staging) onto main, resolved for the older main history.

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

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.

Cherry-pick notes

Conflicts were limited to chat-domain files because main is older than staging. Resolved by keeping main version where staging-only features (Knowhere tool runtime, knowledge/remote-document tests) do not exist, and applying only this feature delta.

Verification

  • pnpm typecheck passes.
  • Full pnpm test on this branch: 592 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 d6fda94 into main 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