Skip to content

Commit 6f7f726

Browse files
committed
fix unit tests
1 parent e2b2e16 commit 6f7f726

File tree

2 files changed

+5
-6
lines changed

2 files changed

+5
-6
lines changed

backend/src/__tests__/agent-registry.test.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -103,7 +103,7 @@ describe('Agent Registry', () => {
103103
}))
104104

105105
// Mock logger
106-
mockModule('../util/logger', () => ({
106+
mockModule('@codebuff/backend/util/logger', () => ({
107107
logger: {
108108
debug: () => {},
109109
error: () => {},

backend/src/tools/stream-parser.ts

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -8,16 +8,14 @@ import { buildArray } from '@codebuff/common/util/array'
88
import { generateCompactId } from '@codebuff/common/util/string'
99
import { cloneDeep } from 'lodash'
1010

11-
import { expireMessages } from '../util/messages'
11+
import { executeBatchStrReplaces } from './batch-str-replace'
1212
import { logger } from '../util/logger'
13+
import { expireMessages } from '../util/messages'
1314
import { sendAction } from '../websockets/websocket-action'
1415
import { processStreamWithTags } from '../xml-stream-parser'
1516
import { executeCustomToolCall, executeToolCall } from './tool-executor'
16-
import {
17-
executeBatchStrReplaces,
18-
BatchStrReplaceState,
19-
} from './batch-str-replace'
2017

18+
import type { BatchStrReplaceState } from './batch-str-replace'
2119
import type { CustomToolCall } from './tool-executor'
2220
import type { StreamChunk } from '../llm-apis/vercel-ai-sdk/ai-sdk'
2321
import type { AgentTemplate } from '../templates/types'
@@ -119,6 +117,7 @@ export async function processStreamWithTools(options: {
119117
agentContext,
120118
messages,
121119
system,
120+
logger,
122121
}
123122

124123
function toolCallback<T extends ToolName>(toolName: T) {

0 commit comments

Comments
 (0)