Skip to content

Commit 5b6c766

Browse files
authored
Merge pull request #1579 from kumsmrit/kumsmrit/featureDev-bugfix
fix: Handle case when user cancels and close dialog without new folder selection
2 parents 4b9eec6 + 2b71f0e commit 5b6c766

File tree

1 file changed

+15
-3
lines changed
  • packages/toolkit/src/amazonqFeatureDev/controllers/chat

1 file changed

+15
-3
lines changed

packages/toolkit/src/amazonqFeatureDev/controllers/chat/controller.ts

Lines changed: 15 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -478,9 +478,6 @@ export class FeatureDevController {
478478
} finally {
479479
// Finish processing the event
480480
this.messenger.sendAsyncEventProgress(message.tabID, false, undefined)
481-
482-
// Lock the chat input until they explicitly click one of the follow ups
483-
this.messenger.sendChatInputEnabled(message.tabID, false)
484481
}
485482
}
486483

@@ -522,6 +519,21 @@ export class FeatureDevController {
522519
canSelectFiles: false,
523520
}).prompt()
524521

522+
if (!(uri instanceof vscode.Uri)) {
523+
this.messenger.sendAnswer({
524+
tabID: message.tabID,
525+
type: 'system-prompt',
526+
followUps: [
527+
{
528+
pillText: 'Select files for context',
529+
type: 'ModifyDefaultSourceFolder',
530+
status: 'info',
531+
},
532+
],
533+
})
534+
return
535+
}
536+
525537
if (uri instanceof vscode.Uri && !vscode.workspace.getWorkspaceFolder(uri)) {
526538
this.messenger.sendAnswer({
527539
tabID: message.tabID,

0 commit comments

Comments
 (0)