Skip to content

Commit ab47a46

Browse files
committed
Add webviews for Amazon Q IAM credentials option and form
1 parent a42118d commit ab47a46

File tree

3 files changed

+37
-15
lines changed

3 files changed

+37
-15
lines changed

aws-toolkit-vscode.code-workspace

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,12 @@
1212
{
1313
"path": "packages/amazonq",
1414
},
15+
{
16+
"path": "../language-servers",
17+
},
18+
{
19+
"path": "../language-server-runtimes",
20+
},
1521
],
1622
"settings": {
1723
"typescript.tsdk": "node_modules/typescript/lib",

packages/amazonq/.vscode/launch.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,10 +13,10 @@
1313
"args": ["--extensionDevelopmentPath=${workspaceFolder}"],
1414
"env": {
1515
"SSMDOCUMENT_LANGUAGESERVER_PORT": "6010",
16-
"WEBPACK_DEVELOPER_SERVER": "http://localhost:8080"
16+
"WEBPACK_DEVELOPER_SERVER": "http://localhost:8080",
1717
// Below allows for overrides used during development
18-
// "__AMAZONQLSP_PATH": "${workspaceFolder}/../../../language-servers/app/aws-lsp-codewhisperer-runtimes/out/agent-standalone.js",
19-
// "__AMAZONQLSP_UI": "${workspaceFolder}/../../../language-servers/chat-client/build/amazonq-ui.js"
18+
"__AMAZONQLSP_PATH": "${workspaceFolder}/../../../language-servers/app/aws-lsp-codewhisperer-runtimes/out/agent-standalone.js",
19+
"__AMAZONQLSP_UI": "${workspaceFolder}/../../../language-servers/chat-client/build/amazonq-ui.js"
2020
},
2121
"envFile": "${workspaceFolder}/.local.env",
2222
"outFiles": ["${workspaceFolder}/dist/**/*.js", "${workspaceFolder}/../core/dist/**/*.js"],

packages/core/src/login/webview/vue/login.vue

Lines changed: 28 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -123,6 +123,16 @@
123123
:itemType="LoginOption.ENTERPRISE_SSO"
124124
class="selectable-item bottomMargin"
125125
></SelectableItem>
126+
<SelectableItem
127+
v-if="app === 'AMAZONQ'"
128+
@toggle="toggleItemSelection"
129+
:isSelected="selectedLoginOption === LoginOption.IAM_CREDENTIAL"
130+
:itemId="LoginOption.IAM_CREDENTIAL"
131+
:itemText="''"
132+
:itemTitle="'Use with IAM Credentials'"
133+
:itemType="LoginOption.IAM_CREDENTIAL"
134+
class="selectable-item bottomMargin"
135+
></SelectableItem>
126136
<SelectableItem
127137
v-if="app === 'TOOLKIT'"
128138
@toggle="toggleItemSelection"
@@ -238,17 +248,19 @@
238248
</svg>
239249
</button>
240250
<div class="header">IAM Credentials:</div>
241-
<div class="hint">Credentials will be added to the appropriate ~/.aws/ files</div>
242-
<div class="title topMargin">Profile Name</div>
243-
<div class="hint">The identifier for these credentials</div>
244-
<input
245-
class="iamInput bottomMargin"
246-
type="text"
247-
id="profileName"
248-
name="profileName"
249-
v-model="profileName"
250-
@keydown.enter="handleContinueClick()"
251-
/>
251+
<div v-if="app === 'TOOLKIT'">
252+
<div class="hint">Credentials will be added to the appropriate ~/.aws/ files</div>
253+
<div class="title topMargin">Profile Name</div>
254+
<div class="hint">The identifier for these credentials</div>
255+
<input
256+
class="iamInput bottomMargin"
257+
type="text"
258+
id="profileName"
259+
name="profileName"
260+
v-model="profileName"
261+
@keydown.enter="handleContinueClick()"
262+
/>
263+
</div>
252264
<div class="title">Access Key</div>
253265
<input
254266
class="iamInput bottomMargin"
@@ -587,7 +599,11 @@ export default defineComponent({
587599
return this.startUrl.length == 0 || this.startUrlError.length > 0 || !this.selectedRegion
588600
},
589601
shouldDisableIamContinue() {
590-
return this.profileName.length <= 0 || this.accessKey.length <= 0 || this.secretKey.length <= 0
602+
if (this.app === 'TOOLKIT') {
603+
return this.profileName.length <= 0 || this.accessKey.length <= 0 || this.secretKey.length <= 0
604+
} else {
605+
return this.accessKey.length <= 0 || this.secretKey.length <= 0
606+
}
591607
},
592608
},
593609
})

0 commit comments

Comments
 (0)