Skip to content

Commit 53cfa2c

Browse files
committed
refactor: convert createRequestClientToolCall to use object parameters
1 parent 7319853 commit 53cfa2c

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

backend/src/tools/batch-str-replace.ts

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -132,7 +132,7 @@ export async function executeBatchStrReplaces({
132132
const editedFiles: Record<string, string> = {}
133133

134134
// Create the requestClientToolCall function once for all operations
135-
const requestClientToolCall = createRequestClientToolCall(ws, userInputId)
135+
const requestClientToolCall = createRequestClientToolCall({ ws, userInputId })
136136

137137
// Execute operations grouped by path for better parallelization
138138
const pathPromises: Record<string, Promise<void>> = {}
@@ -371,7 +371,11 @@ async function executeSingleStrReplace(
371371
/**
372372
* Creates a typed requestClientToolCall function for batch mode
373373
*/
374-
function createRequestClientToolCall(ws: WebSocket, userInputId: string) {
374+
function createRequestClientToolCall(params: {
375+
ws: WebSocket
376+
userInputId: string
377+
}) {
378+
const { ws, userInputId } = params
375379
return async (
376380
clientToolCall: any,
377381
): Promise<CodebuffToolOutput<'str_replace'>> => {

0 commit comments

Comments
 (0)