openvibers/openvibe.chat Commits

Vibe sets the Dock timer once (main is red after #290 + #291) (#295)

OP OpenVibers committed 13 days ago · 20eb7b56ec · 1 file, +0 −13

Both PRs added the same deterministic timer net to ai-members.js afterPost; after both merged, a plain
"start a 25 minute timer" started the timer twice and main's vibe-timer-net test went red. The block
that records the result (the chips) stays.

Changes

ddiff --git a/server/rooms/ai-members.js b/server/rooms/ai-members.js
iindex 464a345..f73b6f3 100644
---- a/server/rooms/ai-members.js
++++ b/server/rooms/ai-members.js
@@@ -454,19 +454,6 @@ async function afterPost(room, message, user, deps = {}) {
}
}
}
-- // A plain "start a 25 minute timer" is set even when the model only promised it (small models often do);
-- // the answer says so, and only when the timer really is set.
-- if (vibe && text && Number(room.owner_id) === Number(user.id) && !called.has('start_timer') && !called.has('stop_timer')) {
-- const want = require('./vibe-timer').fromRequest(message.message);
-- if (want) {
-- const timer = require('./vibe-timer');
-- const set = await (want.stop
-- ? timer.stop(user.subject_id || null).catch(() => ({}))
-- : timer.start(user.subject_id || null, want).catch(() => ({})));
-- if (set && set.timer) text = `${text}\n\n⏱ ${set.said}`;
-- else if (set && set.stopped) text = `${text}\n\n⏱ ${set.said}`;
-- }
-- }
if (!text) {
const out = await aiClient.structured('chat.member.reply', {
ai_name: member.name, persona: member.persona || '', room: String(room.name || room.slug).slice(0, 120),