Skip to content

Commit 0585487

Browse files
kiwinadaniel-lxs
authored andcommitted
Fix TypeScript error in taskMetadata - add missing contextTokens to empty messages case
1 parent 548ff99 commit 0585487

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

src/core/task-persistence/taskMetadata.ts

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,14 @@ export async function taskMetadata({
4545
}
4646
return {
4747
historyItem,
48-
tokenUsage: { totalTokensIn: 0, totalTokensOut: 0, totalCacheWrites: 0, totalCacheReads: 0, totalCost: 0 },
48+
tokenUsage: {
49+
totalTokensIn: 0,
50+
totalTokensOut: 0,
51+
totalCacheWrites: 0,
52+
totalCacheReads: 0,
53+
totalCost: 0,
54+
contextTokens: 0,
55+
},
4956
}
5057
}
5158

0 commit comments

Comments
 (0)