Merge pull request #8 from yeHHH1g/fix/streaming-content-replace

fix: replace streaming content instead of appending
This commit is contained in:
Luciano Castillo
2026-01-28 09:33:27 -05:00
committed by GitHub
2 changed files with 3 additions and 2 deletions
+2 -2
View File
@@ -67,10 +67,10 @@ export function addAction(action: MonitorAction) {
const streamingId = `${action.runId}-stream`
const existing = actionsCollection.state.get(streamingId)
if (existing) {
// Append content and update sessionKey if we learned it
// Replace content (gateway sends cumulative text, not incremental deltas)
actionsCollection.update(streamingId, (draft) => {
if (action.content) {
draft.content = (draft.content || '') + action.content
draft.content = action.content
}
draft.seq = action.seq
draft.timestamp = action.timestamp
+1
View File
@@ -60,6 +60,7 @@ export interface PresenceEntry {
}
// Chat events
// Note: gateway sends cumulative message content with each delta, not incremental chars
export interface ChatEvent {
runId: string
sessionKey: string