Skip to content

feat: add chat retrieval controls and summary#492

Open
mtsui-cmyk wants to merge 1 commit into
HKUDS:devfrom
mtsui-cmyk:feat/chat-retrieval-modes
Open

feat: add chat retrieval controls and summary#492
mtsui-cmyk wants to merge 1 commit into
HKUDS:devfrom
mtsui-cmyk:feat/chat-retrieval-modes

Conversation

@mtsui-cmyk
Copy link
Copy Markdown
Contributor

Description

Improve chat retrieval transparency and control.

This PR adds a retrieval summary to assistant responses and introduces explicit retrieval modes for chat when knowledge bases are selected.

Changes

  • Show retrieval summary for chat responses:
    • knowledge base name
    • matched file count
    • retrieved chunk count
  • Add chat retrieval modes:
    • Auto
    • KB
    • KB + Web
    • Off
  • Keep the implementation frontend-scoped by using existing metadata and request snapshot overrides

Related Issues

  • Improves chat retrieval visibility and control

Module(s) Affected

  • web (Frontend)

Checklist

  • I have read and followed the contribution guidelines.
  • My code follows the project's coding standards.
  • I have run pre-commit run --all-files and fixed any issues.
  • I have run relevant validation for the touched files.
  • I have added relevant tests for my changes.
  • I have updated the documentation (if necessary).
  • My changes do not introduce any new security vulnerabilities.

Validation

  • node ./scripts/run-node-tests.mjs tests/retrieval-summary.test.ts tests/chat-retrieval-mode.test.ts
  • npx eslint app/'(workspace)'/chat/'[[...sessionId]]'/page.tsx components/chat/home/ChatComposer.tsx components/chat/home/ChatMessages.tsx lib/retrieval-summary.ts lib/chat-retrieval-mode.ts tests/retrieval-summary.test.ts tests/chat-retrieval-mode.test.ts

@mtsui-cmyk mtsui-cmyk changed the base branch from main to dev May 19, 2026 03:42
@mtsui-cmyk mtsui-cmyk force-pushed the feat/chat-retrieval-modes branch from 7bd97bf to f490f59 Compare May 19, 2026 12:20
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