Skip to content

Commit d1a555b

Browse files
committed
Add duration to main prompt logging
1 parent 152961a commit d1a555b

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

backend/src/main-prompt.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -106,6 +106,7 @@ export const mainPrompt = async (
106106
cwd,
107107
} = action
108108
const { fileContext, agentContext } = agentState
109+
const startTime = Date.now()
109110
let messageHistory = agentState.messageHistory
110111

111112
// Get the extracted repo ID from request context
@@ -565,6 +566,7 @@ export const mainPrompt = async (
565566
toolResults,
566567
systemTokens,
567568
model,
569+
duration: Date.now() - startTime,
568570
},
569571
`Main prompt ${iterationNum}`
570572
)
@@ -1118,6 +1120,7 @@ export const mainPrompt = async (
11181120
agentContext: newAgentContext,
11191121
messagesWithResponse,
11201122
model,
1123+
duration: Date.now() - startTime,
11211124
},
11221125
`Main prompt response ${iterationNum}`
11231126
)

0 commit comments

Comments
 (0)