Skip to content

Commit 3e98dff

Browse files
committed
Explicitly set the type field to 'file' for all dynamically tracked reviewable files created during workspace events
1 parent cf79e34 commit 3e98dff

1 file changed

Lines changed: 6 additions & 0 deletions

File tree

‎packages/vscode/src/commands/apply-chat-response-command/utils/preview/workspace-listener.ts‎

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -123,6 +123,7 @@ export const setup_workspace_listeners = (
123123
!is_new && new_content == '' && original_content != ''
124124

125125
const reviewable_file: ReviewableFile = {
126+
type: 'file',
126127
file_path: relative_path,
127128
content: new_content,
128129
workspace_name: workspace_folder.name,
@@ -198,6 +199,7 @@ export const setup_workspace_listeners = (
198199
const temp_file_path = path.join(os.tmpdir(), temp_filename)
199200

200201
const reviewable_file: ReviewableFile = {
202+
type: 'file',
201203
file_path: relative_path,
202204
content: new_content,
203205
workspace_name: workspace_folder.name,
@@ -290,6 +292,7 @@ export const setup_workspace_listeners = (
290292
const temp_file_path = path.join(os.tmpdir(), temp_filename)
291293

292294
const reviewable_file: ReviewableFile = {
295+
type: 'file',
293296
file_path: relative_path,
294297
content: new_content,
295298
workspace_name: workspace_folder.name,
@@ -394,6 +397,7 @@ export const setup_workspace_listeners = (
394397
})
395398

396399
const deleted_reviewable: ReviewableFile = {
400+
type: 'file',
397401
file_path: old_relative,
398402
content: '',
399403
workspace_name:
@@ -455,6 +459,7 @@ export const setup_workspace_listeners = (
455459
})
456460

457461
const created_reviewable: ReviewableFile = {
462+
type: 'file',
458463
file_path: new_relative,
459464
content: new_content,
460465
workspace_name: new_workspace_folder.name,
@@ -486,6 +491,7 @@ export const setup_workspace_listeners = (
486491
})
487492

488493
const deleted_reviewable: ReviewableFile = {
494+
type: 'file',
489495
file_path: old_relative,
490496
content: '',
491497
workspace_name:

0 commit comments

Comments
 (0)