Skip to content

Commit b5d4bb5

Browse files
bloveclaude
andauthored
feat: citations + sync all @Ngaf to 0.0.21 (#194)
* docs(spec): @ngaf/chat 0.0.21 citations + sync all @Ngaf to 0.0.21 Citations as Message.citations[] populated by adapters, rendered inline by markdown citation-reference view component and as a sources panel via <chat-citations>. CitationsResolverService merges Message.citations and markdown-doc sidecar with message-first precedence. Synchronizes all 16 @Ngaf libraries to 0.0.21 per project policy. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com> * docs(plan): @Ngaf 0.0.21 citations implementation plan * feat(chat): add Citation interface * feat(chat): add Message.citations field * feat(chat): add CitationsResolverService * feat(chat): add markdown citation-reference view component Implements MarkdownCitationReferenceComponent (selector chat-md-citation-reference) that renders inline citation markers resolved via CitationsResolverService. Registers the component under the 'citation-reference' key in cacheplaneMarkdownViews. Updates the view registry spec to cover 19 node types (v0.2 adds citation-reference). Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com> * feat(chat): add chat-citations primitive (sources panel) Creates ChatCitationsComponent (chat-citations selector) with a ChatCitationCardTemplateDirective ContentChild slot for custom card rendering, and ChatCitationsCardComponent (chat-citations-card) for default citation display. Exports all three from the chat public surface. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com> * feat(chat): render chat-citations under assistant messages Adds optional [message] input to ChatMessageComponent and renders <chat-citations [message]="msg" /> after the body slot for assistant role. Provides CitationsResolverService at the chat-message component level and uses an effect to sync message() into the resolver's signal. Updates the component spec to provide CitationsResolverService in the test injector. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com> * feat(chat): wire CitationsResolverService through chat-message + chat-streaming-md Injects CitationsResolverService optionally in ChatStreamingMdComponent and feeds markdownDefs from doc.citations via an effect on the root() signal. This chains the markdown AST citation sidecar into the resolver so inline citation-reference markers can resolve to Citation objects at render time. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com> * feat(chat): export MarkdownCitationReferenceComponent from public surface Adds MarkdownCitationReferenceComponent to the @ngaf/chat public API so consumers can override or inspect the inline citation marker renderer alongside the other per-node markdown view components. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com> * feat(langgraph): extract citations from additional_kwargs Create extractCitations() normalizer in internals/ and wire it into the toMessage() BaseMessage → Message conversion so that additional_kwargs.citations (or .sources fallback) flows through as Message.citations on every assistant turn. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com> * feat(ag-ui): bridge state.citations into Message.citations Create bridgeCitationsState() normalizer and wire it into reduceEvent() after STATE_SNAPSHOT and STATE_DELTA apply their patches, so that state.citations[messageId] arrays flow through as Message.citations on every affected assistant message. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com> * chore(release): synchronize all @Ngaf libs to 0.0.21 Per project policy: all @Ngaf packages share a single version. This bumps all 16 libraries (a2ui, ag-ui, chat, cockpit-{docs,registry,shell,testing,ui}, db, design-tokens, example-layouts, langgraph, licensing, partial-json, render, ui-react) to 0.0.21 alongside the citations release. * docs: chat citations + adapter bridge documentation Add minimal documentation for the @Ngaf 0.0.21 citations release across all adapter libraries and changelog. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com> * chore: bump @cacheplane/partial-markdown to ^0.2.0 in workspace root * fix(chat): use inject() for ChatCitationCardTemplateDirective per lint rule --------- Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
1 parent 2e42776 commit b5d4bb5

47 files changed

Lines changed: 2035 additions & 29 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

CHANGELOG.md

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,16 @@
1+
## 0.0.21 — 2026-05-04
2+
3+
### Added
4+
5+
- **`@ngaf/chat`**`Citation` interface, `Message.citations` field, `<chat-citations>` primitive (sources panel), `MarkdownCitationReferenceComponent` registered in the markdown view registry, `CitationsResolverService` for message-first / markdown-fallback citation lookup.
6+
- **`@ngaf/langgraph`**`extractCitations()` populates `Message.citations` from `additional_kwargs.citations` or `additional_kwargs.sources`.
7+
- **`@ngaf/ag-ui`**`bridgeCitationsState()` populates `Message.citations` from STATE_DELTA at JSON Pointer `/citations/{messageId}`.
8+
- **`@cacheplane/partial-markdown`** peer in `@ngaf/chat` bumped to `^0.2.0`.
9+
10+
### Changed
11+
12+
- **All @ngaf libraries synchronized to `0.0.21`** per project policy (single version across the suite).
13+
114
## 0.0.2 (2026-05-01)
215

316
### 🩹 Fixes

0 commit comments

Comments
 (0)