Skip to content

Commit f4b1634

Browse files
committed
feat(amazonq): Pass project configuration to LSP client
1 parent 879584e commit f4b1634

File tree

1 file changed

+7
-8
lines changed

1 file changed

+7
-8
lines changed

packages/amazonq/src/lsp/client.ts

Lines changed: 7 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ import {
2020
updateConfigurationRequestType,
2121
WorkspaceFolder,
2222
} from '@aws/language-server-runtimes/protocol'
23-
import { AuthUtil, getSelectedCustomization } from 'aws-core-vscode/codewhisperer'
23+
import { AuthUtil, CodeWhispererSettings, getSelectedCustomization } from 'aws-core-vscode/codewhisperer'
2424
import {
2525
Settings,
2626
oidcClientName,
@@ -92,20 +92,19 @@ export async function startLanguageServer(
9292
customization,
9393
optOutTelemetry: getOptOutPreference() === 'OPTOUT',
9494
projectContext: {
95-
enableLocalIndexing: true,
95+
enableLocalIndexing: CodeWhispererSettings.instance.isLocalIndexEnabled(),
96+
enableGpuAcceleration: CodeWhispererSettings.instance.isLocalIndexGPUEnabled(),
97+
indexWorkerThreads: CodeWhispererSettings.instance.getIndexWorkerThreads(),
9698
},
9799
},
98100
]
99101
}
100102
if (params.items[0].section === 'aws.codeWhisperer') {
101103
return [
102104
{
103-
includeSuggestionsWithCodeReferences: vscode.workspace
104-
.getConfiguration()
105-
.get('amazonQ.showCodeWithReferences'),
106-
shareCodeWhispererContentWithAWS: vscode.workspace
107-
.getConfiguration()
108-
.get('amazonQ.shareContentWithAWS'),
105+
includeSuggestionsWithCodeReferences:
106+
CodeWhispererSettings.instance.isSuggestionsWithCodeReferencesEnabled(),
107+
shareCodeWhispererContentWithAWS: !CodeWhispererSettings.instance.isOptoutEnabled(),
109108
},
110109
]
111110
}

0 commit comments

Comments
 (0)