Skip to content
Merged
Show file tree
Hide file tree
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
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
{
"type": "Bug Fix",
"description": "Amazon Q /doc: Prompt user to choose a folder in chat"
}
2 changes: 2 additions & 0 deletions packages/core/package.nls.json
Original file line number Diff line number Diff line change
Expand Up @@ -374,6 +374,8 @@
"AWS.amazonq.doc.answer.generating": "Generating documentation",
"AWS.amazonq.doc.answer.creating": "Okay, I'm creating a README for your project. This may take a few minutes.",
"AWS.amazonq.doc.answer.updating": "Okay, I'm updating the README to reflect your code changes. This may take a few minutes.",
"AWS.amazonq.doc.answer.chooseFolder": "Choose a folder to continue.",
"AWS.amazonq.doc.error.noFolderSelected": "It looks like you didn't choose a folder. Choose a folder to continue.",
"AWS.amazonq.doc.error.contentLengthError": "Your workspace is too large for me to review. Your workspace must be within the quota, even if you choose a smaller folder. For more information on quotas, see the <a href=\"https://docs.aws.amazon.com/amazonq/latest/qdeveloper-ug/doc-generation.html#quotas\" target=\"_blank\">Amazon Q Developer documentation.</a>",
"AWS.amazonq.doc.error.readmeTooLarge": "The README in your folder is too large for me to review. Try reducing the size of your README, or choose a folder with a smaller README. For more information on quotas, see the <a href=\"https://docs.aws.amazon.com/amazonq/latest/qdeveloper-ug/doc-generation.html#quotas\" target=\"_blank\">Amazon Q Developer documentation.</a>",
"AWS.amazonq.doc.error.workspaceEmpty": "The folder you chose did not contain any source files in a supported language. Choose another folder and try again. For more information on supported languages, see the <a href=\"https://docs.aws.amazon.com/amazonq/latest/qdeveloper-ug/doc-generation.html\" target=\"_blank\">Amazon Q Developer documentation.</a>",
Expand Down
11 changes: 9 additions & 2 deletions packages/core/src/amazonqDoc/controllers/chat/controller.ts
Original file line number Diff line number Diff line change
Expand Up @@ -116,10 +116,17 @@ export class DocController {
}

/** Prompts user to choose a folder in current workspace for README creation/update.
* After user chooses a folder, displays confimraiton message to user with selected path.
* After user chooses a folder, displays confirmation message to user with selected path.
*
*/
private async folderSelector(data: any) {
this.messenger.sendAnswer({
type: 'answer',
tabID: data.tabID,
message: i18n('AWS.amazonq.doc.answer.chooseFolder'),
disableChatInput: true,
})

const uri = await createSingleFileDialog({
canSelectFolders: true,
canSelectFiles: false,
Expand All @@ -133,7 +140,7 @@ export class DocController {
this.messenger.sendAnswer({
type: 'answer',
tabID: data.tabID,
message: 'No folder was selected, please try again.',
message: i18n('AWS.amazonq.doc.error.noFolderSelected'),
followUps: retryFollowUps,
disableChatInput: true,
})
Expand Down
Loading