feat(coding-agent): add built-in message renderer transforms - #40
Conversation
junior-ricon
left a comment
There was a problem hiding this comment.
Change request
packages/coding-agent/src/modes/interactive/components/built-in-message-renderer.ts:56 passes the live AgentMessage object directly into extension transforms. Those are the same objects retained by the agent/session path, and assistant streaming copies are shallow, so a transform that assigns nested content mutates persisted transcript/model context despite this API's display-only contract. I reproduced this by changing UserMessage.content[0].text inside a transform; the source message changed. Please merge or adapt #41, which snapshots messages before entering the transform chain and adds the nested-mutation regression.
Adversarial coverage
I read the exact diff before the PR body, then checked existing discussion and CI. I stress-tested role typing, extension registration/load and composition order, stable composition state, default/self ownership, invalid/throwing transforms, streaming/final/restored and expansion updates, resize behavior, outer OSC lifecycle roots, exports, docs, and test evidence.
The focused renderer, user-message, and assistant-message suites pass (22/22, including the fix-it regression). The extension-runner suite remains locally uncollectable because the Git archive lacks generated packages/ai/src/providers/data/amazon-bedrock.json. Hosted CI failed on the disclosed clean-main model-data TypeScript errors before tests; I found no additional PR-head-specific CI failure.
…e-isolation-20260805 fix: isolate built-in renderer messages
Summary
registerBuiltInMessageRenderer("user" | "assistant", transform)extension APIdefault) and extension-owned (self) card shells with guarded fallbackThis is a display-only extension point. It does not alter persisted messages or model context, and it deliberately excludes viewport/follow-mode behavior.
Validation
git diff --check: passedLocal broad-gate degradation
npm run checkreaches root TypeScript and then fails on two unrelated model IDs already broken on a cleanorigin/mainworktree:packages/ai/test/context-overflow.test.ts:130references removedgithub-copilot/gemini-2.5-propackages/ai/test/openai-completions-tool-choice.test.ts:199references removedgroq/qwen/qwen3-32b./test.shalso could not provide a clean local broad-suite result because isolated childfd/rgcalls hit the local untrusted-mise boundary and spawned CLI tests expect missingdistartifacts. The repository contract forbids generating those artifacts with a build. No renderer-focused test failed.Hosted CI run 31017590014 confirmed the same two clean-main TypeScript failures and therefore stopped before its test phase.
No changelog entry is included because
CONTRIBUTING.mdsays not to edit the changelog in pull requests.