clavarium 0.2.0-next.12 → 0.2.0-next.13
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/npm-shrinkwrap.json +2 -2
- package/package.json +1 -1
- package/server/talk.mjs +5 -1
package/npm-shrinkwrap.json
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "clavarium",
|
|
3
|
-
"version": "0.2.0-next.
|
|
3
|
+
"version": "0.2.0-next.13",
|
|
4
4
|
"lockfileVersion": 3,
|
|
5
5
|
"requires": true,
|
|
6
6
|
"packages": {
|
|
7
7
|
"": {
|
|
8
8
|
"name": "clavarium",
|
|
9
|
-
"version": "0.2.0-next.
|
|
9
|
+
"version": "0.2.0-next.13",
|
|
10
10
|
"license": "MIT",
|
|
11
11
|
"dependencies": {
|
|
12
12
|
"@xterm/addon-fit": "^0.11.0",
|
package/package.json
CHANGED
package/server/talk.mjs
CHANGED
|
@@ -440,7 +440,7 @@ export class Talk {
|
|
|
440
440
|
|
|
441
441
|
/* Its machine was restarted, or built again (conversations.mjs): said in
|
|
442
442
|
the thread, and, the tool having started again with nothing of the
|
|
443
|
-
chat in mind, REREAD is typed
|
|
443
|
+
chat in mind, REREAD is typed with the person's next message (never alone). */
|
|
444
444
|
renewed(name, text, started = true) {
|
|
445
445
|
const r = this.#store.get(name);
|
|
446
446
|
if (r?.on !== true) return;
|
|
@@ -456,6 +456,10 @@ export class Talk {
|
|
|
456
456
|
if (r?.on !== true || r.reread !== true) return 'done';
|
|
457
457
|
if (this.#now() < (this.#nextTry.get(`reread:${name}`) ?? 0)) return 'later';
|
|
458
458
|
const later = (ms) => { this.#nextTry.set(`reread:${name}`, this.#now() + ms); return 'later'; };
|
|
459
|
+
/* Typed only when the person has written since: a line typed while the tool
|
|
460
|
+
reloads a long session after a restart sat in its input box, never sent
|
|
461
|
+
(seen on a real deployment). By then the tool has long been ready. */
|
|
462
|
+
if (this.#parley(name).unread() === 0) return later(RETRY_MS);
|
|
459
463
|
if (!this.#conversations.awake().includes(name)) return later(RETRY_MS);
|
|
460
464
|
const quiet = this.#now() - (this.#typedAt.get(name) ?? 0);
|
|
461
465
|
if (quiet < TYPING_QUIET_MS) return later(TYPING_QUIET_MS - quiet + 100);
|