Skip to content

Commit 53fec8f

Browse files
committed
fix: handle case when user cancels and close dialog without new folder selection
1 parent 82c9524 commit 53fec8f

File tree

1 file changed

+15
-3
lines changed

1 file changed

+15
-3
lines changed

src/amazonqFeatureDev/controllers/chat/controller.ts

Lines changed: 15 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -474,9 +474,6 @@ export class FeatureDevController {
474474
} finally {
475475
// Finish processing the event
476476
this.messenger.sendAsyncEventProgress(message.tabID, false, undefined)
477-
478-
// Lock the chat input until they explicitly click one of the follow ups
479-
this.messenger.sendChatInputEnabled(message.tabID, false)
480477
}
481478
}
482479

@@ -518,6 +515,21 @@ export class FeatureDevController {
518515
canSelectFiles: false,
519516
}).prompt()
520517

518+
if (!(uri instanceof vscode.Uri)) {
519+
this.messenger.sendAnswer({
520+
tabID: message.tabID,
521+
type: 'system-prompt',
522+
followUps: [
523+
{
524+
pillText: 'Select files for context',
525+
type: 'ModifyDefaultSourceFolder',
526+
status: 'info',
527+
},
528+
],
529+
})
530+
return
531+
}
532+
521533
if (uri instanceof vscode.Uri && !vscode.workspace.getWorkspaceFolder(uri)) {
522534
this.messenger.sendAnswer({
523535
tabID: message.tabID,

0 commit comments

Comments
 (0)