chore: strictly declare non-null local variables in UserSimulator.ts

This commit is contained in:
Mahima Shanware
2026-05-26 16:18:07 +00:00
parent cfd7783c30
commit d94a2804ce
+4 -4
View File
@@ -440,15 +440,15 @@ ${strippedScreen}
this.knowledgeBase += newKnowledge;
const file = this.editableKnowledgeFile;
const logFile = this.interactionsFile;
if (file) {
if (file !== null) {
try {
fs.appendFileSync(file, newKnowledge);
fs.appendFileSync(file!, newKnowledge);
debugLogger.log(
`[SIMULATOR] Saved new knowledge to ${file}`,
);
if (logFile) {
if (logFile !== null) {
fs.appendFileSync(
logFile,
logFile!,
`[LOG] [SIMULATOR] Saved new knowledge to ${file}\n\n`,
);
}