shadok-ai 0.3.87 → 0.3.88
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/package.json +1 -1
- package/public/echo-author.js +11 -11
- package/public/index.html +513 -534
- package/public/live-text.d.ts +5 -5
- package/public/live-text.js +27 -30
- package/public/notify.js +30 -30
- package/public/profile-card.js +39 -40
package/package.json
CHANGED
package/public/echo-author.js
CHANGED
|
@@ -1,22 +1,22 @@
|
|
|
1
|
-
//
|
|
2
|
-
//
|
|
3
|
-
// profile-card.js
|
|
1
|
+
// Who sent a prompt that came from ANOTHER client? A pure decision, hence
|
|
2
|
+
// testable without a browser — the same split as live-text.js, notify.js and
|
|
3
|
+
// profile-card.js: loaded as is by the page (ESM) and imported by the tests.
|
|
4
4
|
//
|
|
5
|
-
//
|
|
6
|
-
//
|
|
7
|
-
//
|
|
5
|
+
// The author label was frozen on "pilot (elsewhere)", which says neither who
|
|
6
|
+
// spoke nor from where. The Telegram bridge knows the sender's name; the crons
|
|
7
|
+
// know their origin. We may as well say so.
|
|
8
8
|
|
|
9
9
|
/**
|
|
10
|
-
* @param {{from?: string, origin?: string, auto?: boolean}} msg
|
|
11
|
-
* @returns {string}
|
|
10
|
+
* @param {{from?: string, origin?: string, auto?: boolean}} msg a `prompt-echo`
|
|
11
|
+
* @returns {string} the label to display above the bubble
|
|
12
12
|
*/
|
|
13
13
|
export function echoAuthor(msg) {
|
|
14
|
-
//
|
|
14
|
+
// The pace guard's resume comes from nobody: it comes from the server.
|
|
15
15
|
if (msg?.auto) return "auto-retry";
|
|
16
16
|
const from = (msg?.from ?? "").trim();
|
|
17
17
|
const origin = (msg?.origin ?? "").trim();
|
|
18
|
-
//
|
|
19
|
-
//
|
|
18
|
+
// "web" teaches nothing: another tab of the same cockpit. We only show it for
|
|
19
|
+
// want of a name, and even then through the generic wording.
|
|
20
20
|
const place = origin && origin !== "web" ? origin : "";
|
|
21
21
|
if (from) return place ? `${from} · ${place}` : from;
|
|
22
22
|
return place || "pilot (elsewhere)";
|