Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
{
"type" : "bugfix",
"description" : "Amazon Q /doc: fix open diff in a tab when another modal is open"
}
Original file line number Diff line number Diff line change
Expand Up @@ -371,6 +371,7 @@ class DocController(
}

override suspend fun processOpenDiff(message: IncomingDocMessage.OpenDiff) {
this.toolWindow?.activate(null)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

can you take a look at the /dev implementation of this?

private fun putDiff(filePath: String, request: SimpleDiffRequest) {
// Close any existing diff and open a new diff, as the diff virtual file does not appear to allow replacing content directly:
val existingDiff = diffVirtualFiles[filePath]
if (existingDiff != null) {
FileEditorManager.getInstance(context.project).closeFile(existingDiff)
}
val newDiff = ChainDiffVirtualFile(SimpleDiffRequestChain(request), filePath)
DiffEditorTabFilesManager.getInstance(context.project).showDiffFile(newDiff, true)

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This works.
Thanks!!

val session = getSessionInfo(message.tabId)

val project = context.project
Expand Down
Loading