Skip to content

Commit 77af4c1

Browse files
committed
feat: track file creation, change, and deletion events in accumulatedEvents
1 parent 3bccf74 commit 77af4c1

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

src/services/code-index/processors/file-watcher.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -117,6 +117,7 @@ export class FileWatcher implements IFileWatcher {
117117
* @param uri URI of the created file
118118
*/
119119
private async handleFileCreated(uri: vscode.Uri): Promise<void> {
120+
this.accumulatedEvents.set(uri.fsPath, { uri, type: "create" })
120121
this.scheduleBatchProcessing()
121122
}
122123

@@ -125,6 +126,7 @@ export class FileWatcher implements IFileWatcher {
125126
* @param uri URI of the changed file
126127
*/
127128
private async handleFileChanged(uri: vscode.Uri): Promise<void> {
129+
this.accumulatedEvents.set(uri.fsPath, { uri, type: "change" })
128130
this.scheduleBatchProcessing()
129131
}
130132

@@ -133,6 +135,7 @@ export class FileWatcher implements IFileWatcher {
133135
* @param uri URI of the deleted file
134136
*/
135137
private async handleFileDeleted(uri: vscode.Uri): Promise<void> {
138+
this.accumulatedEvents.set(uri.fsPath, { uri, type: "delete" })
136139
this.scheduleBatchProcessing()
137140
}
138141

0 commit comments

Comments
 (0)