Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions apps/sim/app/api/logs/route.ts
Original file line number Diff line number Diff line change
Expand Up @@ -301,6 +301,7 @@ export async function GET(request: NextRequest) {

// Only process trace spans and detailed cost in full mode
let traceSpans = []
let finalOutput: any
let costSummary = (log.cost as any) || { total: 0 }

if (params.details === 'full' && log.executionData) {
Expand All @@ -316,6 +317,12 @@ export async function GET(request: NextRequest) {
log.cost && Object.keys(log.cost as any).length > 0
? (log.cost as any)
: extractCostSummary(blockExecutions)

// Include finalOutput if present on executionData
try {
const fo = (log.executionData as any)?.finalOutput
if (fo !== undefined) finalOutput = fo
} catch {}
}

const workflowSummary = {
Expand Down Expand Up @@ -346,6 +353,7 @@ export async function GET(request: NextRequest) {
totalDuration: log.totalDurationMs,
traceSpans,
blockExecutions,
finalOutput,
enhanced: true,
}
: undefined,
Expand Down

This file was deleted.

Loading