mirror of
https://github.com/google-gemini/gemini-cli.git
synced 2026-05-16 14:53:19 -07:00
fix(build): resolve TS4111 and TS2339 errors in config and tests
This commit is contained in:
@@ -104,8 +104,16 @@ describe('Issue 25428 Regression', () => {
|
||||
const settings = loadSettings('/mock/workspace-' + Math.random());
|
||||
|
||||
expect(settings.user.settings.general?.plan?.enabled).toBe(true);
|
||||
expect(settings.user.settings.experimental?.plan).toBeUndefined();
|
||||
expect(settings.user.settings.experimental?.keepMe).toBe('important');
|
||||
expect(
|
||||
(settings.user.settings.experimental as Record<string, unknown>)?.[
|
||||
'plan'
|
||||
],
|
||||
).toBeUndefined();
|
||||
expect(
|
||||
(settings.user.settings.experimental as Record<string, unknown>)?.[
|
||||
'keepMe'
|
||||
],
|
||||
).toBe('important');
|
||||
|
||||
expect(updateSettingsFilePreservingFormat).toHaveBeenCalled();
|
||||
const lastCall = vi
|
||||
|
||||
@@ -3542,7 +3542,7 @@ export class Config implements McpContext, AgentLoopContext {
|
||||
if (s.model) this.setModel(s.model);
|
||||
if (s.compressionThreshold !== undefined) {
|
||||
// eslint-disable-next-line @typescript-eslint/no-unsafe-type-assertion
|
||||
(this as unknown as Record<string, unknown>).compressionThreshold =
|
||||
(this as unknown as Record<string, unknown>)['compressionThreshold'] =
|
||||
s.compressionThreshold;
|
||||
}
|
||||
if (s.ideMode !== undefined) this.ideMode = s.ideMode;
|
||||
@@ -3551,17 +3551,18 @@ export class Config implements McpContext, AgentLoopContext {
|
||||
}
|
||||
if (s.topicUpdateNarration !== undefined) {
|
||||
// eslint-disable-next-line @typescript-eslint/no-unsafe-type-assertion
|
||||
(this as unknown as Record<string, unknown>).topicUpdateNarration =
|
||||
(this as unknown as Record<string, unknown>)['topicUpdateNarration'] =
|
||||
s.topicUpdateNarration;
|
||||
}
|
||||
if (s.experimentalAutoMemory !== undefined) {
|
||||
// eslint-disable-next-line @typescript-eslint/no-unsafe-type-assertion
|
||||
(this as unknown as Record<string, unknown>).experimentalAutoMemory =
|
||||
s.experimentalAutoMemory;
|
||||
(this as unknown as Record<string, unknown>)[
|
||||
'experimentalAutoMemory'
|
||||
] = s.experimentalAutoMemory;
|
||||
}
|
||||
if (s.experimentalMemoryV2 !== undefined) {
|
||||
// eslint-disable-next-line @typescript-eslint/no-unsafe-type-assertion
|
||||
(this as unknown as Record<string, unknown>).experimentalMemoryV2 =
|
||||
(this as unknown as Record<string, unknown>)['experimentalMemoryV2'] =
|
||||
s.experimentalMemoryV2;
|
||||
}
|
||||
}
|
||||
@@ -3573,7 +3574,7 @@ export class Config implements McpContext, AgentLoopContext {
|
||||
}
|
||||
if (refreshed.adminSkillsEnabled !== undefined) {
|
||||
// eslint-disable-next-line @typescript-eslint/no-unsafe-type-assertion
|
||||
(this as unknown as Record<string, unknown>).adminSkillsEnabled =
|
||||
(this as unknown as Record<string, unknown>)['adminSkillsEnabled'] =
|
||||
refreshed.adminSkillsEnabled;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user