Skip to content

Commit 474d8c3

Browse files
committed
Fix type errors: add required tools property to call sites
1 parent 0966073 commit 474d8c3

File tree

5 files changed

+8
-2
lines changed

5 files changed

+8
-2
lines changed

backend/src/__tests__/cost-aggregation.integration.test.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -222,6 +222,7 @@ describe('Cost Aggregation Integration Tests', () => {
222222
onResponseChunk: () => {},
223223
localAgentTemplates: mockLocalAgentTemplates,
224224
signal: new AbortController().signal,
225+
tools: {},
225226
}
226227

227228
callMainPromptBaseParams = {
@@ -232,6 +233,7 @@ describe('Cost Aggregation Integration Tests', () => {
232233
promptId: 'test-prompt',
233234
clientSessionId: 'test-session',
234235
signal: new AbortController().signal,
236+
tools: {},
235237
}
236238

237239
// Mock getAgentTemplate to return our mock templates

backend/src/__tests__/main-prompt.integration.test.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -374,6 +374,7 @@ export function getMessagesSubset(messages: Message[], otherTokens: number) {
374374
process.stdout.write(chunk)
375375
},
376376
signal: new AbortController().signal,
377+
tools: {},
377378
})
378379
const requestToolCallSpy = agentRuntimeImpl.requestToolCall as any
379380

@@ -462,6 +463,7 @@ export function getMessagesSubset(messages: Message[], otherTokens: number) {
462463
process.stdout.write(chunk)
463464
},
464465
signal: new AbortController().signal,
466+
tools: {},
465467
})
466468

467469
const requestToolCallSpy = agentRuntimeImpl.requestToolCall as any

backend/src/websockets/middleware.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -158,7 +158,7 @@ export class WebSocketMiddleware {
158158
ws: WebSocket
159159
} & AgentRuntimeDeps &
160160
AgentRuntimeScopedDeps,
161-
) => void
161+
) => void | Promise<void>
162162
silent?: boolean
163163
}) {
164164
const { baseAction, silent } = params

backend/src/websockets/websocket-action.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -102,7 +102,7 @@ const onPrompt = async (
102102
logger: Logger
103103
} & ParamsExcluding<
104104
typeof callMainPrompt,
105-
'userId' | 'promptId' | 'repoId' | 'repoUrl' | 'signal'
105+
'userId' | 'promptId' | 'repoId' | 'repoUrl' | 'signal' | 'tools'
106106
>,
107107
) => {
108108
const { action, ws, getUserInfoFromApiKey, logger } = params
@@ -151,6 +151,7 @@ const onPrompt = async (
151151
repoUrl,
152152
repoId,
153153
signal: new AbortController().signal,
154+
tools: {},
154155
})
155156
if (result.output.type === 'error') {
156157
throw new Error(result.output.message)

sdk/src/run.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -841,6 +841,7 @@ export async function runOnce({
841841
clientSessionId: promptId,
842842
userId,
843843
signal: signal ?? new AbortController().signal,
844+
tools: {},
844845
}).catch((error) => {
845846
// Let retryable errors and PaymentRequiredError propagate so the retry wrapper can handle them
846847
const isRetryable = isRetryableError(error)

0 commit comments

Comments
 (0)