shadok-ai 0.19.79 → 0.19.81
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 +2 -1
- package/package.json +1 -1
- package/public/index.html +95 -9
package/README.md
CHANGED
|
@@ -573,7 +573,8 @@ Enter to skip; you can add it later from the web UI).
|
|
|
573
573
|
own bar and, when the keyboard opens, sits right above it (the instrument bar
|
|
574
574
|
folds away while you type). Fields are 16px, which is what stops Safari from
|
|
575
575
|
zooming in on focus. The agents column is replaced by a channel selector in
|
|
576
|
-
the channel bar.
|
|
576
|
+
the channel bar. The composer keeps one row: **+** (attach a file, add a
|
|
577
|
+
skill) · the field · the mic · **↑** to send.
|
|
577
578
|
- **Tweak Shadok-AI** — a card pinned at the bottom of the agents column, with the running version in grey beside its title (the code a tweak starts from). One
|
|
578
579
|
click clones shadok-ai's own source into `~/.shadok-ai/self/shadok-ai` and
|
|
579
580
|
starts an agent on it in its own worktree; that agent delivers its change as a
|
package/package.json
CHANGED
package/public/index.html
CHANGED
|
@@ -2124,6 +2124,9 @@
|
|
|
2124
2124
|
and it costs a good third of the conversation still visible; it comes back
|
|
2125
2125
|
the moment the keyboard closes. */
|
|
2126
2126
|
body.kb-up header { display: none; }
|
|
2127
|
+
/* The keyboard covers the home indicator: the safe-area padding that keeps
|
|
2128
|
+
the field clear of it would only leave a dead band above the keyboard. */
|
|
2129
|
+
body.kb-up #composer { padding-bottom: 8px; }
|
|
2127
2130
|
}
|
|
2128
2131
|
/* iOS Safari ZOOMS INTO any focused field whose font is under 16px. That zoom is
|
|
2129
2132
|
the single cause of two symptoms that look unrelated: the layout viewport
|
|
@@ -3350,14 +3353,39 @@
|
|
|
3350
3353
|
the rail, the agents column and the engine room, so a wide window can still
|
|
3351
3354
|
hold a narrow composer. */
|
|
3352
3355
|
#composer { container: composer / inline-size; }
|
|
3356
|
+
/* The "+" and its menu exist only for the narrow composer below. */
|
|
3357
|
+
#cmpPlus, .cmp-plus-menu { display: none; }
|
|
3358
|
+
#sendBtn .send-ico { display: none; }
|
|
3353
3359
|
@container composer (max-width: 560px) {
|
|
3360
|
+
/* ONE row on a phone: + · field · mic · ↑. It used to be two (the field on
|
|
3361
|
+
its own row, five buttons beneath), which spent a whole extra row of a
|
|
3362
|
+
small screen on buttons. Folding the paperclip and the skill button behind
|
|
3363
|
+
"+" and reducing Send to an arrow leaves the field ~220px at 390px — the
|
|
3364
|
+
old one-row layout had ~110px, which is why it was split. */
|
|
3365
|
+
#composer { gap: 6px; align-items: flex-end; }
|
|
3354
3366
|
#composer .cmp-mic-msg { order: -3; }
|
|
3355
3367
|
#composer .cmp-atts { order: -2; }
|
|
3356
|
-
#composer
|
|
3357
|
-
#composer
|
|
3358
|
-
#composer .cmp-
|
|
3359
|
-
#composer .cmp-attach {
|
|
3368
|
+
#composer #attachBtn, #composer #skillBtn { display: none; }
|
|
3369
|
+
#composer #cmpPlus { display: inline-flex; }
|
|
3370
|
+
#composer .cmp-plus-menu:not([hidden]) { display: flex; }
|
|
3371
|
+
#composer .cmp-attach, #composer .cmp-mic, #composer #sendBtn { height: 42px; }
|
|
3372
|
+
#composer .cmp-attach { width: 42px; }
|
|
3373
|
+
#composer .cmp-mic { border-radius: 21px; } /* round like + and ↑; a pill while the timer shows */
|
|
3374
|
+
#composer #sendBtn { width: 42px; min-width: 42px; padding: 0; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; align-self: flex-end; }
|
|
3375
|
+
#composer #sendBtn .send-txt { display: none; }
|
|
3376
|
+
#composer #sendBtn .send-ico { display: block; }
|
|
3377
|
+
}
|
|
3378
|
+
.cmp-plus-menu {
|
|
3379
|
+
position: absolute; left: 12px; bottom: 100%; z-index: 30; margin-bottom: 6px;
|
|
3380
|
+
flex-direction: column; gap: 2px; padding: 4px; min-width: 190px;
|
|
3381
|
+
background: var(--bg-raised); border-radius: 14px;
|
|
3382
|
+
box-shadow: 0 22px 50px -18px rgba(0, 0, 0, .6), 0 0 0 1px var(--line);
|
|
3360
3383
|
}
|
|
3384
|
+
.cmp-plus-menu button { text-align: left; border: 0; background: transparent; color: var(--text); padding: 10px 12px; border-radius: 10px; font: inherit; font-size: 15px; }
|
|
3385
|
+
.cmp-plus-menu button:hover:not(:disabled) { background: var(--amber-soft); }
|
|
3386
|
+
.cmp-plus-menu button:disabled { opacity: 0.45; }
|
|
3387
|
+
/* A room has no skills: the skill button is hidden there, so is its twin. */
|
|
3388
|
+
body.room-active #cmpPlusSkill { display: none; }
|
|
3361
3389
|
|
|
3362
3390
|
/* Floating menus: lifted, not outlined. */
|
|
3363
3391
|
#moreMenu, #tabMenu, #verMenu, .slash-menu {
|
|
@@ -4568,6 +4596,16 @@
|
|
|
4568
4596
|
<div id="composerAtts" class="cmp-atts" hidden></div>
|
|
4569
4597
|
<!-- Transient status for the dictate button (permission, nothing heard…). -->
|
|
4570
4598
|
<div id="micMsg" class="cmp-mic-msg" role="status" aria-live="polite" hidden></div>
|
|
4599
|
+
<!-- A narrow composer (a phone) keeps ONE row: the paperclip and the skill
|
|
4600
|
+
button fold behind this "+", which opens a two-item menu that clicks
|
|
4601
|
+
the real buttons (so their handlers and disabled state still apply). -->
|
|
4602
|
+
<button type="button" id="cmpPlus" class="cmp-attach" title="Attach a file or add a skill" aria-label="More" aria-haspopup="true" aria-expanded="false">
|
|
4603
|
+
<svg viewBox="0 0 24 24" width="18" height="18" aria-hidden="true"><path d="M12 5v14M5 12h14" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round"/></svg>
|
|
4604
|
+
</button>
|
|
4605
|
+
<div id="cmpPlusMenu" class="cmp-plus-menu" role="menu" hidden>
|
|
4606
|
+
<button type="button" role="menuitem" data-for="attachBtn">📎 Attach a file</button>
|
|
4607
|
+
<button type="button" role="menuitem" data-for="skillBtn" id="cmpPlusSkill">✨ Add a skill</button>
|
|
4608
|
+
</div>
|
|
4571
4609
|
<!-- Pick a file to send: the same path as a paste or a drop (attachFile). -->
|
|
4572
4610
|
<button type="button" id="attachBtn" class="cmp-attach" title="Attach a file" aria-label="Attach a file">
|
|
4573
4611
|
<svg viewBox="0 0 24 24" width="18" height="18" aria-hidden="true"><path d="M21 11.5l-8.6 8.6a5.5 5.5 0 0 1-7.8-7.8l8.6-8.6a3.7 3.7 0 0 1 5.2 5.2l-8.6 8.6a1.8 1.8 0 0 1-2.6-2.6l7.9-7.9" fill="none" stroke="currentColor" stroke-width="1.8" stroke-linecap="round" stroke-linejoin="round"/></svg>
|
|
@@ -4588,7 +4626,7 @@
|
|
|
4588
4626
|
<svg class="mic-rec" viewBox="0 0 24 24" width="15" height="15" aria-hidden="true"><rect x="6" y="6" width="12" height="12" rx="2" fill="currentColor"/></svg>
|
|
4589
4627
|
<span class="mic-time" aria-hidden="true"></span>
|
|
4590
4628
|
</button>
|
|
4591
|
-
<button type="submit" class="primary" id="sendBtn">Send</button>
|
|
4629
|
+
<button type="submit" class="primary" id="sendBtn" aria-label="Send"><span class="send-txt">Send</span><svg class="send-ico" viewBox="0 0 24 24" width="18" height="18" aria-hidden="true"><path d="M12 19V5M6 11l6-6 6 6" fill="none" stroke="currentColor" stroke-width="2.2" stroke-linecap="round" stroke-linejoin="round"/></svg></button>
|
|
4592
4630
|
</form>
|
|
4593
4631
|
|
|
4594
4632
|
<!-- Interactive terminal, per channel, filling the main area (toggled by ⌨️
|
|
@@ -12776,6 +12814,27 @@
|
|
|
12776
12814
|
composer.requestSubmit();
|
|
12777
12815
|
}
|
|
12778
12816
|
});
|
|
12817
|
+
// The phone "+": opens Attach / Add a skill, each clicking the real button.
|
|
12818
|
+
// Disabled mirrors the real button at open time (no agent, upload running…).
|
|
12819
|
+
{
|
|
12820
|
+
const plus = $("cmpPlus"), menu = $("cmpPlusMenu");
|
|
12821
|
+
const close = () => { menu.hidden = true; plus.setAttribute("aria-expanded", "false"); };
|
|
12822
|
+
plus.addEventListener("click", (e) => {
|
|
12823
|
+
e.stopPropagation();
|
|
12824
|
+
if (!menu.hidden) return close();
|
|
12825
|
+
for (const b of menu.querySelectorAll("button[data-for]")) b.disabled = !!$(b.dataset.for)?.disabled;
|
|
12826
|
+
menu.hidden = false;
|
|
12827
|
+
plus.setAttribute("aria-expanded", "true");
|
|
12828
|
+
});
|
|
12829
|
+
menu.addEventListener("click", (e) => {
|
|
12830
|
+
const b = e.target.closest("button[data-for]");
|
|
12831
|
+
if (!b || b.disabled) return;
|
|
12832
|
+
e.stopPropagation(); // the skill menu opens on this click: don't let the document close it
|
|
12833
|
+
close();
|
|
12834
|
+
$(b.dataset.for)?.click();
|
|
12835
|
+
});
|
|
12836
|
+
document.addEventListener("click", (e) => { if (!menu.hidden && !menu.contains(e.target)) close(); });
|
|
12837
|
+
}
|
|
12779
12838
|
function autosizePrompt() {
|
|
12780
12839
|
promptInput.style.height = "auto";
|
|
12781
12840
|
promptInput.style.height = Math.min(promptInput.scrollHeight, 160) + "px";
|
|
@@ -12806,14 +12865,20 @@
|
|
|
12806
12865
|
if (window.visualViewport && matchMedia("(pointer: coarse)").matches) {
|
|
12807
12866
|
const vv = window.visualViewport;
|
|
12808
12867
|
let pending = 0;
|
|
12868
|
+
// The keyboard-free height: the tallest the visible viewport has been since
|
|
12869
|
+
// the last rotation. The keyboard used to be read as `innerHeight - vv.height`,
|
|
12870
|
+
// but that assumes the LAYOUT viewport keeps its height when the keyboard
|
|
12871
|
+
// opens — and an installed (Home Screen) cockpit on a recent iOS shrinks both,
|
|
12872
|
+
// so the gap stayed 0: no `kb-up`, the header never folded away and the
|
|
12873
|
+
// composer kept its home-indicator padding above the keyboard (a dead band).
|
|
12874
|
+
let fullH = Math.max(window.innerHeight, vv.height);
|
|
12875
|
+
const kbOpen = () => fullH - vv.height > 120; // a retracting URL bar is not a keyboard
|
|
12809
12876
|
const syncViewport = () => {
|
|
12810
12877
|
pending = 0;
|
|
12878
|
+
fullH = Math.max(fullH, vv.height);
|
|
12811
12879
|
document.documentElement.style.setProperty("--app-h", vv.height + "px");
|
|
12812
12880
|
document.body.classList.add("vv-sized");
|
|
12813
|
-
|
|
12814
|
-
// opens, so the gap between the two IS the keyboard. The threshold keeps a
|
|
12815
|
-
// retracting URL bar from being read as one.
|
|
12816
|
-
document.body.classList.toggle("kb-up", window.innerHeight - vv.height > 120);
|
|
12881
|
+
document.body.classList.toggle("kb-up", kbOpen());
|
|
12817
12882
|
// The chassis now fits above the keyboard: if the browser already dragged
|
|
12818
12883
|
// the document, that offset hides nothing but the header.
|
|
12819
12884
|
if (window.scrollY || window.scrollX) window.scrollTo(0, 0);
|
|
@@ -12824,6 +12889,27 @@
|
|
|
12824
12889
|
const schedule = () => { if (!pending) pending = requestAnimationFrame(syncViewport); };
|
|
12825
12890
|
vv.addEventListener("resize", schedule);
|
|
12826
12891
|
vv.addEventListener("scroll", schedule);
|
|
12892
|
+
// A rotation changes what "full height" means: start over from what is seen.
|
|
12893
|
+
matchMedia("(orientation: portrait)").addEventListener("change", () => {
|
|
12894
|
+
fullH = 0;
|
|
12895
|
+
setTimeout(() => { fullH = Math.max(window.innerHeight, vv.height); schedule(); }, 300);
|
|
12896
|
+
});
|
|
12897
|
+
// Closing: iOS reports the new height only once the keyboard has finished
|
|
12898
|
+
// sliding away, so for that whole animation the chassis stayed keyboard-sized
|
|
12899
|
+
// and the composer floated mid-screen above an empty band, then snapped down.
|
|
12900
|
+
// Leaving the field IS the keyboard closing (unless focus moves to another
|
|
12901
|
+
// text field), so give the chassis its full height at once: the keyboard then
|
|
12902
|
+
// slides off a page already in place. The real resize lands later and agrees.
|
|
12903
|
+
const typesText = (el) => !!el && (el.isContentEditable || el.tagName === "TEXTAREA"
|
|
12904
|
+
|| (el.tagName === "INPUT" && !/^(button|submit|reset|checkbox|radio|file|range|color|image)$/i.test(el.type)));
|
|
12905
|
+
document.addEventListener("focusout", (e) => {
|
|
12906
|
+
if (!document.body.classList.contains("kb-up") || typesText(e.relatedTarget)) return;
|
|
12907
|
+
if (pending) { cancelAnimationFrame(pending); pending = 0; }
|
|
12908
|
+
document.documentElement.style.setProperty("--app-h", fullH + "px");
|
|
12909
|
+
document.body.classList.remove("kb-up");
|
|
12910
|
+
if (window.scrollY || window.scrollX) window.scrollTo(0, 0);
|
|
12911
|
+
if (active) pinBottom(active);
|
|
12912
|
+
});
|
|
12827
12913
|
syncViewport();
|
|
12828
12914
|
}
|
|
12829
12915
|
|