Spaces:
Sleeping
Sleeping
Commit History
-
citations: space before the link, and a hover preview card
The model writes the marker straight onto the preceding word, so linking it produced "Self-Defence Forcesen.wikipedia.org". A space is now inserted unless the marker already follows whitespace or an opening bracket. The annotations carry a title for each source, which was being dropped along with everything but the URL. It now rides along as the markdown link title, so no schema change was needed to get it to the client -- react-markdown hands it straight to the anchor. A custom `a` component renders it as a small rounded card above the link on hover: source title in white, host in orange, pointer-events-none so it can't swallow the click. Ordinary links (no title) render exactly as before. Where several citations share a host, the one with a title wins, since a titleless match would render a card with nothing in it. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>4ec29a9
-
web: make 【domain】 citations real links
The web plugin writes citations as a bare domain in fullwidth brackets — "Narendra Modi is the Prime Minister of India【pmindia.gov.in】" — which renders as text that looks clickable and isn't. The actual URLs were there all along, in message.annotations, and llm.py read only message.content and dropped them. Now they're collected (from the streamed deltas too) and each marker is matched to the annotation whose host it belongs to, so the link lands on the cited page rather than the site's front door. A marker with no matching annotation is left exactly as it was: linking a bare domain would be a guess, and a wrong link is worse than none. Deltas still stream the raw markers; the linked text arrives with the final answer, which is what the client renders on `done`. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>cd40eba