Skip to content

Commit 66f0fd4

Browse files
committed
fix: upgrade to latest, correct runtimes package
1 parent ccefcc0 commit 66f0fd4

File tree

1 file changed

+9
-9
lines changed

1 file changed

+9
-9
lines changed

server/aws-lsp-codewhisperer/src/language-server/localProjectContext/localProjectContextController.ts

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ export class LocalProjectContextController {
3939
private workspaceFolders: WorkspaceFolder[]
4040
private _vecLib?: VectorLibAPI
4141
private readonly clientName: string
42-
private readonly log?: Logging
42+
private readonly log: Logging
4343

4444
private readonly workspaceIndexConfiguration?: WorkspaceIndexConfiguration
4545
private includeSymlinks?: boolean
@@ -50,7 +50,7 @@ export class LocalProjectContextController {
5050
constructor(
5151
clientName: string,
5252
workspaceFolders: WorkspaceFolder[],
53-
logging?: Logging,
53+
logging: Logging,
5454
workspaceIndexConfiguration?: WorkspaceIndexConfiguration
5555
) {
5656
this.workspaceFolders = workspaceFolders
@@ -85,7 +85,7 @@ export class LocalProjectContextController {
8585
await this.buildIndex()
8686
LocalProjectContextController.instance = this
8787
} catch (error) {
88-
this.log?.error('Vector library failed to initialize:' + error)
88+
this.log.error('Vector library failed to initialize:' + error)
8989
}
9090
}
9191

@@ -104,7 +104,7 @@ export class LocalProjectContextController {
104104
try {
105105
await this._vecLib?.updateIndexV2(filePaths, operation)
106106
} catch (error) {
107-
this.log?.error(`Error updating index: ${error}`)
107+
this.log.error(`Error updating index: ${error}`)
108108
}
109109
}
110110

@@ -124,7 +124,7 @@ export class LocalProjectContextController {
124124
await this._vecLib?.buildIndex(sourceFiles, rootDir, 'all')
125125
}
126126
} catch (error) {
127-
this.log?.error(`Error building index: ${error}`)
127+
this.log.error(`Error building index: ${error}`)
128128
}
129129
}
130130

@@ -144,7 +144,7 @@ export class LocalProjectContextController {
144144
await this.buildIndex()
145145
}
146146
} catch (error) {
147-
this.log?.error(`Error in updateWorkspaceFolders: ${error}`)
147+
this.log.error(`Error in updateWorkspaceFolders: ${error}`)
148148
}
149149
}
150150

@@ -159,7 +159,7 @@ export class LocalProjectContextController {
159159
const resp = await this._vecLib?.queryInlineProjectContext(request.query, request.filePath, request.target)
160160
return resp ?? []
161161
} catch (error) {
162-
this.log?.error(`Error in queryInlineProjectContext: ${error}`)
162+
this.log.error(`Error in queryInlineProjectContext: ${error}`)
163163
return []
164164
}
165165
}
@@ -184,7 +184,7 @@ export class LocalProjectContextController {
184184
try {
185185
fileSize = fs.statSync(filePath).size
186186
} catch (error) {
187-
this.log?.error(`Error reading file size for ${filePath}: ${error}`)
187+
this.log.error(`Error reading file size for ${filePath}: ${error}`)
188188
return false
189189
}
190190

@@ -263,7 +263,7 @@ export class LocalProjectContextController {
263263
}
264264
}
265265
} catch (error) {
266-
this.log?.error(`Error reading .gitignore file ${filePath}: ${error}`)
266+
this.log.error(`Error reading .gitignore file ${filePath}: ${error}`)
267267
}
268268
return [filePath, ignore().add(lines)] as const
269269
})

0 commit comments

Comments
 (0)