shadok-ai 0.16.9 → 0.16.10

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/README.md CHANGED
@@ -84,7 +84,8 @@ Enter to skip; you can add it later from the web UI).
84
84
  emoji, or **type a word** (`rocket`, `bug`, `money`…) to search for one; its
85
85
  **+** creates the new agent straight into that group. Dragging an agent onto a
86
86
  group files it there, dragging groups reorders them, and double-clicking a name
87
- renames it. A question the agent asks shows as an *Approval requested* card. The
87
+ renames it — a group can also be renamed by clicking its name at the top of the
88
+ agents column. A question the agent asks shows as an *Approval requested* card. The
88
89
  whole cockpit is skinned like Microsoft Teams (grey light mode / near-black dark
89
90
  mode, the Shadok mark in the header). On a phone the tools sit in the ⋯ menu and
90
91
  the agents sheet lists every group.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "shadok-ai",
3
- "version": "0.16.9",
3
+ "version": "0.16.10",
4
4
  "main": "dist/session.js",
5
5
  "scripts": {
6
6
  "test": "node --import tsx --test --test-timeout=120000 test/*.ts context/*/test/*.test.mjs",
package/public/index.html CHANGED
@@ -528,6 +528,9 @@
528
528
  overflow-y: auto;
529
529
  }
530
530
  #tabbar .side-label { padding: 0 8px 8px; font-size: 13px; font-weight: 600; color: var(--text); }
531
+ #tabbar .side-label #viewLabel.editable { cursor: text; border-radius: 4px; padding: 1px 3px; margin: -1px -3px; }
532
+ #tabbar .side-label #viewLabel.editable:hover { background: var(--bg-inset); box-shadow: inset 0 0 0 1px var(--line); }
533
+ #tabbar .side-label input.rename { font: inherit; width: calc(100% - 2em); }
531
534
  .tab {
532
535
  position: relative;
533
536
  display: flex;
@@ -3035,7 +3038,7 @@
3035
3038
  <div id="iconEmpty" class="icon-empty" hidden>No emoji for that word.</div>
3036
3039
  </div>
3037
3040
  <nav id="tabbar" aria-label="Agents">
3038
- <div class="label side-label"><span class="sl-all">Agents</span><span class="sl-view" id="viewLabel"></span></div>
3041
+ <div class="label side-label"><span class="sl-all">Agents</span><span class="sl-view"><span id="viewIcon"></span> <span id="viewLabel"></span></span></div>
3039
3042
  <div id="ungrouped"></div>
3040
3043
  <div id="groups"></div>
3041
3044
  <p id="viewEmpty" class="check-hint" hidden>No agent in this group yet — create one, or drag one onto the group.</p>
@@ -3427,6 +3430,7 @@
3427
3430
 
3428
3431
  const $ = (id) => document.getElementById(id);
3429
3432
  const tabbar = $("tabbar"), newTabBtn = $("newTab"), newGroupBtn = $("newGroup");
3433
+ const viewLabelEl = $("viewLabel");
3430
3434
  const ungroupedEl = $("ungrouped"), groupsEl = $("groups");
3431
3435
  const transcripts = $("transcripts"), thinking = $("thinking");
3432
3436
  const composer = $("composer"), promptInput = $("promptInput"), sendBtn = $("sendBtn");
@@ -4813,11 +4817,34 @@
4813
4817
  if (gi && gi.textContent !== g.icon) gi.textContent = g.icon;
4814
4818
  }
4815
4819
  const g = groups.find((x) => String(x.id) === v);
4816
- $("viewLabel").textContent = g ? `${g.icon} ${g.nameEl.textContent}` : "Main";
4820
+ $("viewIcon").textContent = g ? g.icon : "";
4821
+ // A cached reference, never $("viewLabel"): while it is being renamed the
4822
+ // span is swapped out for the input, and a lookup by id would return null
4823
+ // and throw on the very next sync.
4824
+ viewLabelEl.textContent = g ? g.nameEl.textContent : "Main";
4825
+ // Only a real group can be renamed here: "Main" is the ungrouped view, not
4826
+ // a group, and has no name of its own to store.
4827
+ viewLabelEl.classList.toggle("editable", !!g);
4828
+ viewLabelEl.title = g ? "Click to rename this group" : "";
4817
4829
  $("viewEmpty").hidden = tabsInView(v).length > 0 || v === "ungrouped";
4818
4830
  renderRail();
4819
4831
  }
4820
4832
 
4833
+ // The column's title names the group you are looking at, so it is where one
4834
+ // reaches to rename it — the rail item needs a double-click and, collapsed to
4835
+ // icons, shows no name at all. Wired ONCE on the stable span: applyView
4836
+ // rewrites its text, never the element.
4837
+ viewLabelEl.addEventListener("click", (e) => {
4838
+ const g = groups.find((x) => String(x.id) === currentView());
4839
+ if (!g) return;
4840
+ e.stopPropagation();
4841
+ inlineRename(tabbar, viewLabelEl, (v) => {
4842
+ g.nameEl.textContent = v;
4843
+ persistGroups();
4844
+ applyView();
4845
+ });
4846
+ });
4847
+
4821
4848
  const moodOf = (t) =>
4822
4849
  ["needs-answer", "unread", "working"].find((m) => t.btnEl.classList.contains(m)) || null;
4823
4850