shadok-ai 0.4.0 → 0.4.114

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.
Files changed (2) hide show
  1. package/package.json +1 -1
  2. package/public/index.html +11 -0
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "shadok-ai",
3
- "version": "0.4.0",
3
+ "version": "0.4.114",
4
4
  "main": "dist/session.js",
5
5
  "scripts": {
6
6
  "test": "node --import tsx --test test/*.ts .claude/skills/shadok-ai-agents/test/*.test.mjs context/*/test/*.test.mjs",
package/public/index.html CHANGED
@@ -3478,7 +3478,11 @@
3478
3478
  // for a stream-text that never comes.
3479
3479
  if (/^[*_`\s]*nothing to show[*_`\s.!]*$/i.test(txt)) { clearLivePreview(tab); return; }
3480
3480
  const nT = normPreview(txt);
3481
+ // Still showing the previous turn's answer (captured at turn start) — this
3482
+ // turn hasn't produced its own text yet. Suppress until it does.
3483
+ if (tab.livePreviewBaseline && nT === tab.livePreviewBaseline) { clearLivePreview(tab); return; }
3481
3484
  if (nT && isFinalizedBlock(tab, nT)) { clearLivePreview(tab); return; }
3485
+ tab.livePreviewBaseline = ""; // real new text arrived — baseline no longer applies
3482
3486
  if (!tab.livePreviewEl) {
3483
3487
  const turn = document.createElement("div");
3484
3488
  turn.className = "turn claude live-preview";
@@ -4310,6 +4314,13 @@
4310
4314
  setTabState(t, "busy", "responding…");
4311
4315
  clearLivePreview(t);
4312
4316
  t.finalizedNorms = [];
4317
+ // The PREVIOUS turn's answer is still on the screen while this turn spins
4318
+ // up (the agent hasn't written anything yet). extractLiveText would grab
4319
+ // that leftover block and show it as a stale grey bubble under the new
4320
+ // message. Remember its shape now and suppress it until real new text
4321
+ // replaces it (finalizedNorms was just cleared, so it can't catch this).
4322
+ t.livePreviewBaseline =
4323
+ window.extractLiveText && t.screenText ? normPreview(extractLiveText(t.screenText)) : "";
4313
4324
  // No visible text produced yet this turn. Used by turn-done to decide
4314
4325
  // whether there is really something "to read": a turn that only outputs
4315
4326
  // NOTHING TO SHOW (filtered by the tail → no stream-text) must not mark