Repository navigation
v0.2.1
What's Changed
message.part.delta event support
The event handler now processes message.part.delta events alongside message.part.updated. This new event type carries only { sessionID, messageID, partID, field, delta } without a full Part object. The handleMessagePartUpdated function was extracted from the plugin closure and updated with a two-path dispatch: if a Part object is present, it uses the existing accumulated-text-delta logic; if only delta + sessionID + messageID are present, it uses the delta string directly. The event switch now matches both "message.part.updated" and "message.part.delta".
MessageEvent type expanded
The MessageEvent.type union in types.ts now includes "message.part.delta". The MessageEvent.properties shape gained three optional fields: messageID, partID, and field — used by the delta-only event path.
Background agent detection reverted to cross-session only
getAllActiveAgentsGlobally no longer includes same-session agents with messageAgentCache entries. The isSameSessionAgent check was removed — only trackers where sessionId !== primarySessionId are identified as background agents. isPrimarySessionActive no longer skips trackers with cached agent names; any tracker with recent activity in the primary session counts as primary activity.
Primary session assignment simplified
The message.part.updated handler no longer checks messageAgentCache before setting primarySessionId. The first session to receive any assistant token chunk becomes the primary session, unconditionally.
Multi-agent tests aligned with cross-session design
Tests were using same-session agents, but the code only detects background agents across sessions. Tests 1, 2, and 4 now use separate session IDs per agent and send primary part.updated tokens first to establish primarySessionId. Test 3 (agents-only) updated: the original code always shows the primary TPS line when the primary session has tokens, so the test now verifies agent labels appear alongside the primary line rather than expecting no primary line.
Version bump
package.json version updated from 0.2.0 to 0.2.1.
Full Changelog: v0.2.0...v0.2.1