Skip to content

Commit 387bb77

Browse files
committed
Standardize file state properties to use file_state enum instead of is_new/is_deleted flags
1 parent 17a0988 commit 387bb77

2 files changed

Lines changed: 3 additions & 3 deletions

File tree

‎packages/ui/src/components/editor/panel/ResponsePreview/ResponsePreview.stories.tsx‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,14 +31,14 @@ const files_using_fallbacks = [
3131
{
3232
type: 'file',
3333
file_path: 'src/new-feature.ts',
34-
is_new: true,
34+
file_state: 'new',
3535
lines_added: 50,
3636
lines_removed: 0
3737
},
3838
{
3939
type: 'file',
4040
file_path: 'src/old-component.tsx',
41-
is_deleted: true,
41+
file_state: 'deleted',
4242
lines_added: 0,
4343
lines_removed: 100
4444
},

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ export const show_diff_with_actions = async (
3434

3535
const title = path.basename(prepared_file.reviewable_file.file_path)
3636

37-
if (!prepared_file.reviewable_file.is_deleted) {
37+
if (prepared_file.reviewable_file.file_state !== 'deleted') {
3838
await vscode.commands.executeCommand(
3939
'vscode.diff',
4040
left_doc_uri,

0 commit comments

Comments
 (0)