Skip to content

Commit e06906f

Browse files
authored
docs(amazonq): Update /dev auto build setting strings (#6444)
## Problem "Dev Command Workspace Configurations" is overly broad and too ambiguous with regards to what this setting enables. ## Solution Worked with tech writer to establish a different string to present to customers. --- - Treat all work as PUBLIC. Private `feature/x` branches will not be squash-merged at release time. - Your code changes must meet the guidelines in [CONTRIBUTING.md](https://github.com/aws/aws-toolkit-vscode/blob/master/CONTRIBUTING.md#guidelines). - License: I confirm that my contribution is made under the terms of the Apache 2.0 license.
1 parent 8fd89a3 commit e06906f

File tree

8 files changed

+20
-20
lines changed

8 files changed

+20
-20
lines changed

packages/amazonq/package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -127,8 +127,8 @@
127127
"markdownDescription": "%AWS.configuration.description.amazonq%",
128128
"default": true
129129
},
130-
"amazonQ.devCommandWorkspaceConfigurations": {
131-
"markdownDescription": "%AWS.configuration.description.devCommandWorkspaceConfigurations%",
130+
"amazonQ.allowFeatureDevelopmentToRunCodeAndTests": {
131+
"markdownDescription": "%AWS.configuration.description.featureDevelopment.allowRunningCodeAndTests%",
132132
"type": "object",
133133
"default": {}
134134
},

packages/amazonq/test/unit/amazonqFeatureDev/util/files.test.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ const testDevfilePrepareRepo = async (devfileEnabled: boolean) => {
4343

4444
const workspace = getWorkspaceFolder(folder.path)
4545
sinon
46-
.stub(CodeWhispererSettings.instance, 'getDevCommandWorkspaceConfigurations')
46+
.stub(CodeWhispererSettings.instance, 'getAutoBuildSetting')
4747
.returns(devfileEnabled ? { [workspace.uri.fsPath]: true } : {})
4848

4949
await testPrepareRepoData(workspace, expectedFiles)

packages/core/package.nls.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@
2020
"AWS.configuration.description.suppressPrompts": "Prompts which ask for confirmation. Checking an item suppresses the prompt.",
2121
"AWS.configuration.enableCodeLenses": "Enable SAM hints in source code and template.yaml files",
2222
"AWS.configuration.description.resources.enabledResources": "AWS resources to display in the 'Resources' portion of the explorer.",
23-
"AWS.configuration.description.devCommandWorkspaceConfigurations": "Amazon Q: Allow Q /dev to run code and test commands",
23+
"AWS.configuration.description.featureDevelopment.allowRunningCodeAndTests": "Allow /dev to run code and test commands",
2424
"AWS.configuration.description.experiments": "Try experimental features and give feedback. Note that experimental features may be removed at any time.\n * `jsonResourceModification` - Enables basic create, update, and delete support for cloud resources via the JSON Resources explorer component.\n * `ec2RemoteConnect` - Allows interfacing with EC2 instances with options to start, stop, and establish remote connections. Remote connections are done over SSM and can be through a terminal or a remote VSCode window.",
2525
"AWS.stepFunctions.asl.format.enable.desc": "Enables the default formatter used with Amazon States Language files",
2626
"AWS.stepFunctions.asl.maxItemsComputed.desc": "The maximum number of outline symbols and folding regions computed (limited for performance reasons).",

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

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -157,9 +157,9 @@ export class FeatureDevController {
157157
this.sendFeedback()
158158
break
159159
case FollowUpTypes.AcceptAutoBuild:
160-
return this.processDevCommandWorkspaceSetting(true, data)
160+
return this.processAutoBuildSetting(true, data)
161161
case FollowUpTypes.DenyAutoBuild:
162-
return this.processDevCommandWorkspaceSetting(false, data)
162+
return this.processAutoBuildSetting(false, data)
163163
case FollowUpTypes.GenerateDevFile:
164164
this.messenger.sendAnswer({
165165
type: 'system-prompt',
@@ -393,7 +393,7 @@ export class FeatureDevController {
393393
}
394394

395395
const root = session.getWorkspaceRoot()
396-
const autoBuildProjectSetting = CodeWhispererSettings.instance.getDevCommandWorkspaceConfigurations()
396+
const autoBuildProjectSetting = CodeWhispererSettings.instance.getAutoBuildSetting()
397397
const hasDevfile = await checkForDevFile(root)
398398
const isPromptedForAutoBuildFeature = Object.keys(autoBuildProjectSetting).includes(root)
399399

@@ -676,9 +676,9 @@ export class FeatureDevController {
676676
this.messenger.sendUpdatePlaceholder(tabID, i18n('AWS.amazonq.featureDev.placeholder.additionalImprovements'))
677677
}
678678

679-
private async processDevCommandWorkspaceSetting(setting: boolean, msg: any) {
679+
private async processAutoBuildSetting(setting: boolean, msg: any) {
680680
const root = (await this.sessionStorage.getSession(msg.tabID)).getWorkspaceRoot()
681-
await CodeWhispererSettings.instance.updateDevCommandWorkspaceConfigurations(root, setting)
681+
await CodeWhispererSettings.instance.updateAutoBuildSetting(root, setting)
682682

683683
this.messenger.sendAnswer({
684684
message: i18n('AWS.amazonq.featureDev.answer.settingUpdated'),

packages/core/src/amazonqFeatureDev/util/files.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -40,8 +40,8 @@ export async function prepareRepoData(
4040
zip: AdmZip = new AdmZip()
4141
) {
4242
try {
43-
const devCommandWorkspaceConfigurations = CodeWhispererSettings.instance.getDevCommandWorkspaceConfigurations()
44-
const useAutoBuildFeature = devCommandWorkspaceConfigurations[repoRootPaths[0]] ?? false
43+
const autoBuildSetting = CodeWhispererSettings.instance.getAutoBuildSetting()
44+
const useAutoBuildFeature = autoBuildSetting[repoRootPaths[0]] ?? false
4545
// We only respect gitignore file rules if useAutoBuildFeature is on, this is to avoid dropping necessary files for building the code (e.g. png files imported in js code)
4646
const files = await collectFiles(repoRootPaths, workspaceFolders, true, maxRepoSizeBytes, !useAutoBuildFeature)
4747

packages/core/src/codewhisperer/util/codewhispererSettings.ts

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ const description = {
1313
workspaceIndexWorkerThreads: Number,
1414
workspaceIndexUseGPU: Boolean,
1515
workspaceIndexMaxSize: Number,
16-
devCommandWorkspaceConfigurations: Object,
16+
allowFeatureDevelopmentToRunCodeAndTests: Object,
1717
ignoredSecurityIssues: ArrayConstructor(String),
1818
}
1919

@@ -51,16 +51,16 @@ export class CodeWhispererSettings extends fromExtensionManifest('amazonQ', desc
5151
return Math.max(this.get('workspaceIndexMaxSize', 250), 1)
5252
}
5353

54-
public getDevCommandWorkspaceConfigurations(): { [key: string]: boolean } {
55-
return this.get('devCommandWorkspaceConfigurations', {})
54+
public getAutoBuildSetting(): { [key: string]: boolean } {
55+
return this.get('allowFeatureDevelopmentToRunCodeAndTests', {})
5656
}
5757

58-
public async updateDevCommandWorkspaceConfigurations(projectName: string, setting: boolean) {
59-
const projects = this.getDevCommandWorkspaceConfigurations()
58+
public async updateAutoBuildSetting(projectName: string, setting: boolean) {
59+
const projects = this.getAutoBuildSetting()
6060

6161
projects[projectName] = setting
6262

63-
await this.update('devCommandWorkspaceConfigurations', projects)
63+
await this.update('allowFeatureDevelopmentToRunCodeAndTests', projects)
6464
}
6565

6666
public getIgnoredSecurityIssues(): string[] {

packages/core/src/shared/clients/s3Client.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -463,9 +463,9 @@ export class DefaultS3Client {
463463
MaxKeys: request.maxResults ?? DEFAULT_MAX_KEYS,
464464
/**
465465
* Set '' as the default prefix to ensure that the bucket's content will be displayed
466-
* when the user has at least list access to the root of the bucket.
466+
* when the user has at least list access to the root of the bucket
467467
* https://github.com/aws/aws-toolkit-vscode/issues/4643
468-
* @default ''
468+
* @default ''
469469
*/
470470
Prefix: request.folderPath ?? defaultPrefix,
471471
ContinuationToken: request.continuationToken,

packages/core/src/shared/settings-amazonq.gen.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ export const amazonqSettings = {
2121
"ssoCacheError": {}
2222
},
2323
"amazonQ.showInlineCodeSuggestionsWithCodeReferences": {},
24-
"amazonQ.devCommandWorkspaceConfigurations": {},
24+
"amazonQ.allowFeatureDevelopmentToRunCodeAndTests": {},
2525
"amazonQ.importRecommendationForInlineCodeSuggestions": {},
2626
"amazonQ.shareContentWithAWS": {},
2727
"amazonQ.workspaceIndex": {},

0 commit comments

Comments
 (0)