Chunk 8: Per-Query Scope Toggling
Backend: - Add mcpScope?: string[] | null to POST /chat and POST /projects/:projectId/chat - Pass mcpScope to runLLMStream(); filter MCP server tools when scope is set (scopeSet filter applied after open-circuit filter, empty array = no filter) Frontend: - Create useScopeState hook: activeSources, scopeMode (per-message/sticky), toggleSource, clearScope, afterSend, mcpScopePayload - Add mcpScope? field to streamChat() and streamProjectChat() - Create ScopeIndicator component: 'Scope: N sources for this thread' + Clear Tests: - 7 backend unit tests: mcpScope filtering, open-circuit interaction - 12 frontend unit tests: useScopeState hook (toggle, sticky/per-message modes, clearScope, afterSend, mcpScopePayload computation) - All 57 backend tests and 63 frontend tests passing - tsc --noEmit clean Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
| Repository | Gadoes/dispumike |
|---|---|
| Author | Gadoes <62180984+Gadoes@users.noreply.github.com> |
| Authored | |
| Parents | c8e13dac |
| Stats | 8 files changed , +378 , -3 |
| Part of | Source Connections, Picker UI, and Per-Query Scope Toggling |
Capture this commit into my fork
Download a Markdown prompt that tells Claude how to port this
exact commit into your working tree. Run it via
claude -p < capture-commit-64ec30ab.md
from inside the repo you want the change in.