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": "Bug Fix",
"description": "Fix a bug where subsequent /review did not work after reviewing once"
}
1 change: 1 addition & 0 deletions packages/amazonq/src/app/amazonqScan/app.ts
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ export function init(appContext: AmazonQAppInitContext) {
authClicked: new vscode.EventEmitter<any>(),
tabOpened: new vscode.EventEmitter<any>(),
tabClosed: new vscode.EventEmitter<any>(),
runScan: new vscode.EventEmitter<any>(),
formActionClicked: new vscode.EventEmitter<any>(),
errorThrown: new vscode.EventEmitter<any>(),
showSecurityScan: new vscode.EventEmitter<any>(),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ export class ScanController {
this.authController = new AuthController()

this.chatControllerMessageListeners.tabOpened.event((data) => {
return this.tabOpened(data).then(() => this.scanInitiated(data))
return this.tabOpened(data)
})

this.chatControllerMessageListeners.tabClosed.event((data) => {
Expand All @@ -60,6 +60,10 @@ export class ScanController {
this.authClicked(data)
})

this.chatControllerMessageListeners.runScan.event((data) => {
return this.scanInitiated(data)
})

this.chatControllerMessageListeners.formActionClicked.event((data) => {
return this.formActionClicked(data)
})
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,9 @@ export class UIMessageListener {
case 'auth-follow-up-was-clicked':
this.authClicked(msg)
break
case 'review':
this.scan(msg)
break
case 'form-action-click':
this.formActionClicked(msg)
break
Expand All @@ -58,6 +61,12 @@ export class UIMessageListener {
}
}

private scan(msg: UIMessage) {
this.scanControllerEventsEmitters?.runScan.fire({
tabID: msg.tabID,
})
}

private formActionClicked(msg: UIMessage) {
this.scanControllerEventsEmitters?.formActionClicked.fire({
...msg,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,8 @@ export class Connector {
this.onNewTab('agentWalkthrough')
return
} else if (messageData.command === 'review') {
this.onNewTab('review')
// tabID does not exist when calling from QuickAction Menu bar
this.handleCommand({ command: '/review' }, '')
return
}
}
Expand Down
1 change: 1 addition & 0 deletions packages/core/src/amazonqScan/controller.ts
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ export interface ScanChatControllerEventEmitters {
readonly tabOpened: vscode.EventEmitter<any>
readonly tabClosed: vscode.EventEmitter<any>
readonly authClicked: vscode.EventEmitter<any>
readonly runScan: vscode.EventEmitter<any>
readonly formActionClicked: vscode.EventEmitter<any>
readonly errorThrown: vscode.EventEmitter<any>
readonly showSecurityScan: vscode.EventEmitter<any>
Expand Down
Loading