Skip to content

Commit a5649e5

Browse files
committed
updated
1 parent a8176d9 commit a5649e5

File tree

3 files changed

+44
-9
lines changed

3 files changed

+44
-9
lines changed

package-lock.json

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/core/websocket.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,11 @@ class cbws {
6767
const agentTask = process.env.agentTask ? `&agentTask=${process.env.agentTask}` : '';
6868
const socketPort = process.env.SOCKET_PORT || '12345';
6969

70+
// const wsUrl = `ws://100.126.109.83:${socketPort}/codebolt?id=${uniqueConnectionId}${agentIdParam}${parentIdParam}${parentAgentInstanceIdParam}${agentTask}${process.env.Is_Dev ? '&dev=true' : ''}`;
71+
7072
const wsUrl = `ws://localhost:${socketPort}/codebolt?id=${uniqueConnectionId}${agentIdParam}${parentIdParam}${parentAgentInstanceIdParam}${agentTask}${process.env.Is_Dev ? '&dev=true' : ''}`;
73+
74+
7175
console.log('[WebSocket] Connecting to:', wsUrl);
7276

7377
this.websocket = new WebSocket(wsUrl);

src/notificationfunctions/fs.ts

Lines changed: 38 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -627,6 +627,37 @@ export function sendMoveFileResponse(
627627

628628
sendNotification(notification, 'fs.sendMoveFileResponse');
629629
}
630+
/**
631+
* Wrapper functions to match interface signatures
632+
*/
633+
function FileDeleteRequestNotify(fileName: string, filePath: string, toolUseId?: string): void {
634+
deleteFile({ fileName, filePath }, toolUseId);
635+
}
636+
637+
function FolderDeleteRequestNotify(folderName: string, folderPath: string, toolUseId?: string): void {
638+
deleteFolder({ folderName, folderPath }, toolUseId);
639+
}
640+
641+
function ListDirectoryRequestNotify(dirPath: string, toolUseId?: string): void {
642+
listDirectory({ dirPath }, toolUseId);
643+
}
644+
645+
function WriteToFileRequestNotify(filePath: string, text: string, toolUseId?: string): void {
646+
writeToFile({ filePath, text }, toolUseId);
647+
}
648+
649+
function AppendToFileRequestNotify(filePath: string, text: string, toolUseId?: string): void {
650+
appendToFile({ filePath, text }, toolUseId);
651+
}
652+
653+
function CopyFileRequestNotify(sourceFile: string, destinationFile: string, toolUseId?: string): void {
654+
copyFile({ sourceFile, destinationFile }, toolUseId);
655+
}
656+
657+
function MoveFileRequestNotify(sourceFile: string, destinationFile: string, toolUseId?: string): void {
658+
moveFile({ sourceFile, destinationFile }, toolUseId);
659+
}
660+
630661
/**
631662
* File system notification functions object
632663
*/
@@ -639,19 +670,19 @@ export const fsNotifications: FsNotifications = {
639670
FileReadResponseNotify,
640671
FileEditRequestNotify,
641672
FileEditResponseNotify,
642-
FileDeleteRequestNotify: deleteFile,
673+
FileDeleteRequestNotify,
643674
FileDeleteResponseNotify: sendFileDeleteResponse,
644-
FolderDeleteRequestNotify: deleteFolder,
675+
FolderDeleteRequestNotify,
645676
FolderDeleteResponseNotify: sendFolderDeleteResponse,
646-
ListDirectoryRequestNotify: listDirectory,
677+
ListDirectoryRequestNotify,
647678
ListDirectoryResponseNotify: sendListDirectoryResponse,
648-
WriteToFileRequestNotify: writeToFile,
679+
WriteToFileRequestNotify,
649680
WriteToFileResponseNotify: sendWriteToFileResponse,
650-
AppendToFileRequestNotify: appendToFile,
681+
AppendToFileRequestNotify,
651682
AppendToFileResponseNotify: sendAppendToFileResponse,
652-
CopyFileRequestNotify: copyFile,
683+
CopyFileRequestNotify,
653684
CopyFileResponseNotify: sendCopyFileResponse,
654-
MoveFileRequestNotify: moveFile,
685+
MoveFileRequestNotify,
655686
MoveFileResponseNotify: sendMoveFileResponse
656687
};
657688

0 commit comments

Comments
 (0)