feat(chat)!: remove provideChat(), fix app-level markdown registry overrides, and three API cleanups - #1055
Merged
Merged
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
Contributor
blove
force-pushed
the
blove/chat-remove-provide-chat
branch
from
September 8, 2026 01:10
02f8576 to
633319e
Compare
Contributor
No component in @threadplane/chat ever injected CHAT_CONFIG, so
provideChat({}) configured nothing: renderRegistry, avatarLabel, and
assistantName were values only a consumer's own wrappers could read back.
The provider, the token, the interface, and the dead ChatConfig duplicate
in chat.types.ts are deleted outright.
Every call site follows: 35 cockpit example app.config.ts files, both
standalone example apps, the chat and langgraph READMEs, the @threadplane
/render JSDoc that referenced it, the docs pages that described it, and the
blog tutorials whose bootstrap snippets would otherwise no longer compile.
The three pages that documented the API — chat/api/provide-chat,
chat/api/chat-config, and chat/guides/configuration — are deleted, dropped
from the docs nav, added to the retired-route pattern the public-copy
contract enforces, and permanently redirected (with their /api/markdown
mirrors) to chat installation so delivered links do not 404.
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
…iews <chat-streaming-md> provided MARKDOWN_VIEW_REGISTRY on its own component injector from its own default, so a provider at the application root or on a route was always shadowed and never reached the markdown node components. The [viewRegistry] input was the only override that worked. Resolution is now most-specific-first: the [viewRegistry] input, then a registry found through skipSelf on an ancestor injector, then cacheplaneMarkdownViews. The resolved value is still provided on the component injector, so <chat-md-children> and the table-row view are unchanged, and <chat> needs to forward nothing for an app-wide override to reach the markdown it renders for assistant messages. The new spec fails on the old resolution in two of its four cases (ancestor provider, and the same through <chat>) and passes on the other two, which pin the default and the input precedence. Restores an accurate "App-wide override" section in the markdown guide, which previously carried a Callout asserting the opposite, and corrects the CHANGELOG entry that made the same claim. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
…ageContent, tokenize the popup launcher
Three small cleanups:
- ContentType no longer carries 'mixed'. createContentClassifier never emitted
it, so the `|| currentType === 'mixed'` branch in the delta path was dead and
any consumer switch on it had a case no input reaches. The docs said as much
and told readers not to branch on it; the member is simply gone instead.
- messageContent() takes { content: unknown } rather than LangChain's
BaseMessage. Every caller in this library holds the runtime-neutral Message
from agent.messages(), so ChatComponent.humanContent carried a cast and the
docs told consumers to pass something other than the message they actually
have. The function reads nothing but .content, so the structural parameter is
the honest signature; the cast is gone.
- --tplane-chat-launcher-offset-x / -y (both 1rem) position the <chat-popup>
launcher, which was pinned with hard-coded corner offsets. The popup window
reads the horizontal one too, so it stays aligned when the launcher moves
clear of a bottom bar or a consent banner.
The new message-utils spec fails to type-check against the old BaseMessage
signature (four errors under tsconfig.spec.json) and passes after. The new
chat-popup styles spec fails four of its five cases before the change, and its
window-alignment guard was mutation-checked by reverting that one declaration.
Regenerates the chat and render api-docs.
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
blove
force-pushed
the
blove/chat-remove-provide-chat
branch
from
September 8, 2026 03:45
633319e to
c63be78
Compare
blove
enabled auto-merge (squash)
September 8, 2026 03:45
Contributor
Widening messageContent() to { content: unknown } removed the last
LangChain import from the published package, so @nx/dependency-checks
fails the declared peer. It stays a peer of @threadplane/langgraph,
which is why the install command still lists it.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Contributor
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.
Closes three
@threadplane/chatfollow-ups from the API audit.1.
provideChat()/ChatConfig/CHAT_CONFIGremovedgrep -rn CHAT_CONFIG libs/confirmed the audit: the only readers wereprovide-chat.tsitself and the public-api re-export. CallingprovideChat({})configured nothing —renderRegistry,avatarLabel, andassistantNamewere values only a consumer's own wrappers could read back.The provider, token, and interface are deleted outright, along with the unused duplicate
ChatConfiginchat.types.ts. Every call site follows: 35cockpit/**/angular/src/app/app.config.tsfiles, both standalone example apps, the chat and langgraph READMEs, the@threadplane/renderJSDoc that referenced it, and the docs.Three docs pages described the API:
chat/api/provide-chat,chat/api/chat-config, andchat/guides/configuration(which was entirely about it). All three are deleted, dropped from the docs nav, added toRETIRED_ROUTE_PATTERNin the public-copy contract, and permanently redirected — with their/api/markdownmirrors — to chat installation, since the site already keeps a redirect map for retired docs routes. The remaining ~35 prose mentions across the chat, langgraph, ag-ui, deep-agents, runtimes, and a2ui docs are rewritten so the concept is simply gone rather than described as a no-op.The seven blog tutorials whose bootstrap snippets called
provideChatare included: their code no longer compiles otherwise. This is slightly wider than the stated scope, called out here so it can be reverted if unwanted.2. An app-level
MARKDOWN_VIEW_REGISTRYoverride now works<chat-streaming-md>provided the token on its own injector fromviewRegistry() ?? cacheplaneMarkdownViews, so a root or route provider was always shadowed. Resolution is now most-specific-first: the[viewRegistry]input, then an ancestor injector viaskipSelf, then the default. The resolved value is still provided on the component injector, somarkdown-children.component.tsand the table-row view are unchanged, and<chat>forwards nothing — it does not need to.The markdown guide gets an accurate "App-wide override" section replacing the Callout that asserted the opposite, and the CHANGELOG entry making the same false claim is corrected.
7. Three small cleanups
ContentTypeloses'mixed'along with the dead|| currentType === 'mixed'branch. The classifier never emitted it.content-classifier.mdxandchat/guides/streaming.mdxupdated.messageContent()takes{ content: unknown }instead of LangChain'sBaseMessage. Callers hold the runtime-neutralMessage, soChatComponent.humanContentcarried a cast and the docs told readers to pass something other than the message they have. The cast is gone;chat-message-list.mdxandmessage-model.mdxcorrected.--tplane-chat-launcher-offset-x/-y(both1rem) position the<chat-popup>launcher. The popup window reads the horizontal one too, so it stays aligned when the launcher moves. Documented inchat-popup.mdxand the theming token table.Specs added
streaming-markdown.registry-override.spec.ts— 4 cases; 2 fail on the old resolution (ancestor provider, and the same through<chat>), 2 pin the default and input precedence.message-utils.spec.ts— fails to type-check against the oldBaseMessagesignature (4 errors undertsconfig.spec.json), passes after.chat-popup.styles.spec.ts— 4 of 5 cases fail before the change; the window-alignment guard was mutation-checked by reverting that one declaration.next.config.spec.ts— two new cases covering the retired-route redirects and their markdown mirrors.'mixed'is a type-only removal with no runtime behavior to pin. A.type-spec.tswas attempted and dropped:chat:type-testsis already red onmain(TS 6.0baseUrldeprecation), and importingContentTypepulls@threadplane/a2uisource across that config'srootDir. The change is guarded by the compiler and by the regeneratedapi-docs.json.Verification
npx nx run-many -t lint,test,build --projects=chat,render— green (0 lint errors).npx vitest run --root apps/website— 131 files, 1328 tests passed.positioning.spec.tsand the public-copy/install-option guards pass unchanged.GROWTH_FORM_POLICY=growth_v1 npx nx build website— succeeded.npx nx run-many -t buildforcockpit-chat-messages-angular,cockpit-langgraph-streaming-angular,cockpit-ag-ui-interrupts-angular— all built.npx nx run-many -t e2efor the same three — 1 / 3 / 3 passed.npm run generate-api-docsandnpx tsx scripts/generate-ag-ui-deployment-config.tsrun; the api-docs changes are committed (the deployment config produced no diff).🤖 Generated with Claude Code