shadok-ai 0.2.32 → 0.2.33

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 +12 -1
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "shadok-ai",
3
- "version": "0.2.32",
3
+ "version": "0.2.33",
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",
package/public/index.html CHANGED
@@ -3589,6 +3589,11 @@
3589
3589
  setTabState(t, "busy", "responding…");
3590
3590
  clearLivePreview(t);
3591
3591
  t.finalizedNorms = [];
3592
+ // Aucun texte visible produit pour l'instant ce tour. Sert au turn-done à
3593
+ // décider s'il y a vraiment « à lire » : un tour qui ne sort que
3594
+ // NOTHING TO SHOW (filtré par le tail → aucun stream-text) ne doit pas
3595
+ // marquer le canal comme non-lu.
3596
+ t.turnHadText = false;
3592
3597
  break;
3593
3598
  case "prompt-echo":
3594
3599
  // Prompt sent by another tab/interface — or by the server itself
@@ -3625,6 +3630,9 @@
3625
3630
  if (fin) (t.finalizedNorms ||= []).push(fin);
3626
3631
  }
3627
3632
  clearLivePreview(t);
3633
+ // Du texte visible est arrivé (NOTHING TO SHOW est filtré par le tail
3634
+ // avant d'arriver ici) → il y a vraiment quelque chose à lire.
3635
+ t.turnHadText = true;
3628
3636
  // Repli sur l'heure locale si le serveur n'a pas envoyé `at` (transcript
3629
3637
  // sans timestamp) : un bloc en direct vient d'être écrit, l'écart est nul.
3630
3638
  addTurn(t, "claude", "claude", msg.text, "live", msg.at ?? Date.now());
@@ -3648,7 +3656,10 @@
3648
3656
  persistChannels();
3649
3657
  }
3650
3658
  stopTurnTimer(t);
3651
- setTabMood(t, t === active ? null : "unread");
3659
+ // « unread » seulement si le tour a produit du texte visible. Un tour
3660
+ // vide (ex. cron qui conclut NOTHING TO SHOW) ne réclame aucune lecture,
3661
+ // ni sur l'onglet ni sur le favicon.
3662
+ setTabMood(t, (t === active || !t.turnHadText) ? null : "unread");
3652
3663
  setTabState(t, "ready", "ready");
3653
3664
  break;
3654
3665
  case "dialog":