Spaces:
Paused
Paused
Malina commited on
Commit ·
63bbc20
1
Parent(s): 6676e98
aria: reply delay per bubble 7-19s -> 2-9s (still length-scaled)
Browse files
cloudflare/aria-worker/src/conversation-do.js
CHANGED
|
@@ -413,8 +413,8 @@ export class AriaConversation {
|
|
| 413 |
const sleep = (ms) => new Promise(r => setTimeout(r, ms));
|
| 414 |
const safeParse = (s) => { try { return JSON.parse(s); } catch { return {}; } };
|
| 415 |
const norm = (s) => (s || "").trim().toLowerCase();
|
| 416 |
-
// Human reply delay per bubble:
|
| 417 |
-
const replyDelay = (text) => Math.min(
|
| 418 |
|
| 419 |
// Idle check-in pings (no trailing period, lowercase — messenger style).
|
| 420 |
const IDLE_PL = ["halo?", "jesteś?", "no i?", "halo halo?", "jesteś tam?",
|
|
|
|
| 413 |
const sleep = (ms) => new Promise(r => setTimeout(r, ms));
|
| 414 |
const safeParse = (s) => { try { return JSON.parse(s); } catch { return {}; } };
|
| 415 |
const norm = (s) => (s || "").trim().toLowerCase();
|
| 416 |
+
// Human reply delay per bubble: 2–9s, scaled by length.
|
| 417 |
+
const replyDelay = (text) => Math.min(9000, Math.max(2000, 1500 + (text || "").length * 90));
|
| 418 |
|
| 419 |
// Idle check-in pings (no trailing period, lowercase — messenger style).
|
| 420 |
const IDLE_PL = ["halo?", "jesteś?", "no i?", "halo halo?", "jesteś tam?",
|