Skip to content
Merged
Changes from all commits
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
11 changes: 10 additions & 1 deletion packages/core/src/amazonq/webview/ui/quickActions/handler.ts
Original file line number Diff line number Diff line change
Expand Up @@ -155,7 +155,7 @@ export class QuickActionHandler {
}
}

private handleTestCommand(chatPrompt: ChatPrompt, tabID: string, eventId: string | undefined) {
private handleTestCommand(chatPrompt: ChatPrompt, tabID: string | undefined, eventId: string | undefined) {
if (!this.isTestEnabled || !this.mynahUI) {
return
}
Expand All @@ -169,6 +169,15 @@ export class QuickActionHandler {
return
}

/**
* right click -> generate test has no tab id
* we have to manually create one if a testgen tab
* wasn't previously created
*/
if (!tabID) {
tabID = this.mynahUI.updateStore('', {})
}

// if there is no test tab, open a new one
const affectedTabId: string | undefined = this.addTab(tabID)

Expand Down