Skip to content

Commit

Permalink
Merge main into feature/q-mega
Browse files Browse the repository at this point in the history
  • Loading branch information
aws-toolkit-automation authored Nov 14, 2024
2 parents f39aac6 + f6e731f commit 75de489
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -313,7 +313,8 @@ class FeatureDevController(
deletedFiles.find { it.zipFilePath == fileToUpdate }?.let { it.rejected = !it.rejected }
}

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

// Then, if the accepted file is not a deletion, open a diff to show the changes are applied:
Expand Down Expand Up @@ -420,9 +421,13 @@ class FeatureDevController(
credentialStartUrl = getStartUrl(project = context.project)
)

// Caution: insertChanges has multiple responsibilities.
// The filter here results in rejected files being hidden from the tree after continuing, by design.
// However, it is critical that we don't hide already-accepted files. Inside insertChanges, it
// filters to only update the subset of passed files that aren't accepted or rejected already.
session.insertChanges(
filePaths = filePaths.filterNot { it.rejected || it.changeApplied },
deletedFiles = deletedFiles.filterNot { it.rejected || it.changeApplied },
filePaths = filePaths.filter { !it.rejected },
deletedFiles = deletedFiles.filter { !it.rejected },
references = references,
messenger
)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -82,8 +82,8 @@ amazonqFeatureDev.follow_instructions_for_authentication=Follow instructions to
amazonqFeatureDev.follow_up.close_session=No, thanks
amazonqFeatureDev.follow_up.continue=Continue
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.
amazonqFeatureDev.follow_up.insert_all_code=Accept all code
amazonqFeatureDev.follow_up.insert_remaining_code=Accept remaining code
amazonqFeatureDev.follow_up.insert_all_code=Accept all changes
amazonqFeatureDev.follow_up.insert_remaining_code=Accept remaining changes
amazonqFeatureDev.follow_up.modified_source_folder=Changed source root to: {0}
amazonqFeatureDev.follow_up.modify_source_folder=Select files for context
amazonqFeatureDev.follow_up.new_task=Yes, I have another task
Expand Down

0 comments on commit 75de489

Please sign in to comment.