@@ -23,7 +23,7 @@ import {
2323 GetUsageRequestType ,
2424 IndexConfig ,
2525 QueryInlineProjectContextRequestType ,
26- QueryRequestType ,
26+ QueryVectorIndexRequestType ,
2727 UpdateIndexV2RequestPayload ,
2828 UpdateIndexV2RequestType ,
2929 Usage ,
@@ -71,7 +71,7 @@ export class LspClient {
7171 . encrypt ( key )
7272 }
7373
74- async indexFiles ( paths : string [ ] , rootPath : string , config : IndexConfig ) {
74+ async buildIndex ( paths : string [ ] , rootPath : string , config : IndexConfig ) {
7575 const payload : BuildIndexRequestPayload = {
7676 filePaths : paths ,
7777 projectRoot : rootPath ,
@@ -83,22 +83,22 @@ export class LspClient {
8383 const resp = await this . client ?. sendRequest ( BuildIndexRequestType , encryptedRequest )
8484 return resp
8585 } catch ( e ) {
86- getLogger ( ) . error ( `LspClient: indexFilesV2 error: ${ e } ` )
86+ getLogger ( ) . error ( `LspClient: buildIndex error: ${ e } ` )
8787 return undefined
8888 }
8989 }
9090
91- async query ( request : string ) {
91+ async queryVectorIndex ( request : string ) {
9292 try {
9393 const encryptedRequest = await this . encrypt (
9494 JSON . stringify ( {
9595 query : request ,
9696 } )
9797 )
98- const resp = await this . client ?. sendRequest ( QueryRequestType , encryptedRequest )
98+ const resp = await this . client ?. sendRequest ( QueryVectorIndexRequestType , encryptedRequest )
9999 return resp
100100 } catch ( e ) {
101- getLogger ( ) . error ( `LspClient: query error: ${ e } ` )
101+ getLogger ( ) . error ( `LspClient: queryVectorIndex error: ${ e } ` )
102102 return [ ]
103103 }
104104 }
@@ -109,9 +109,7 @@ export class LspClient {
109109 query : query ,
110110 filePath : path ,
111111 } )
112-
113112 const encrpted = await this . encrypt ( request )
114-
115113 let resp : any = await this . client ?. sendRequest ( QueryInlineProjectContextRequestType , encrpted )
116114 return resp
117115 } catch ( e ) {
@@ -136,7 +134,7 @@ export class LspClient {
136134 const resp = await this . client ?. sendRequest ( UpdateIndexV2RequestType , encryptedRequest )
137135 return resp
138136 } catch ( e ) {
139- getLogger ( ) . error ( `LspClient: updateIndexV2 error: ${ e } ` )
137+ getLogger ( ) . error ( `LspClient: updateIndex error: ${ e } ` )
140138 return undefined
141139 }
142140 }
0 commit comments