mirror of
https://github.com/crabwise-ai/crabwalk.git
synced 2026-08-14 00:57:52 +00:00
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:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user