Question refinement, native web search, citations, streaming#13
Merged
msitarzewski merged 2 commits intomainfrom Mar 8, 2026
Merged
Question refinement, native web search, citations, streaming#13msitarzewski merged 2 commits intomainfrom
msitarzewski merged 2 commits intomainfrom
Conversation
…at fix
- Add pre-consensus question refinement: analyze_question() uses most
expensive model to detect ambiguity, enrich_question() rewrites with
user's clarifications. REST endpoints POST /api/refine + /api/enrich.
Frontend: RefinementPanel with tabbed clarification UI, consensus store
'refining' status, CLI --refine flag.
- Enable tools by default (ToolsConfig.enabled=True). Wire tool_registry
through REST /api/ask and WebSocket /ws/ask paths (was CLI-only).
- Fix tool format: each provider now transforms generic {name, description,
parameters} to its native API format (Anthropic: input_schema, OpenAI/
Mistral/Perplexity: function wrapper, Google: FunctionDeclaration).
- Sidebar: add new-question button (Heroicons pencil-square) + collapsible
sidebar toggle. Brand left, icons right. Desktop sidebar hide/show.
1619 Python tests + 194 Vitest tests passing. Build clean.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
- Native provider web search: Anthropic/Google/Mistral/OpenAI/Perplexity use server-side search instead of DDG proxy, with per-provider citation extraction (url, title, snippet) - Citation persistence: citations_json column on Contribution model, SQLite auto-migration, thread detail API returns citations - Domain-grouped Sources nav: ConsensusNav (live) + ThreadNav (stored) group citations by hostname with nested Disclosure, P/C/R role badges - CitationList shared component for inline citation display - Anthropic streaming: send() uses _collect_stream() internally to avoid 10-minute timeout with high max_tokens - Parallel challenge streaming: _stream_challenges() uses asyncio.as_completed() to send each result to WebSocket immediately - max_tokens bumped 16384 → 32768 across all handlers to prevent citation truncation - Memory bank updated with 3 new ADRs and technical documentation Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
/api/refine,/api/enrich), CLI (--refine), and frontend (RefinementPanelwith tabbed UI, Skip button). Graceful fallback on failure.ModelResponse.citations.citations_jsoncolumn on Contribution model with SQLite auto-migration. Thread detail API returns citations. Domain-grouped Sources nav (ConsensusNav + ThreadNav) with nested Disclosure components and P/C/R role badges.send()uses_collect_stream()internally to avoid 10-minute timeout with high max_tokens. All downstream parsing unchanged._stream_challenges()usesasyncio.as_completed()— each challenger result appears in the UI immediately instead of waiting for all to finish.web_searchwired through CLI, REST, and WebSocket paths.max_tokensbumped 16384 → 32768 across all handlers.Test plan
--refine, verify clarifying questions appear🤖 Generated with Claude Code