shadok-ai 0.17.67 → 0.17.68
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/live-text.js +12 -0
package/package.json
CHANGED
package/public/live-text.js
CHANGED
|
@@ -20,6 +20,17 @@
|
|
|
20
20
|
const MARKERS = ["⏺ ", "● "];
|
|
21
21
|
const markerOf = (line) => MARKERS.find((m) => line.startsWith(m)) ?? null;
|
|
22
22
|
|
|
23
|
+
// Claude Code's own SYSTEM notices are drawn with the same column-0 bullet as
|
|
24
|
+
// the model's prose — only their colour differs, and a plain screen capture has
|
|
25
|
+
// no colour. The transcript records them as `type:"system"` (never streamed or
|
|
26
|
+
// replayed), so on screen they are the one place they leak from: mid-turn the
|
|
27
|
+
// grey preview bubble showed "Remote Control disconnected — /login", a line about
|
|
28
|
+
// the terminal's own link to claude.ai that the cockpit's reader can do nothing
|
|
29
|
+
// about. Matched on the family's prefix (connected / disconnected / stopped / got
|
|
30
|
+
// an unexpected…), the only thing a capture carries. Such a line is SKIPPED, not
|
|
31
|
+
// treated as the end of the search, so the real block above it still previews.
|
|
32
|
+
const isSystemNotice = (head) => /^Remote Control\b/.test(head);
|
|
33
|
+
|
|
23
34
|
/** The last visible assistant text block, unwrapped; "" otherwise. */
|
|
24
35
|
export function extractLiveText(screen) {
|
|
25
36
|
if (typeof screen !== "string" || !screen) return "";
|
|
@@ -30,6 +41,7 @@ export function extractLiveText(screen) {
|
|
|
30
41
|
let marker = null;
|
|
31
42
|
for (let i = lines.length - 1; i >= 0; i--) {
|
|
32
43
|
const m = markerOf(lines[i]);
|
|
44
|
+
if (m && isSystemNotice(lines[i].slice(m.length).trim())) continue;
|
|
33
45
|
if (m) { start = i; marker = m; break; }
|
|
34
46
|
}
|
|
35
47
|
if (start < 0) return "";
|