Skip to content

feat: show the sources an answer drew on [#124] - #25

Merged
RohanReddy44 merged 1 commit into
mainfrom
feat/124-answer-sources
Sep 29, 2026
Merged

RohanReddy44 merged 1 commit into
mainfrom
feat/124-answer-sources

Conversation

@hariharanweb

Copy link
Copy Markdown
Contributor

What changed

The API already sends sources with every finished answer. The client now shows them.

  • Under an answered card: Source: (or Sources:), then [1]: <name>, [2]: …, in the order the API sent them. Names only; the url is not shown.
  • Not shown while streaming, under an error card, or when the list is empty.
  • Copy adds the same list after the answer text.
  • History unchanged: sources are not sent back to the API.
  • Translations: source / sources added to all 10 language files. The nine non-English ones need a native speaker's check.
  • Docs: new CONTEXT.md glossary (Answer, Source, Citation). ADR-0000 §6.1 gains an "Answer sources" row.

How to check

With stubs on (stubs.enabled: true, don't commit it), npm run dev:

  1. The first reply shows Source: [1]: Package of Practices, MPKV Rahuri.
  2. The other replies show no sources block. The failing fifth reply shows none either.
  3. Copy on the first reply puts the answer followed by the list on the clipboard.

Verified

  • Lint, typecheck, knip and tests (67, 13 new or changed) pass via the pre-commit hook. npm run build passes.
  • The dev server started and served the changed modules. Not clicked through in a browser.
  • Not run in Actions.

Relates to OpenAgriNet/engineering-tracker#124

🤖 Generated with Claude Code

Sources show only on answered cards, never on error cards, and are
added to Copy. They stay out of the history sent to the API.

Relates to OpenAgriNet/engineering-tracker#124

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
@RohanReddy44
RohanReddy44 merged commit 4e64597 into main Sep 29, 2026
4 checks passed
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.

2 participants