Skip to content

Commit 3ad3067

Browse files
committed
remove getRequestContext
1 parent 915be4e commit 3ad3067

22 files changed

+202
-13
lines changed

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

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -245,6 +245,8 @@ describe('Cost Aggregation Integration Tests', () => {
245245
const result = await mainPrompt({
246246
...agentRuntimeImpl,
247247
...agentRuntimeScopedImpl,
248+
repoId: undefined,
249+
repoUrl: undefined,
248250
action,
249251
userId: TEST_USER_ID,
250252
clientSessionId: 'test-session',
@@ -280,6 +282,8 @@ describe('Cost Aggregation Integration Tests', () => {
280282
await websocketAction.callMainPrompt({
281283
...agentRuntimeImpl,
282284
...agentRuntimeScopedImpl,
285+
repoId: undefined,
286+
repoUrl: undefined,
283287
action,
284288
userId: TEST_USER_ID,
285289
promptId: 'test-prompt',
@@ -350,6 +354,8 @@ describe('Cost Aggregation Integration Tests', () => {
350354
const result = await mainPrompt({
351355
...agentRuntimeImpl,
352356
...agentRuntimeScopedImpl,
357+
repoId: undefined,
358+
repoUrl: undefined,
353359
action,
354360
userId: TEST_USER_ID,
355361
clientSessionId: 'test-session',
@@ -406,6 +412,8 @@ describe('Cost Aggregation Integration Tests', () => {
406412
result = await mainPrompt({
407413
...agentRuntimeImpl,
408414
...agentRuntimeScopedImpl,
415+
repoId: undefined,
416+
repoUrl: undefined,
409417
action,
410418
userId: TEST_USER_ID,
411419
clientSessionId: 'test-session',
@@ -455,6 +463,8 @@ describe('Cost Aggregation Integration Tests', () => {
455463
await mainPrompt({
456464
...agentRuntimeImpl,
457465
...agentRuntimeScopedImpl,
466+
repoId: undefined,
467+
repoUrl: undefined,
458468
action,
459469
userId: TEST_USER_ID,
460470
clientSessionId: 'test-session',
@@ -495,6 +505,8 @@ describe('Cost Aggregation Integration Tests', () => {
495505
await websocketAction.callMainPrompt({
496506
...agentRuntimeImpl,
497507
...agentRuntimeScopedImpl,
508+
repoId: undefined,
509+
repoUrl: undefined,
498510
action,
499511
userId: TEST_USER_ID,
500512
promptId: 'test-prompt',

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

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -183,6 +183,8 @@ describe('Cost Aggregation System', () => {
183183
const result = handleSpawnAgents({
184184
...TEST_AGENT_RUNTIME_IMPL,
185185
...TEST_AGENT_RUNTIME_SCOPED_IMPL,
186+
repoId: undefined,
187+
repoUrl: undefined,
186188
previousToolCallFinished: Promise.resolve(),
187189
toolCall: mockToolCall,
188190
fileContext: mockFileContext,
@@ -263,6 +265,8 @@ describe('Cost Aggregation System', () => {
263265
const result = handleSpawnAgents({
264266
...TEST_AGENT_RUNTIME_IMPL,
265267
...TEST_AGENT_RUNTIME_SCOPED_IMPL,
268+
repoId: undefined,
269+
repoUrl: undefined,
266270
previousToolCallFinished: Promise.resolve(),
267271
toolCall: mockToolCall,
268272
fileContext: mockFileContext,
@@ -420,6 +424,8 @@ describe('Cost Aggregation System', () => {
420424
const result = handleSpawnAgents({
421425
...TEST_AGENT_RUNTIME_IMPL,
422426
...TEST_AGENT_RUNTIME_SCOPED_IMPL,
427+
repoId: undefined,
428+
repoUrl: undefined,
423429
previousToolCallFinished: Promise.resolve(),
424430
toolCall: mockToolCall,
425431
fileContext: mockFileContext,

backend/src/__tests__/loop-agent-steps.test.ts

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -189,6 +189,8 @@ describe('loopAgentSteps - runAgentStep vs runProgrammaticStep behavior', () =>
189189
const result = await runLoopAgentStepsWithContext({
190190
...agentRuntimeImpl,
191191
...agentRuntimeScopedImpl,
192+
repoId: undefined,
193+
repoUrl: undefined,
192194
userInputId: 'test-user-input',
193195
agentType: 'test-agent',
194196
agentState: mockAgentState,
@@ -235,6 +237,8 @@ describe('loopAgentSteps - runAgentStep vs runProgrammaticStep behavior', () =>
235237
const result = await runLoopAgentStepsWithContext({
236238
...agentRuntimeImpl,
237239
...agentRuntimeScopedImpl,
240+
repoId: undefined,
241+
repoUrl: undefined,
238242
userInputId: 'test-user-input',
239243
agentType: 'test-agent',
240244
agentState: mockAgentState,
@@ -283,6 +287,8 @@ describe('loopAgentSteps - runAgentStep vs runProgrammaticStep behavior', () =>
283287
const result = await runLoopAgentStepsWithContext({
284288
...agentRuntimeImpl,
285289
...agentRuntimeScopedImpl,
290+
repoId: undefined,
291+
repoUrl: undefined,
286292
userInputId: 'test-user-input',
287293
agentType: 'test-agent',
288294
agentState: mockAgentState,
@@ -330,6 +336,8 @@ describe('loopAgentSteps - runAgentStep vs runProgrammaticStep behavior', () =>
330336
const result = await runLoopAgentStepsWithContext({
331337
...agentRuntimeImpl,
332338
...agentRuntimeScopedImpl,
339+
repoId: undefined,
340+
repoUrl: undefined,
333341
userInputId: 'test-user-input',
334342
agentType: 'test-agent',
335343
agentState: mockAgentState,
@@ -370,6 +378,8 @@ describe('loopAgentSteps - runAgentStep vs runProgrammaticStep behavior', () =>
370378
const result = await runLoopAgentStepsWithContext({
371379
...agentRuntimeImpl,
372380
...agentRuntimeScopedImpl,
381+
repoId: undefined,
382+
repoUrl: undefined,
373383
userInputId: 'test-user-input',
374384
agentType: 'test-agent',
375385
agentState: mockAgentState,
@@ -402,6 +412,8 @@ describe('loopAgentSteps - runAgentStep vs runProgrammaticStep behavior', () =>
402412
const result = await runLoopAgentStepsWithContext({
403413
...agentRuntimeImpl,
404414
...agentRuntimeScopedImpl,
415+
repoId: undefined,
416+
repoUrl: undefined,
405417
userInputId: 'test-user-input',
406418
agentType: 'test-agent',
407419
agentState: mockAgentState,
@@ -436,6 +448,8 @@ describe('loopAgentSteps - runAgentStep vs runProgrammaticStep behavior', () =>
436448
const result = await runLoopAgentStepsWithContext({
437449
...agentRuntimeImpl,
438450
...agentRuntimeScopedImpl,
451+
repoId: undefined,
452+
repoUrl: undefined,
439453
userInputId: 'test-user-input',
440454
agentType: 'test-agent',
441455
agentState: mockAgentState,
@@ -487,6 +501,8 @@ describe('loopAgentSteps - runAgentStep vs runProgrammaticStep behavior', () =>
487501
const result = await runLoopAgentStepsWithContext({
488502
...agentRuntimeImpl,
489503
...agentRuntimeScopedImpl,
504+
repoId: undefined,
505+
repoUrl: undefined,
490506
userInputId: 'test-user-input',
491507
agentType: 'test-agent',
492508
agentState: mockAgentState,
@@ -543,6 +559,8 @@ describe('loopAgentSteps - runAgentStep vs runProgrammaticStep behavior', () =>
543559
await runLoopAgentStepsWithContext({
544560
...agentRuntimeImpl,
545561
...agentRuntimeScopedImpl,
562+
repoId: undefined,
563+
repoUrl: undefined,
546564
userInputId: 'test-user-input',
547565
agentType: 'test-agent',
548566
agentState: mockAgentState,
@@ -613,6 +631,8 @@ describe('loopAgentSteps - runAgentStep vs runProgrammaticStep behavior', () =>
613631
await runLoopAgentStepsWithContext({
614632
...agentRuntimeImpl,
615633
...agentRuntimeScopedImpl,
634+
repoId: undefined,
635+
repoUrl: undefined,
616636
userInputId: 'test-user-input',
617637
agentType: 'test-agent',
618638
agentState: mockAgentState,
@@ -696,6 +716,8 @@ describe('loopAgentSteps - runAgentStep vs runProgrammaticStep behavior', () =>
696716
const result = await runLoopAgentStepsWithContext({
697717
...agentRuntimeImpl,
698718
...agentRuntimeScopedImpl,
719+
repoId: undefined,
720+
repoUrl: undefined,
699721
userInputId: 'test-user-input',
700722
agentType: 'test-agent',
701723
agentState: mockAgentState,
@@ -769,6 +791,8 @@ describe('loopAgentSteps - runAgentStep vs runProgrammaticStep behavior', () =>
769791
const result = await runLoopAgentStepsWithContext({
770792
...agentRuntimeImpl,
771793
...agentRuntimeScopedImpl,
794+
repoId: undefined,
795+
repoUrl: undefined,
772796
userInputId: 'test-user-input',
773797
agentType: 'test-agent',
774798
agentState: mockAgentState,
@@ -815,6 +839,8 @@ describe('loopAgentSteps - runAgentStep vs runProgrammaticStep behavior', () =>
815839
const result = await runLoopAgentStepsWithContext({
816840
...agentRuntimeImpl,
817841
...agentRuntimeScopedImpl,
842+
repoId: undefined,
843+
repoUrl: undefined,
818844
userInputId: 'test-user-input',
819845
agentType: 'test-agent',
820846
agentState: mockAgentState,
@@ -883,6 +909,8 @@ describe('loopAgentSteps - runAgentStep vs runProgrammaticStep behavior', () =>
883909
const result = await runLoopAgentStepsWithContext({
884910
...agentRuntimeImpl,
885911
...agentRuntimeScopedImpl,
912+
repoId: undefined,
913+
repoUrl: undefined,
886914
userInputId: 'test-user-input',
887915
agentType: 'test-agent',
888916
agentState: mockAgentState,

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

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -380,6 +380,8 @@ export function getMessagesSubset(messages: Message[], otherTokens: number) {
380380
const { output, sessionState: finalSessionState } = await mainPrompt({
381381
...agentRuntimeImpl,
382382
...agentRuntimeScopedImpl,
383+
repoId: undefined,
384+
repoUrl: undefined,
383385
action,
384386
userId: TEST_USER_ID,
385387
clientSessionId: 'test-session-delete-function-integration',
@@ -462,6 +464,8 @@ export function getMessagesSubset(messages: Message[], otherTokens: number) {
462464
await mainPrompt({
463465
...agentRuntimeImpl,
464466
...agentRuntimeScopedImpl,
467+
repoId: undefined,
468+
repoUrl: undefined,
465469
action,
466470
userId: TEST_USER_ID,
467471
clientSessionId: 'test-session-delete-function-integration',

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

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -226,6 +226,8 @@ describe('mainPrompt', () => {
226226
const { sessionState: newSessionState, output } = await mainPrompt({
227227
...agentRuntimeImpl,
228228
...agentRuntimeScopedImpl,
229+
repoId: undefined,
230+
repoUrl: undefined,
229231
action,
230232
userId: TEST_USER_ID,
231233
clientSessionId: 'test-session',
@@ -286,6 +288,8 @@ describe('mainPrompt', () => {
286288
await mainPrompt({
287289
...agentRuntimeImpl,
288290
...agentRuntimeScopedImpl,
291+
repoId: undefined,
292+
repoUrl: undefined,
289293
action,
290294
userId: TEST_USER_ID,
291295
clientSessionId: 'test-session',
@@ -364,6 +368,8 @@ describe('mainPrompt', () => {
364368
const { output } = await mainPrompt({
365369
...agentRuntimeImpl,
366370
...agentRuntimeScopedImpl,
371+
repoId: undefined,
372+
repoUrl: undefined,
367373
action,
368374
userId: TEST_USER_ID,
369375
clientSessionId: 'test-session',
@@ -391,6 +397,8 @@ describe('mainPrompt', () => {
391397
const { sessionState: newSessionState } = await mainPrompt({
392398
...agentRuntimeImpl,
393399
...agentRuntimeScopedImpl,
400+
repoId: undefined,
401+
repoUrl: undefined,
394402
action,
395403
userId: TEST_USER_ID,
396404
clientSessionId: 'test-session',
@@ -422,6 +430,8 @@ describe('mainPrompt', () => {
422430
const { sessionState: newSessionState } = await mainPrompt({
423431
...agentRuntimeImpl,
424432
...agentRuntimeScopedImpl,
433+
repoId: undefined,
434+
repoUrl: undefined,
425435
action,
426436
userId: TEST_USER_ID,
427437
clientSessionId: 'test-session',
@@ -451,6 +461,8 @@ describe('mainPrompt', () => {
451461
const { output } = await mainPrompt({
452462
...agentRuntimeImpl,
453463
...agentRuntimeScopedImpl,
464+
repoId: undefined,
465+
repoUrl: undefined,
454466
action,
455467
userId: TEST_USER_ID,
456468
clientSessionId: 'test-session',
@@ -491,6 +503,8 @@ describe('mainPrompt', () => {
491503
await mainPrompt({
492504
...agentRuntimeImpl,
493505
...agentRuntimeScopedImpl,
506+
repoId: undefined,
507+
repoUrl: undefined,
494508
action,
495509
userId: TEST_USER_ID,
496510
clientSessionId: 'test-session',

backend/src/__tests__/malformed-tool-call.test.ts

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -126,6 +126,7 @@ describe('malformed tool call error handling', () => {
126126
userInputId: 'test-input',
127127
userId: TEST_USER_ID,
128128
repoId: 'test-repo',
129+
repoUrl: undefined,
129130
agentTemplate: testAgent,
130131
localAgentTemplates: { 'test-agent': testAgent },
131132
fileContext: mockFileContext,
@@ -183,6 +184,7 @@ describe('malformed tool call error handling', () => {
183184
userInputId: 'test-input',
184185
userId: TEST_USER_ID,
185186
repoId: 'test-repo',
187+
repoUrl: undefined,
186188
agentTemplate: testAgent,
187189
localAgentTemplates: { 'test-agent': testAgent },
188190
fileContext: mockFileContext,
@@ -230,6 +232,7 @@ describe('malformed tool call error handling', () => {
230232
userInputId: 'test-input',
231233
userId: TEST_USER_ID,
232234
repoId: 'test-repo',
235+
repoUrl: undefined,
233236
agentTemplate: testAgent,
234237
localAgentTemplates: { 'test-agent': testAgent },
235238
fileContext: mockFileContext,
@@ -281,6 +284,7 @@ describe('malformed tool call error handling', () => {
281284
userInputId: 'test-input',
282285
userId: TEST_USER_ID,
283286
repoId: 'test-repo',
287+
repoUrl: undefined,
284288
agentTemplate: testAgent,
285289
localAgentTemplates: { 'test-agent': testAgent },
286290
fileContext: mockFileContext,
@@ -334,6 +338,7 @@ describe('malformed tool call error handling', () => {
334338
userInputId: 'test-input',
335339
userId: TEST_USER_ID,
336340
repoId: 'test-repo',
341+
repoUrl: undefined,
337342
agentTemplate: testAgent,
338343
localAgentTemplates: { 'test-agent': testAgent },
339344
fileContext: mockFileContext,
@@ -389,6 +394,7 @@ describe('malformed tool call error handling', () => {
389394
userInputId: 'test-input',
390395
userId: TEST_USER_ID,
391396
repoId: 'test-repo',
397+
repoUrl: undefined,
392398
agentTemplate: testAgent,
393399
localAgentTemplates: { 'test-agent': testAgent },
394400
fileContext: mockFileContext,

0 commit comments

Comments
 (0)