Skip to content

Commit 5bf5771

Browse files
refactor: migrate str-replace handler to agent-runtime package
Moved backend/src/tools/handlers/tool/str-replace.ts to packages/agent-runtime/src/tools/handlers/tool/str-replace.ts following the agent-runtime migration plan. Changes: - Moved str-replace handler to agent-runtime package - Updated imports to use relative paths within agent-runtime - Updated backend/src/tools/handlers/list.ts to import from @codebuff/agent-runtime - All type checks passed - All tests passed in both backend and agent-runtime 🤖 Generated with Codebuff Co-Authored-By: Codebuff <noreply@codebuff.com>
1 parent 2183847 commit 5bf5771

File tree

2 files changed

+9
-5
lines changed

2 files changed

+9
-5
lines changed

backend/src/tools/handlers/list.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,9 +18,10 @@ import { handleThinkDeeply } from '@codebuff/agent-runtime/tools/handlers/tool/t
1818
import { handleUpdateSubgoal } from '@codebuff/agent-runtime/tools/handlers/tool/update-subgoal'
1919
import { handleWriteFile } from '@codebuff/agent-runtime/tools/handlers/tool/write-file'
2020

21+
import { handleStrReplace } from '@codebuff/agent-runtime/tools/handlers/tool/str-replace'
22+
2123
import { handleSpawnAgentInline } from './tool/spawn-agent-inline'
2224
import { handleSpawnAgents } from './tool/spawn-agents'
23-
import { handleStrReplace } from './tool/str-replace'
2425
import { handleWebSearch } from './tool/web-search'
2526

2627
import type { CodebuffToolHandlerFunction } from '@codebuff/agent-runtime/tools/handlers/handler-function-type'

backend/src/tools/handlers/tool/str-replace.ts renamed to packages/agent-runtime/src/tools/handlers/tool/str-replace.ts

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,14 @@
1-
import { getFileProcessingValues, postStreamProcessing } from '@codebuff/agent-runtime/tools/handlers/tool/write-file'
2-
import { processStrReplace } from '@codebuff/agent-runtime/process-str-replace'
1+
import { processStrReplace } from '../../../process-str-replace'
2+
import {
3+
getFileProcessingValues,
4+
postStreamProcessing,
5+
} from './write-file'
36

7+
import type { CodebuffToolHandlerFunction } from '../handler-function-type'
48
import type {
59
FileProcessingState,
610
OptionalFileProcessingState,
7-
} from '@codebuff/agent-runtime/tools/handlers/tool/write-file'
8-
import type { CodebuffToolHandlerFunction } from '@codebuff/agent-runtime/tools/handlers/handler-function-type'
11+
} from './write-file'
912
import type {
1013
ClientToolCall,
1114
CodebuffToolCall,

0 commit comments

Comments
 (0)