fix(monitor): copy final content from complete event in addAction function

- Enhanced the addAction function to copy the final content from the action if present, improving data handling during session updates.
This commit is contained in:
Luciano Castillo
2026-01-29 13:49:01 -05:00
parent e2922a08fa
commit 1fc757c732
+4
View File
@@ -273,6 +273,10 @@ export function addAction(action: MonitorAction) {
if (sessionKey && sessionKey !== 'lifecycle') {
draft.sessionKey = sessionKey
}
// Copy final content from complete event if present
if (action.content) {
draft.content = action.content
}
// Copy metadata from complete event
if (action.inputTokens !== undefined) draft.inputTokens = action.inputTokens
if (action.outputTokens !== undefined) draft.outputTokens = action.outputTokens