Skip to content

Commit dfaaedc

Browse files
committed
chore(amazonq): change extraContext config name to include inlineSuggestions
1 parent f19d01a commit dfaaedc

File tree

4 files changed

+10
-4
lines changed

4 files changed

+10
-4
lines changed

client/vscode/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -235,7 +235,7 @@
235235
"type": "string",
236236
"description": "The selected Q customization"
237237
},
238-
"aws.q.extraContext": {
238+
"aws.q.inlineSuggestions.extraContext": {
239239
"scope": "resource",
240240
"type": "string",
241241
"description": "Extra context for Q Inline Suggestions"

server/aws-lsp-codewhisperer/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -93,4 +93,4 @@ const params: InitializeParams = {
9393
```
9494

9595
### Extra context for Q Inline Suggestions
96-
In cases when the client runs in a specific environment that requires customized suggestions, the server supports a `aws.q.extraContext` workspace configuration. This extra context will be passed to the left file content of the request in the beginning of the file.
96+
In cases when the client runs in a specific environment that requires customized suggestions, the server supports a `aws.q.inlineSuggestions.extraContext` workspace configuration. This extra context will be passed to the left file content of the request in the beginning of the file.

server/aws-lsp-codewhisperer/src/language-server/codeWhispererServer.test.ts

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -243,7 +243,13 @@ describe('CodeWhisperer Server', () => {
243243

244244
it('should include extra context in recommendation request when extraContext is configured', async () => {
245245
const extraContext = 'Additional context for test'
246-
features.lsp.workspace.getConfiguration.returns(Promise.resolve({ extraContext }))
246+
features.lsp.workspace.getConfiguration.returns(
247+
Promise.resolve({
248+
inlineSuggestions: {
249+
extraContext,
250+
},
251+
})
252+
)
247253

248254
await features.openDocument(SOME_FILE).doChangeConfiguration()
249255

server/aws-lsp-codewhisperer/src/language-server/codeWhispererServer.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -624,7 +624,7 @@ export const CodewhispererServerFactory =
624624
// telemetryService.updateEnableTelemetryEventsToDestination(enableTelemetryEventsToDestination)
625625
const optOutTelemetryPreference = qConfig['optOutTelemetry'] === true ? 'OPTOUT' : 'OPTIN'
626626
telemetryService.updateOptOutPreference(optOutTelemetryPreference)
627-
extraContext = qConfig['extraContext']
627+
extraContext = qConfig.inlineSuggestions?.extraContext
628628
}
629629

630630
const config = await lsp.workspace.getConfiguration('aws.codeWhisperer')

0 commit comments

Comments
 (0)