chore: set continuation interval to 10s; restart per-user timer on message

This commit is contained in:
Luna
2026-02-27 02:32:03 +01:00
parent 9725876982
commit 090b22b063
2 changed files with 11 additions and 1 deletions

View File

@@ -409,6 +409,16 @@ client.on('messageCreate', async (message) => {
await appendShortTerm(userId, 'user', cleaned);
try {
const state = continuationState.get(userId);
if (state) {
state.lastUserTs = Date.now();
continuationState.set(userId, state);
}
} catch (err) {
console.warn('[bot] Failed to reset continuation timer:', err);
}
// If the user indicates they are leaving, stop proactive continuation
if (stopCueRegex.test(cleaned)) {
stopContinuationForUser(userId);

View File

@@ -39,6 +39,6 @@ export const config = {
// Proactive continuation settings: when a user stops replying, Nova can continue
// the conversation every `continuationIntervalMs` milliseconds until the user
// signals to stop or the `continuationMaxProactive` limit is reached.
continuationIntervalMs: process.env.CONTINUATION_INTERVAL_MS ? parseInt(process.env.CONTINUATION_INTERVAL_MS, 10) : 15000,
continuationIntervalMs: process.env.CONTINUATION_INTERVAL_MS ? parseInt(process.env.CONTINUATION_INTERVAL_MS, 10) : 10000,
continuationMaxProactive: process.env.CONTINUATION_MAX_PROACTIVE ? parseInt(process.env.CONTINUATION_MAX_PROACTIVE, 10) : 10,
};