Skip to content

Commit 66f163b

Browse files
committed
move live-user-inputs to agent-runtime
1 parent cb6febe commit 66f163b

35 files changed

+958
-1431
lines changed

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

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
import { disableLiveUserInputCheck } from '@codebuff/agent-runtime/live-user-inputs'
12
import * as agentRegistry from '@codebuff/agent-runtime/templates/agent-registry'
23
import { TEST_USER_ID } from '@codebuff/common/old-constants'
34
import {
@@ -13,6 +14,7 @@ import {
1314
expect,
1415
it,
1516
mock,
17+
beforeAll,
1618
} from 'bun:test'
1719

1820
import * as messageCostTracker from '../llm-apis/message-cost-tracker'
@@ -91,6 +93,10 @@ describe('Cost Aggregation Integration Tests', () => {
9193
let agentRuntimeImpl: AgentRuntimeDeps
9294
let agentRuntimeScopedImpl: AgentRuntimeScopedDeps
9395

96+
beforeAll(() => {
97+
disableLiveUserInputCheck()
98+
})
99+
94100
beforeEach(async () => {
95101
agentRuntimeImpl = { ...TEST_AGENT_RUNTIME_IMPL }
96102
agentRuntimeScopedImpl = {
@@ -208,10 +214,6 @@ describe('Cost Aggregation Integration Tests', () => {
208214
return results
209215
}
210216

211-
// Mock live user input checking
212-
const liveUserInputs = await import('../live-user-inputs')
213-
spyOn(liveUserInputs, 'checkLiveUserInput').mockImplementation(() => true)
214-
215217
// Mock getAgentTemplate to return our mock templates
216218
spyOn(agentRegistry, 'getAgentTemplate').mockImplementation(
217219
async ({ agentId, localAgentTemplates }) => {

0 commit comments

Comments
 (0)