Skip to content

Commit 8338b89

Browse files
committed
fix typecheck
1 parent 8e599d2 commit 8338b89

File tree

1 file changed

+7
-5
lines changed

1 file changed

+7
-5
lines changed

packages/agent-runtime/src/run-agent-step.ts

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -446,7 +446,11 @@ export async function loopAgentSteps(
446446
'toolNames' | 'mcpServers' | 'writeTo'
447447
> &
448448
ParamsOf<CheckLiveUserInputFn> &
449-
ParamsExcluding<StartAgentRunFn, 'runId' | 'agentId' | 'ancestorRunIds'>,
449+
ParamsExcluding<StartAgentRunFn, 'runId' | 'agentId' | 'ancestorRunIds'> &
450+
ParamsExcluding<
451+
FinishAgentRunFn,
452+
'runId' | 'status' | 'totalSteps' | 'directCredits' | 'totalCredits'
453+
>,
450454
): Promise<{
451455
agentState: AgentState
452456
output: AgentOutput
@@ -719,13 +723,12 @@ export async function loopAgentSteps(
719723

720724
const status = checkLiveUserInput(params) ? 'completed' : 'cancelled'
721725
await finishAgentRun({
722-
userId,
726+
...params,
723727
runId,
724728
status,
725729
totalSteps,
726730
directCredits: currentAgentState.directCreditsUsed,
727731
totalCredits: currentAgentState.creditsUsed,
728-
logger,
729732
})
730733

731734
return {
@@ -749,14 +752,13 @@ export async function loopAgentSteps(
749752

750753
const status = checkLiveUserInput(params) ? 'failed' : 'cancelled'
751754
await finishAgentRun({
752-
userId,
755+
...params,
753756
runId,
754757
status,
755758
totalSteps,
756759
directCredits: currentAgentState.directCreditsUsed,
757760
totalCredits: currentAgentState.creditsUsed,
758761
errorMessage,
759-
logger,
760762
})
761763

762764
const errorObject = getErrorObject(error)

0 commit comments

Comments
 (0)