@@ -25,7 +25,6 @@ import {
2525 IndexRequestType ,
2626 QueryInlineProjectContextRequestType ,
2727 QueryRequestType ,
28- UpdateIndexRequestType ,
2928 UpdateIndexV2RequestPayload ,
3029 UpdateIndexV2RequestType ,
3130 Usage ,
@@ -90,7 +89,6 @@ export class LspClient {
9089 }
9190 }
9291
93- // v2
9492 async indexFilesV2 ( paths : string [ ] , rootPath : string , config : IndexConfig ) {
9593 const payload : BuildIndexRequestPayload = {
9694 filePaths : paths ,
@@ -146,21 +144,6 @@ export class LspClient {
146144 }
147145 }
148146
149- async updateIndex ( filePath : string ) {
150- try {
151- const encryptedRequest = await this . encrypt (
152- JSON . stringify ( {
153- filePath : filePath ,
154- } )
155- )
156- const resp = await this . client ?. sendRequest ( UpdateIndexRequestType , encryptedRequest )
157- return resp
158- } catch ( e ) {
159- getLogger ( ) . error ( `LspClient: updateIndex error: ${ e } ` )
160- return undefined
161- }
162- }
163-
164147 // not yet account for file move
165148 // v2
166149 async updateIndexV2 ( filePath : string [ ] , mode : 'update' | 'remove' | 'add' ) {
@@ -261,11 +244,10 @@ export async function activate(extensionContext: ExtensionContext) {
261244 return
262245 }
263246 savedDocument = document . uri
264- void LspClient . instance . updateIndexV2 ( [ document . uri . fsPath ] , 'update' )
265247 } ) ,
266248 vscode . window . onDidChangeActiveTextEditor ( ( editor ) => {
267249 if ( savedDocument && editor && editor . document . uri . fsPath !== savedDocument . fsPath ) {
268- // void LspClient.instance.updateIndexV2([editor.document.uri.fsPath], 'update')
250+ void LspClient . instance . updateIndexV2 ( [ editor . document . uri . fsPath ] , 'update' )
269251 }
270252 } ) ,
271253 vscode . workspace . onDidCreateFiles ( ( e ) => {
@@ -279,9 +261,6 @@ export async function activate(extensionContext: ExtensionContext) {
279261 e . files . map ( ( f ) => f . fsPath ) ,
280262 'remove'
281263 )
282- } ) ,
283- vscode . workspace . onDidRenameFiles ( ( e ) => {
284- // void LspClient.instance.updateIndexV2(e.files.map((f) => f.newUri.fsPath), 'rename')
285264 } )
286265 )
287266
0 commit comments