From 7cc69f46dcba71eec943cb78e2638b12e8b4ac2f Mon Sep 17 00:00:00 2001 From: Xiao Chen Date: Wed, 22 Jan 2025 13:41:50 -0500 Subject: [PATCH] fix(amazonq): open diff in a new tab when another modal is open --- .../bugfix-1a28cd4b-54eb-46bb-b0c6-2f9abc8fa9e6.json | 4 ++++ .../jetbrains/services/amazonqDoc/controller/DocController.kt | 1 + 2 files changed, 5 insertions(+) create mode 100644 .changes/next-release/bugfix-1a28cd4b-54eb-46bb-b0c6-2f9abc8fa9e6.json diff --git a/.changes/next-release/bugfix-1a28cd4b-54eb-46bb-b0c6-2f9abc8fa9e6.json b/.changes/next-release/bugfix-1a28cd4b-54eb-46bb-b0c6-2f9abc8fa9e6.json new file mode 100644 index 0000000000..312fec1ae1 --- /dev/null +++ b/.changes/next-release/bugfix-1a28cd4b-54eb-46bb-b0c6-2f9abc8fa9e6.json @@ -0,0 +1,4 @@ +{ + "type" : "bugfix", + "description" : "Amazon Q /doc: fix open diff in a tab when another modal is open" +} \ No newline at end of file diff --git a/plugins/amazonq/chat/jetbrains-community/src/software/aws/toolkits/jetbrains/services/amazonqDoc/controller/DocController.kt b/plugins/amazonq/chat/jetbrains-community/src/software/aws/toolkits/jetbrains/services/amazonqDoc/controller/DocController.kt index 2d3729532a..430c6c5e4a 100644 --- a/plugins/amazonq/chat/jetbrains-community/src/software/aws/toolkits/jetbrains/services/amazonqDoc/controller/DocController.kt +++ b/plugins/amazonq/chat/jetbrains-community/src/software/aws/toolkits/jetbrains/services/amazonqDoc/controller/DocController.kt @@ -804,6 +804,7 @@ class DocController( followUp = getFollowUpOptions(session.sessionState.phase) ) + this.toolWindow?.activate(null, true) processOpenDiff( message = IncomingDocMessage.OpenDiff(tabId = followUpMessage.tabId, filePath = filePaths[0].zipFilePath, deleted = false) )