shadok-ai 0.2.58 → 0.2.59

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 +30 -0
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "shadok-ai",
3
- "version": "0.2.58",
3
+ "version": "0.2.59",
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
@@ -320,6 +320,9 @@
320
320
  z-index: 30;
321
321
  }
322
322
  #moreMenu button { width: 100%; text-align: left; }
323
+ /* The star lives in the header pill on desktop; its menu twin appears only on
324
+ a phone (see the mobile query). */
325
+ #starMenuItem { display: none; }
323
326
  button:hover { border-color: var(--amber); color: var(--amber); }
324
327
  button:focus-visible { outline: 2px solid var(--amber); outline-offset: 2px; }
325
328
  button.primary { background: var(--amber); border-color: var(--amber); color: #1a1205; font-weight: 600; }
@@ -1066,6 +1069,10 @@
1066
1069
  flush against the right edge. */
1067
1070
  .hdr-tools { display: flex; flex: 1 0 100%; align-items: center; gap: 6px; }
1068
1071
  header button.icon { padding: 5px 7px; }
1072
+ /* The star pill is the widest tool and would push an icon off the row; on a
1073
+ phone it moves into the ⋯ menu (#starMenuItem) instead. */
1074
+ #starBtn { display: none; }
1075
+ #moreMenu #starMenuItem { display: block; }
1069
1076
  .quota { min-width: 46px; }
1070
1077
  .dial { width: 46px; height: 36px; }
1071
1078
  /* A bit more room for a thumb, a bit less margin wasted on a narrow screen. */
@@ -1423,6 +1430,9 @@
1423
1430
  <div id="moreMenu" hidden>
1424
1431
  <button id="toggleDiff">Diff</button>
1425
1432
  <button id="tourReplay">Guided tour</button>
1433
+ <!-- On a phone the header star pill is dropped (it's the widest tool, and
1434
+ pushed the icons off the row); it reappears here instead. -->
1435
+ <button id="starMenuItem">★ Star on GitHub</button>
1426
1436
  </div>
1427
1437
  </div>
1428
1438
  <!-- GitHub's official button rebuilt locally: its real widget is a script
@@ -1756,6 +1766,11 @@
1756
1766
  <button id="chanCron" class="icon" title="Scheduled prompts for this agent (monitoring / reporting)">⏰</button>
1757
1767
  <button id="chanStop" class="icon stop" title="End session">⏹️</button>
1758
1768
  <button id="chanTerm" class="icon" title="Terminal — the raw TUI for this agent">⌨️</button>
1769
+ <!-- The per-agent menu (rename, profile, mirror, report to, close). It's
1770
+ the same menu a right-click / long-press on a tab opens — but with the
1771
+ sidebar hidden on a phone there was no way to reach it, so it lives
1772
+ here too. -->
1773
+ <button id="chanMenu" class="icon" title="Agent menu — rename, profile, mirror, close…" aria-haspopup="true">⋯</button>
1759
1774
  </span>
1760
1775
  </div>
1761
1776
 
@@ -4680,6 +4695,16 @@
4680
4695
  $("chanStop").addEventListener("click", () => {
4681
4696
  sendTo(active, { type: "stop" });
4682
4697
  });
4698
+ // The per-agent menu, opened from the channel header — the same one a
4699
+ // right-click / long-press on a tab shows. stopPropagation so the document
4700
+ // click closer (which runs openTabMenu's own guard) doesn't fire for this
4701
+ // click; anchored just under the button, openTabMenu clamps it on-screen.
4702
+ $("chanMenu").addEventListener("click", (e) => {
4703
+ e.stopPropagation();
4704
+ if (!active) return;
4705
+ const r = e.currentTarget.getBoundingClientRect();
4706
+ openTabMenu(active, r.right, r.bottom + 4);
4707
+ });
4683
4708
 
4684
4709
  // "⋯" overflow menu (rarely-used actions, e.g. Diff). stopPropagation on the
4685
4710
  // trigger so the same click doesn't immediately hit the document closer; a
@@ -4689,6 +4714,11 @@
4689
4714
  $("moreMenu").hidden = !$("moreMenu").hidden;
4690
4715
  });
4691
4716
  document.addEventListener("click", () => { $("moreMenu").hidden = true; });
4717
+ // The star's menu twin (shown only on a phone) opens the repo in a new tab.
4718
+ $("starMenuItem").addEventListener("click", () => {
4719
+ $("moreMenu").hidden = true;
4720
+ window.open("https://github.com/shadok-ai/shadok-ai", "_blank", "noopener");
4721
+ });
4692
4722
 
4693
4723
  // ── Diff panel ──────────────────────────────────────────
4694
4724
  function colorDiff(text) {