chat 0.0.20 — swap <chat-streaming-md> to @cacheplane/partial-markdown#193
Merged
Conversation
Used by <chat-streaming-md> for streaming markdown AST. Implementation detail (not a peer dep) — chat consumers don't need to install it. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
…link) Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
…eading/blockquote/list/list-item/code-block) Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Replaces the marked + innerHTML rendering pipeline with an Angular template walking a @cacheplane/partial-markdown AST through @ngaf/render's view registry. Stable parser identity → Angular track-by-id keeps DOM stable across pushes. The default cacheplaneMarkdownViews registry covers all 18 v0.1 node types; consumers override per-type via withViews(). Tables and task lists regress (not in partial-markdown v0.1) — restored when partial-markdown v0.3 ships them. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
…-string) Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
The parser's root reference is stable across pushes (partial-markdown's identity guarantee), so Angular's Object.is signal equality short-circuits mid-stream content updates. Calling materialize() at the boundary surfaces a structurally-shared snapshot whose root reference changes when any descendant changes (via partial-markdown's per-node version fingerprint), while unchanged subtrees keep their references stable. This is exactly the property Angular signal CD needs. The integration test's chunked path now exercises per-chunk detectChanges (matching production usage), and the identity-preservation spec asserts real DOM-node reference equality for unchanged subtrees. Also adds @cacheplane/partial-markdown to allowedNonPeerDependencies in ng-package.json (was already a runtime dependency but missing from the ng-packagr allowlist, causing build failures). Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
…rule Renames all md-* Angular component selectors to chat-md-* (md-children, md-document, md-paragraph, md-heading, md-blockquote, md-list, md-list-item, md-code-block, md-thematic-break, md-text, md-emphasis, md-strong, md-strikethrough, md-inline-code, md-link, md-autolink, md-image, md-soft-break, md-hard-break) to satisfy the @angular-eslint/component-selector rule requiring the 'chat' or 'a2ui' prefix. Updates all template usages and spec files accordingly. Co-Authored-By: Claude Sonnet 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
Replaces ``'s `marked` + `innerHTML` rendering pipeline with an Angular template walking a `@cacheplane/partial-markdown@0.1.0` AST through the existing `@ngaf/render` view registry.
What's new
Identity preservation
The component returns `materialize(this.parser.root)` — partial-markdown's structural-shared snapshot. Same JS reference for unchanged subtrees (Angular `track`/CD short-circuits), new reference whenever any descendant changed. The DOM-node identity assertions in the identity-preservation spec verify this works: appending a paragraph keeps the prior paragraph's `
` element identity-stable.
Documented regressions
No other rendered surface changes.
Sanitization
All `href`/`src` flows through Angular's built-in URL sanitization. No `bypassSecurityTrustHtml` calls. No `innerHTML` bindings. Verified by a `javascript:` URL test in the link spec.
Testing
`@ngaf/chat` 0.0.19 → `0.0.20`. `@cacheplane/partial-markdown@0.1.0` added as a runtime dep (chat-internal; not a peer dep). `marked` retained — still used by `messageContent` shared util elsewhere; cleanup is a follow-up.
🤖 Generated with Claude Code