test
This commit is contained in:
@@ -29,13 +29,14 @@ export const config = {
|
||||
maxCoderPingIntervalMs: 6 * 60 * 60 * 1000,
|
||||
coderPingMinIntervalMs: process.env.CODER_PING_MIN_MS ? parseInt(process.env.CODER_PING_MIN_MS, 10) : 6 * 60 * 60 * 1000,
|
||||
coderPingMaxIntervalMs: process.env.CODER_PING_MAX_MS ? parseInt(process.env.CODER_PING_MAX_MS, 10) : 4.5 * 60 * 60 * 1000,
|
||||
shortTermLimit: 6,
|
||||
shortTermLimit: process.env.SHORT_TERM_LIMIT ? parseInt(process.env.SHORT_TERM_LIMIT, 10) : 12,
|
||||
memoryDbFile: process.env.MEMORY_DB_FILE ? path.resolve(process.env.MEMORY_DB_FILE) : defaultMemoryDbFile,
|
||||
legacyMemoryFile,
|
||||
summaryTriggerChars: 2200,
|
||||
memoryPruneThreshold: 0.2,
|
||||
memoryCooldownMs: process.env.MEMORY_COOLDOWN_MS ? parseInt(process.env.MEMORY_COOLDOWN_MS, 10) : 3 * 60 * 1000,
|
||||
maxMemories: 8000,
|
||||
enableShortTermSummary: process.env.ENABLE_SHORT_TERM_SUMMARY !== 'false',
|
||||
relevantMemoryCount: 3,
|
||||
longTermFetchLimit: 120,
|
||||
// Optional local dashboard that runs alongside the bot. Enable with
|
||||
|
||||
@@ -379,7 +379,9 @@ export async function appendShortTerm(userId, role, content) {
|
||||
Date.now(),
|
||||
]);
|
||||
enforceShortTermCap(db, userId);
|
||||
await maybeSummarize(db, userId);
|
||||
if (config.enableShortTermSummary) {
|
||||
await maybeSummarize(db, userId);
|
||||
}
|
||||
await persistDb(db);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user