66import vscode , { env , version } from 'vscode'
77import * as nls from 'vscode-nls'
88import * as crypto from 'crypto'
9- import { LanguageClient , LanguageClientOptions } from 'vscode-languageclient'
10- import { InlineCompletionManager } from '../app/inline/completion'
9+ import { LanguageClient , LanguageClientOptions , RequestType } from 'vscode-languageclient'
10+ // import { InlineCompletionManager } from '../app/inline/completion'
1111import { AmazonQLspAuth , encryptionKey , notificationTypes } from './auth'
1212import { AuthUtil } from 'aws-core-vscode/codewhisperer'
1313import {
@@ -16,7 +16,9 @@ import {
1616 DeleteFilesParams ,
1717 DidChangeWorkspaceFoldersParams ,
1818 DidSaveTextDocumentParams ,
19+ GetConfigurationFromServerParams ,
1920 RenameFilesParams ,
21+ ResponseMessage ,
2022 WorkspaceFolder ,
2123} from '@aws/language-server-runtimes/protocol'
2224import { Settings , oidcClientName , createServerOptions , globals , Experiments , getLogger } from 'aws-core-vscode/shared'
@@ -102,8 +104,8 @@ export async function startLanguageServer(
102104
103105 return client . onReady ( ) . then ( async ( ) => {
104106 await auth . init ( )
105- const inlineManager = new InlineCompletionManager ( client )
106- inlineManager . registerInlineCompletion ( )
107+ // const inlineManager = new InlineCompletionManager(client)
108+ // inlineManager.registerInlineCompletion()
107109 if ( Experiments . instance . get ( 'amazonqChatLSP' , false ) ) {
108110 activate ( client , encryptionKey , resourcePaths . mynahUI )
109111 }
@@ -134,6 +136,15 @@ export async function startLanguageServer(
134136 AuthUtil . instance . auth . onDidDeleteConnection ( async ( ) => {
135137 client . sendNotification ( notificationTypes . deleteBearerToken . method )
136138 } ) ,
139+ vscode . commands . registerCommand ( 'aws.amazonq.getWorkspaceId' , async ( ) => {
140+ const requestType = new RequestType < GetConfigurationFromServerParams , ResponseMessage , Error > (
141+ 'aws/getConfigurationFromServer'
142+ )
143+ const workspaceIdResp = await client . sendRequest ( requestType . method , {
144+ section : 'aws.q.workspaceContext' ,
145+ } )
146+ return workspaceIdResp
147+ } ) ,
137148 vscode . workspace . onDidCreateFiles ( ( e ) => {
138149 client . sendNotification ( 'workspace/didCreateFiles' , {
139150 files : e . files . map ( ( it ) => {
@@ -179,8 +190,8 @@ export async function startLanguageServer(
179190 } ) ,
180191 } ,
181192 } as DidChangeWorkspaceFoldersParams )
182- } ) ,
183- inlineManager
193+ } )
194+ // inlineManager
184195 )
185196 } )
186197}
0 commit comments