WS2: legislation research UI - tool chips, citation pills, LegislationPanel
- shared/types.ts: legislation_tool_call AssistantEvent variant; LegislationCitationAnnotation; CitationAnnotation re-widened to a union with kind-guards in getDocumentCitationQuotes/expandCitationToEntries/ formatCitationPage/displayCitationQuote. - useAssistantChat.ts: legislation_tool_start/result via the MCP start/result pairing pattern. - AssistantMessage.tsx: extract the inline mcp_tool_call chip JSX into a shared ToolCallChip (reused, not cloned) and add the legislation_tool_call branch (amber "outstanding amendments" note on flagged results); toolCallLabel gains the three legislation tool names; citation-source helpers (key/label/icon) branch on kind (Landmark icon for legislation). - New LegislationPanel.tsx: provision heading/text/extent, canonical legislation.gov.uk link, prominent amber banner when a lookup reported outstanding effects. Degrades honestly (no fabricated "all clear") when opened from a citation pill that only carries title/url/quote. - AssistantSidePanel.tsx: new LegislationTab kind (no documentId, doesn't extend CommonTab). ChatView.tsx: openLegislation dedupes tabs by URL (bypasses upsertTab's document-keyed dedupe); openCitation branches on citation.kind. - projects/[id]/assistant/chat/[chatId]/page.tsx (a second, simpler project-chat surface outside the frontend seam map's scope, no LegislationPanel there): falls back to opening the canonical legislation.gov.uk link for a legislation citation instead of erroring. tsc --noEmit clean; eslint 112 problems (35/77), identical to base commit and zero findings in any file touched here. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
| Repository | Sloth-ninja/JessicaOSS |
|---|---|
| Author | sloth-ninja <ezanahaddis@gmail.com> |
| Authored | |
| Committed | |
| Parents | 02358fb4 |
| Stats | 7 files changed , +431 , -40 |
| Part of | WS2 / WS7: legislation.gov.uk research integration |
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-14dbda68.md
from inside the repo you want the change in.