mirror of
https://github.com/google-gemini/gemini-cli.git
synced 2026-04-25 12:34:38 -07:00
Disallow unsafe type assertions (#18688)
This commit is contained in:
committed by
GitHub
parent
bce1caefd0
commit
fd65416a2f
@@ -23,6 +23,7 @@ export class ContextBuilder {
|
||||
return {
|
||||
environment: {
|
||||
cwd: process.cwd(),
|
||||
// eslint-disable-next-line @typescript-eslint/no-unsafe-type-assertion
|
||||
workspaces: this.config
|
||||
.getWorkspaceContext()
|
||||
.getDirectories() as string[],
|
||||
@@ -44,11 +45,12 @@ export class ContextBuilder {
|
||||
|
||||
for (const key of requiredKeys) {
|
||||
if (key in fullContext) {
|
||||
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
||||
// eslint-disable-next-line @typescript-eslint/no-explicit-any, @typescript-eslint/no-unsafe-type-assertion
|
||||
(minimalContext as any)[key] = fullContext[key];
|
||||
}
|
||||
}
|
||||
|
||||
// eslint-disable-next-line @typescript-eslint/no-unsafe-type-assertion
|
||||
return minimalContext as SafetyCheckInput['context'];
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user