Skip to content

Commit 7e3d7e0

Browse files
author
C Tidd
committed
fix(amazonq): Ensure file tree displays all files with correct state after continuing.
1 parent a53642e commit 7e3d7e0

File tree

2 files changed

+6
-5
lines changed

2 files changed

+6
-5
lines changed

plugins/amazonq/chat/jetbrains-community/src/software/aws/toolkits/jetbrains/services/amazonqFeatureDev/controller/FeatureDevController.kt

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -313,7 +313,8 @@ class FeatureDevController(
313313
deletedFiles.find { it.zipFilePath == fileToUpdate }?.let { it.rejected = !it.rejected }
314314
}
315315

316-
// Update the state of the tree view:
316+
// FIXME: This is a kludge that is hiding the fact that insertChanges is updating the file tree above this point to
317+
// an incorrect state. Update the state of the tree view:
317318
messenger.updateFileComponent(message.tabId, filePaths, deletedFiles, messageId)
318319

319320
// Then, if the accepted file is not a deletion, open a diff to show the changes are applied:
@@ -421,8 +422,8 @@ class FeatureDevController(
421422
)
422423

423424
session.insertChanges(
424-
filePaths = filePaths.filterNot { it.rejected || it.changeApplied },
425-
deletedFiles = deletedFiles.filterNot { it.rejected || it.changeApplied },
425+
filePaths = filePaths,
426+
deletedFiles = deletedFiles,
426427
references = references,
427428
messenger
428429
)

plugins/core/resources/resources/software/aws/toolkits/resources/MessagesBundle.properties

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -82,8 +82,8 @@ amazonqFeatureDev.follow_instructions_for_authentication=Follow instructions to
8282
amazonqFeatureDev.follow_up.close_session=No, thanks
8383
amazonqFeatureDev.follow_up.continue=Continue
8484
amazonqFeatureDev.follow_up.incorrect_source_folder=The folder you chose isn't in your open workspace folder. You can add this folder to your workspace, or choose a folder in your open workspace.
85-
amazonqFeatureDev.follow_up.insert_all_code=Accept all code
86-
amazonqFeatureDev.follow_up.insert_remaining_code=Accept remaining code
85+
amazonqFeatureDev.follow_up.insert_all_code=Accept all changes
86+
amazonqFeatureDev.follow_up.insert_remaining_code=Accept remaining changes
8787
amazonqFeatureDev.follow_up.modified_source_folder=Changed source root to: {0}
8888
amazonqFeatureDev.follow_up.modify_source_folder=Select files for context
8989
amazonqFeatureDev.follow_up.new_task=Yes, I have another task

0 commit comments

Comments
 (0)