agent-host-chat-contributions

Installation
SKILL.md

Agent Host Chat Contributions

Use the contribution model for a self-contained behavior that crosses an agent-host chat lifecycle boundary. Read these files before changing the model:

  • src/vs/platform/agentHost/common/agentHostChatContributionsService.ts
  • src/vs/platform/agentHost/node/agentHostChatContributionsService.ts
  • src/vs/platform/agentHost/node/chatContributions/TODO.md
  • src/vs/platform/agentHost/node/chatContributions/builtInChatContributions.ts

The rule that prevents the old failure mode

New cross-cutting features go in contributions, not in AgentSideEffects or AgentService.

AgentSideEffects has shed well over 700 lines by extracting seventeen behaviors. Do not put another lifecycle side effect, outgoing-prompt addition, restored-turn enrichment, admission check, or action observer back into either large orchestration class. AgentSideEffects dispatches the lifecycle and retains routing and send mechanics; AgentService owns session lifecycle and invokes hydration and memento eviction. See agentSideEffects.ts and agentService.ts.

This is also a review rule: code added to either file needs a specific reason that it is routing, a correctness invariant, provider-shaped behavior, or a dispatcher call site. "It was convenient to add here" is not a reason.

Decide before you code

Installs
16
GitHub Stars
192.7K
First Seen
Aug 28, 2026
agent-host-chat-contributions — microsoft/vscode