From 090b22b0632f5db72f1ad0a838c99d6f0eb7a67a Mon Sep 17 00:00:00 2001 From: Luna Date: Fri, 27 Feb 2026 02:32:03 +0100 Subject: [PATCH] chore: set continuation interval to 10s; restart per-user timer on message --- src/bot.js | 10 ++++++++++ src/config.js | 2 +- 2 files changed, 11 insertions(+), 1 deletion(-) diff --git a/src/bot.js b/src/bot.js index f5444ae..d08a49d 100644 --- a/src/bot.js +++ b/src/bot.js @@ -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); diff --git a/src/config.js b/src/config.js index 1980716..1763059 100644 --- a/src/config.js +++ b/src/config.js @@ -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, };