fix(build): resolve TS4111 and TS2339 errors in config and tests

This commit is contained in:
Coco Sheng
2026-05-04 16:48:18 -04:00
parent a976c227c2
commit 13603a30b7
2 changed files with 17 additions and 8 deletions
+7 -6
View File
@@ -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;
}
}