claude-yes 1.146.0 → 1.148.0

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.
@@ -1,8 +1,8 @@
1
- import { t as CLIS_CONFIG } from "./ts-69rArGvR.js";
1
+ import { t as CLIS_CONFIG } from "./ts-CaCRPaos.js";
2
2
 
3
3
  //#region ts/SUPPORTED_CLIS.ts
4
4
  const SUPPORTED_CLIS = Object.keys(CLIS_CONFIG);
5
5
 
6
6
  //#endregion
7
7
  export { SUPPORTED_CLIS as t };
8
- //# sourceMappingURL=SUPPORTED_CLIS-CnkmOL3h.js.map
8
+ //# sourceMappingURL=SUPPORTED_CLIS-CmsPbgMe.js.map
@@ -0,0 +1,8 @@
1
+ import "./ts-CaCRPaos.js";
2
+ import "./logger-CDIsZ-Pp.js";
3
+ import "./versionChecker-DfO37H1R.js";
4
+ import "./pidStore-fqXqTKkh.js";
5
+ import "./globalPidIndex-DlmmJlO8.js";
6
+ import { t as SUPPORTED_CLIS } from "./SUPPORTED_CLIS-CmsPbgMe.js";
7
+
8
+ export { SUPPORTED_CLIS };
package/dist/cli.js CHANGED
@@ -1,7 +1,7 @@
1
1
  #!/usr/bin/env bun
2
2
  import { t as invokedCliName } from "./invokedCli-uqM2YYA7.js";
3
3
  import { n as logger } from "./logger-CDIsZ-Pp.js";
4
- import { i as versionString, n as displayVersion, r as getInstalledPackage, t as checkAndAutoUpdate } from "./versionChecker-CMTv-957.js";
4
+ import { i as versionString, n as displayVersion, r as getInstalledPackage, t as checkAndAutoUpdate } from "./versionChecker-DfO37H1R.js";
5
5
  import { argv } from "process";
6
6
  import { execFileSync, spawn } from "child_process";
7
7
  import ms from "ms";
@@ -480,7 +480,7 @@ function buildRustArgs(argv, cliFromScript, supportedClis) {
480
480
  const rawArg = process.argv[2];
481
481
  const managerCommands = !invokedCliName(process.argv);
482
482
  const isHelpFlag = rawArg === "-h" || rawArg === "--help";
483
- const { isSubcommand, runSubcommand, cmdHelp } = await import("./subcommands-CAiA5YvG.js");
483
+ const { isSubcommand, runSubcommand, cmdHelp } = await import("./subcommands-BQ2tu-y9.js");
484
484
  if (isHelpFlag && process.argv.length === 3) {
485
485
  cmdHelp(managerCommands);
486
486
  process.exit(0);
@@ -513,7 +513,7 @@ if (config.useRust) {
513
513
  }
514
514
  }
515
515
  if (rustBinary) {
516
- const { SUPPORTED_CLIS } = await import("./SUPPORTED_CLIS-RLJqQV3I.js");
516
+ const { SUPPORTED_CLIS } = await import("./SUPPORTED_CLIS-DpHVL8Mi.js");
517
517
  const rustArgs = buildRustArgs(process.argv, config.cli, SUPPORTED_CLIS);
518
518
  if (config.verbose) {
519
519
  console.log(`[rust] Using binary: ${rustBinary}`);
package/dist/index.js CHANGED
@@ -1,6 +1,6 @@
1
- import { a as removeControlCharacters, i as AgentContext, n as agentYes, r as config, t as CLIS_CONFIG } from "./ts-69rArGvR.js";
1
+ import { a as removeControlCharacters, i as AgentContext, n as agentYes, r as config, t as CLIS_CONFIG } from "./ts-CaCRPaos.js";
2
2
  import "./logger-CDIsZ-Pp.js";
3
- import "./versionChecker-CMTv-957.js";
3
+ import "./versionChecker-DfO37H1R.js";
4
4
  import "./pidStore-fqXqTKkh.js";
5
5
  import "./globalPidIndex-DlmmJlO8.js";
6
6
 
@@ -1,9 +1,9 @@
1
- import "./ts-69rArGvR.js";
1
+ import "./ts-CaCRPaos.js";
2
2
  import "./logger-CDIsZ-Pp.js";
3
- import "./versionChecker-CMTv-957.js";
3
+ import "./versionChecker-DfO37H1R.js";
4
4
  import "./pidStore-fqXqTKkh.js";
5
5
  import "./globalPidIndex-DlmmJlO8.js";
6
- import { t as SUPPORTED_CLIS } from "./SUPPORTED_CLIS-CnkmOL3h.js";
6
+ import { t as SUPPORTED_CLIS } from "./SUPPORTED_CLIS-CmsPbgMe.js";
7
7
  import { n as resolveSpawnCwd } from "./workspaceConfig-B3ylOZAO.js";
8
8
  import { createHash } from "node:crypto";
9
9
 
@@ -141,4 +141,4 @@ async function cmdSchedule(rest) {
141
141
 
142
142
  //#endregion
143
143
  export { cmdSchedule };
144
- //# sourceMappingURL=schedule-B4hhiS57.js.map
144
+ //# sourceMappingURL=schedule-DkTLO7No.js.map
@@ -1,15 +1,15 @@
1
- import "./ts-69rArGvR.js";
1
+ import "./ts-CaCRPaos.js";
2
2
  import "./logger-CDIsZ-Pp.js";
3
- import { r as getInstalledPackage } from "./versionChecker-CMTv-957.js";
3
+ import { r as getInstalledPackage } from "./versionChecker-DfO37H1R.js";
4
4
  import "./pidStore-fqXqTKkh.js";
5
5
  import { a as updateGlobalPidStatus } from "./globalPidIndex-DlmmJlO8.js";
6
6
  import { t as pgidForWrapper } from "./reaper-C-eWAxIj.js";
7
7
  import "./configShared-C1C04bbq.js";
8
- import { t as SUPPORTED_CLIS } from "./SUPPORTED_CLIS-CnkmOL3h.js";
8
+ import { t as SUPPORTED_CLIS } from "./SUPPORTED_CLIS-CmsPbgMe.js";
9
9
  import "./e2e-ClOI_aqV.js";
10
10
  import "./webrtcLink-BWhuA74k.js";
11
11
  import "./remotes-qK6uozO4.js";
12
- import { S as snapshotStatus, _ as renderRawLog, c as extractTaskCounts, g as readNotes, i as controlCodeFromName, m as listRecords, o as deriveLiveStatus, w as writeToIpc, y as resolveOne } from "./subcommands-BOyToc0y.js";
12
+ import { S as snapshotStatus, _ as renderRawLog, c as extractTaskCounts, g as readNotes, i as controlCodeFromName, m as listRecords, o as deriveLiveStatus, w as writeToIpc, y as resolveOne } from "./subcommands-Df_SjmLN.js";
13
13
  import yargs from "yargs";
14
14
  import { mkdir, open, readFile, stat, writeFile } from "fs/promises";
15
15
  import { homedir, hostname, userInfo } from "os";
@@ -1179,4 +1179,4 @@ Options:
1179
1179
 
1180
1180
  //#endregion
1181
1181
  export { cmdServe };
1182
- //# sourceMappingURL=serve-B-xbpPCX.js.map
1182
+ //# sourceMappingURL=serve-DQK6u2KS.js.map
@@ -32,7 +32,7 @@ async function cmdSetup(rest) {
32
32
  if (!existsSync(abs)) process.stderr.write(` note: that directory doesn't exist yet — create it, or agents spawned there will fail\n`);
33
33
  if (noShare) return 0;
34
34
  process.stdout.write(`\nsharing this machine to agent-yes.com…\n`);
35
- const { cmdServe } = await import("./serve-B-xbpPCX.js");
35
+ const { cmdServe } = await import("./serve-DQK6u2KS.js");
36
36
  return cmdServe([
37
37
  "install",
38
38
  "--share",
@@ -42,4 +42,4 @@ async function cmdSetup(rest) {
42
42
 
43
43
  //#endregion
44
44
  export { cmdSetup };
45
- //# sourceMappingURL=setup-IJyOkWLu.js.map
45
+ //# sourceMappingURL=setup-6R_yJsKX.js.map
@@ -4,6 +4,6 @@ import "./configShared-C1C04bbq.js";
4
4
  import "./e2e-ClOI_aqV.js";
5
5
  import "./webrtcLink-BWhuA74k.js";
6
6
  import "./remotes-qK6uozO4.js";
7
- import { C as stopTipForCli, S as snapshotStatus, _ as renderRawLog, a as cursorAbs, b as resolveReadWindow, c as extractTaskCounts, d as isExitRequest, f as isPidAlive, g as readNotes, h as matchKeyword, i as controlCodeFromName, l as finalizedLines, m as listRecords, n as READ_PAGE_DEFAULT, o as deriveLiveStatus, p as isSubcommand, r as cmdHelp, s as extractNeedsInput, t as GRACEFUL_EXIT_COMMANDS, u as isAgentStuck, v as renderRawLogLines, w as writeToIpc, x as runSubcommand, y as resolveOne } from "./subcommands-BOyToc0y.js";
7
+ import { C as stopTipForCli, S as snapshotStatus, _ as renderRawLog, a as cursorAbs, b as resolveReadWindow, c as extractTaskCounts, d as isExitRequest, f as isPidAlive, g as readNotes, h as matchKeyword, i as controlCodeFromName, l as finalizedLines, m as listRecords, n as READ_PAGE_DEFAULT, o as deriveLiveStatus, p as isSubcommand, r as cmdHelp, s as extractNeedsInput, t as GRACEFUL_EXIT_COMMANDS, u as isAgentStuck, v as renderRawLogLines, w as writeToIpc, x as runSubcommand, y as resolveOne } from "./subcommands-Df_SjmLN.js";
8
8
 
9
9
  export { cmdHelp, isSubcommand, runSubcommand };
@@ -554,15 +554,15 @@ async function runSubcommand(argv) {
554
554
  case "restart": return await cmdRestart(rest);
555
555
  case "note": return await cmdNote(rest);
556
556
  case "serve": {
557
- const { cmdServe } = await import("./serve-B-xbpPCX.js");
557
+ const { cmdServe } = await import("./serve-DQK6u2KS.js");
558
558
  return cmdServe(rest);
559
559
  }
560
560
  case "setup": {
561
- const { cmdSetup } = await import("./setup-IJyOkWLu.js");
561
+ const { cmdSetup } = await import("./setup-6R_yJsKX.js");
562
562
  return cmdSetup(rest);
563
563
  }
564
564
  case "schedule": {
565
- const { cmdSchedule } = await import("./schedule-B4hhiS57.js");
565
+ const { cmdSchedule } = await import("./schedule-DkTLO7No.js");
566
566
  return cmdSchedule(rest);
567
567
  }
568
568
  case "remote": {
@@ -2593,4 +2593,4 @@ async function cmdResultSet(rest) {
2593
2593
 
2594
2594
  //#endregion
2595
2595
  export { stopTipForCli as C, snapshotStatus as S, renderRawLog as _, cursorAbs as a, resolveReadWindow as b, extractTaskCounts as c, isExitRequest as d, isPidAlive as f, readNotes as g, matchKeyword as h, controlCodeFromName as i, finalizedLines as l, listRecords as m, READ_PAGE_DEFAULT as n, deriveLiveStatus as o, isSubcommand as p, cmdHelp as r, extractNeedsInput as s, GRACEFUL_EXIT_COMMANDS as t, isAgentStuck as u, renderRawLogLines as v, writeToIpc as w, runSubcommand as x, resolveOne as y };
2596
- //# sourceMappingURL=subcommands-BOyToc0y.js.map
2596
+ //# sourceMappingURL=subcommands-Df_SjmLN.js.map
@@ -1,5 +1,5 @@
1
1
  import { n as logger, t as addTransport } from "./logger-CDIsZ-Pp.js";
2
- import { r as getInstalledPackage } from "./versionChecker-CMTv-957.js";
2
+ import { r as getInstalledPackage } from "./versionChecker-DfO37H1R.js";
3
3
  import { t as agentYesHome } from "./agentYesHome-_eJa3DaX.js";
4
4
  import { i as shouldUseLock, r as releaseLock, t as acquireLock } from "./runningLock-V4qvXgAw.js";
5
5
  import { t as PidStore } from "./pidStore-fqXqTKkh.js";
@@ -1800,4 +1800,4 @@ function sleep(ms) {
1800
1800
 
1801
1801
  //#endregion
1802
1802
  export { removeControlCharacters as a, AgentContext as i, agentYes as n, config as r, CLIS_CONFIG as t };
1803
- //# sourceMappingURL=ts-69rArGvR.js.map
1803
+ //# sourceMappingURL=ts-CaCRPaos.js.map
@@ -7,7 +7,7 @@ import { fileURLToPath } from "url";
7
7
 
8
8
  //#region package.json
9
9
  var name = "claude-yes";
10
- var version = "1.146.0";
10
+ var version = "1.148.0";
11
11
 
12
12
  //#endregion
13
13
  //#region ts/versionChecker.ts
@@ -215,4 +215,4 @@ async function displayVersion() {
215
215
 
216
216
  //#endregion
217
217
  export { versionString as i, displayVersion as n, getInstalledPackage as r, checkAndAutoUpdate as t };
218
- //# sourceMappingURL=versionChecker-CMTv-957.js.map
218
+ //# sourceMappingURL=versionChecker-DfO37H1R.js.map
package/lab/ui/index.html CHANGED
@@ -550,7 +550,10 @@
550
550
  position: fixed;
551
551
  inset: 0;
552
552
  z-index: 30;
553
- background: rgba(2, 6, 12, 0.6);
553
+ /* Light scrim only: the omnibox live-previews the highlighted agent in the
554
+ terminal behind it, so the backdrop must stay see-through. The omnibox's
555
+ own panel bg + shadow keep it legible against the brighter terminal. */
556
+ background: rgba(2, 6, 12, 0.32);
554
557
  display: flex;
555
558
  align-items: flex-start;
556
559
  justify-content: center;
@@ -1490,8 +1493,8 @@
1490
1493
  <div class="omni-results" id="omni-results"></div>
1491
1494
  <div class="omni-foot">
1492
1495
  <span
1493
- ><b>↑↓</b> move &nbsp; <b>⏎</b> open &nbsp; <b>⌘⏎</b> spawn here &nbsp;
1494
- <b>esc</b> close</span
1496
+ ><b>↑↓</b> preview &nbsp; <b>⏎</b> open &nbsp; <b>⌘⏎</b> spawn here &nbsp;
1497
+ <b>esc</b> cancel</span
1495
1498
  >
1496
1499
  </div>
1497
1500
  </div>
@@ -3326,7 +3329,12 @@
3326
3329
  document.title = docTitle(name, e && e.status); // pure formatter (tested)
3327
3330
  }
3328
3331
 
3329
- function select(keyOrPid) {
3332
+ // opts.preview — a transient "peek" used by the Cmd+K omnibox to swap the
3333
+ // background terminal to the highlighted candidate WITHOUT committing: it
3334
+ // renders + live-tails the agent exactly like a real open, but skips the
3335
+ // persistence (localStorage/URL hash) and skips stealing keyboard focus from
3336
+ // the omnibox input. Esc later restores the original via a full select().
3337
+ function select(keyOrPid, opts = {}) {
3330
3338
  const e =
3331
3339
  entries.find((x) => x._key === keyOrPid) ||
3332
3340
  entries.find((x) => String(x.pid) === String(keyOrPid));
@@ -3343,19 +3351,22 @@
3343
3351
  renderPeerSelections(); // drop any prior agent's peer-selection overlay now
3344
3352
  sendPresence(); // announce we're now watching this agent (host TTLs the prior one)
3345
3353
  paintHeaderBadge();
3346
- // Remember the selection so a refresh re-opens this agent (see boot/autoPid).
3347
- try {
3348
- localStorage.setItem("ay.sel", sel);
3349
- } catch {}
3350
- // Reflect it in the URL hash as #room:pid. The fragment is never sent in
3351
- // any request, so unlike the old ?pid= query that landed in the server's
3352
- // access logs — the agent id stays client-side, while still surviving a
3353
- // refresh and being copy-pasteable as a deep link.
3354
- try {
3355
- const want = "#" + e._room + ":" + e.pid;
3356
- if (location.hash !== want)
3357
- history.replaceState(null, document.title, location.pathname + want);
3358
- } catch {}
3354
+ // Persist the selection (refresh re-opens this agent) and reflect it in the
3355
+ // URL hash as #room:pid — but ONLY for a real open. A preview is transient,
3356
+ // so it must not clobber the remembered selection or the deep-link hash;
3357
+ // those still point at the agent we'll restore to on Esc. The fragment is
3358
+ // never sent in any request, so the agent id stays client-side while
3359
+ // surviving a refresh and being copy-pasteable as a deep link.
3360
+ if (!opts.preview) {
3361
+ try {
3362
+ localStorage.setItem("ay.sel", sel);
3363
+ } catch {}
3364
+ try {
3365
+ const want = "#" + e._room + ":" + e.pid;
3366
+ if (location.hash !== want)
3367
+ history.replaceState(null, document.title, location.pathname + want);
3368
+ } catch {}
3369
+ }
3359
3370
  // pid + tx are how we talk to the agent's own host; sel (composite) is
3360
3371
  // only for UI identity/highlight, since pids can collide across rooms.
3361
3372
  const pid = e.pid;
@@ -3405,10 +3416,31 @@
3405
3416
  /* addon CDN blocked — terminal still works, just without auto-links */
3406
3417
  }
3407
3418
  term.open(logEl);
3419
+ // Right-click to copy the current selection (terminal convention): when
3420
+ // text is selected, a context-menu click copies it to the clipboard and
3421
+ // suppresses the browser menu, then clears the selection so the highlight
3422
+ // doesn't linger. With nothing selected we leave the default menu alone
3423
+ // (and a mouse-tracking TUI still gets its own right-click via xterm).
3424
+ // The Clipboard API is undefined over plain HTTP and can reject on a
3425
+ // permission denial — only suppress the menu when we can actually copy,
3426
+ // clear the selection once the write resolves, and swallow a failure
3427
+ // quietly (the highlight stays so the user can retry).
3428
+ term.element?.addEventListener("contextmenu", (ev) => {
3429
+ if (!term || !term.hasSelection()) return;
3430
+ const text = term.getSelection();
3431
+ if (!text || !navigator.clipboard) return;
3432
+ ev.preventDefault();
3433
+ navigator.clipboard.writeText(text).then(
3434
+ () => term.clearSelection(),
3435
+ () => {},
3436
+ );
3437
+ });
3408
3438
  // On a phone, auto-focusing yanks up the soft keyboard the moment you open
3409
3439
  // an agent — even when you only meant to read the tail. Skip it there; a tap
3410
3440
  // on the terminal still focuses to type. Desktop keeps instant keyboard input.
3411
- if (window.innerWidth > 720) term.focus();
3441
+ // During a preview the omnibox input owns the keyboard (so ↑↓ keep moving the
3442
+ // selection), so never pull focus into the terminal.
3443
+ if (!opts.preview && window.innerWidth > 720) term.focus();
3412
3444
  // An agent can rename itself by emitting an OSC 0/2 title sequence
3413
3445
  // (\x1b]2;my-name\x07); xterm parses it out of the raw PTY stream we already
3414
3446
  // feed it, so we just surface the latest title as the header name. Falls
@@ -3518,7 +3550,12 @@
3518
3550
  const close = tx.subscribe(
3519
3551
  "/api/tail/" + encodeURIComponent(pid) + "?raw=1",
3520
3552
  (raw) => {
3521
- if (term) {
3553
+ // Guard on selKey: a late event from a just-closed subscription (the
3554
+ // close is async, so one buffered message can still arrive) must NOT
3555
+ // be written into the NEW terminal — otherwise the previous agent's
3556
+ // raw bleeds into the one we just switched to. Preview makes switches
3557
+ // frequent, so this race is no longer theoretical.
3558
+ if (term && sel === selKey) {
3522
3559
  term.write(raw);
3523
3560
  perfNote("out", raw?.length ?? 0);
3524
3561
  }
@@ -3670,32 +3707,93 @@
3670
3707
  let omniIdx = 0;
3671
3708
  let omniTailTimer = null;
3672
3709
  let omniTailSeq = 0;
3710
+ // Live-preview state. While the omnibox is open it swaps the BACKGROUND
3711
+ // terminal to whatever candidate is highlighted, so you can read it through
3712
+ // the (lightened) backdrop. omniReturnSel is the agent that was open when the
3713
+ // omnibox launched — Esc/cancel restores it, commit (Enter/click) keeps the
3714
+ // previewed one. omniWasDetail remembers the mobile list/detail pane so a
3715
+ // cancel lands back where you were. omniPreviewKey dedupes redundant swaps;
3716
+ // omniPreviewTimer debounces them (rebuilding xterm + the tail SSE on every
3717
+ // arrow keypress would thrash the host).
3718
+ let omniReturnSel = null;
3719
+ let omniWasDetail = false;
3720
+ let omniPreviewing = false;
3721
+ let omniPreviewKey = null;
3722
+ let omniPreviewTimer = null;
3673
3723
  const omniOpen = () => $("omni").style.display !== "none";
3674
3724
 
3675
3725
  function openOmni() {
3726
+ omniReturnSel = sel;
3727
+ omniWasDetail = document.querySelector(".app").classList.contains("show-detail");
3728
+ omniPreviewing = false;
3729
+ omniPreviewKey = sel; // start deduped against the already-open agent
3676
3730
  $("omni").style.display = "flex";
3677
3731
  const inp = $("omni-input");
3678
3732
  inp.value = "";
3679
3733
  inp.focus();
3680
- runOmni();
3681
- }
3682
- function closeOmni() {
3734
+ runOmni(); // no preview yet — the bg stays on the original until you move/type
3735
+ }
3736
+ // restore=true (default — Esc / backdrop click / Cmd+K toggle) reverts the
3737
+ // terminal to the agent that was open before the omnibox, via a full select()
3738
+ // so the original is re-persisted, and undoes any mobile pane flip the preview
3739
+ // caused. restore=false (commit) leaves the previewed agent in place for the
3740
+ // caller (omniActivate) to finalize with its own select().
3741
+ function closeOmni(restore = true) {
3683
3742
  if (omniTailTimer) clearTimeout(omniTailTimer);
3743
+ if (omniPreviewTimer) clearTimeout(omniPreviewTimer);
3744
+ omniPreviewTimer = null;
3684
3745
  omniTailSeq++; // cancel any in-flight tail search
3685
3746
  $("omni").style.display = "none";
3747
+ if (restore && omniPreviewing) {
3748
+ // Re-open + re-persist the original (only if we actually moved away from
3749
+ // it — when previewing the original itself, sel already matches and the
3750
+ // saved selection was never clobbered, so a rebuild would just flicker).
3751
+ if (omniReturnSel && sel !== omniReturnSel) select(omniReturnSel);
3752
+ // Either way restore the mobile list/detail state the preview flipped.
3753
+ document.querySelector(".app").classList.toggle("show-detail", omniWasDetail);
3754
+ }
3755
+ omniPreviewing = false;
3686
3756
  }
3687
3757
 
3688
- // The agent the spawn action is anchored to. PINNED to the agent currently
3689
- // open in the console (its cwd/cli), so the spawn target stays put as you
3690
- // arrow through search results. Falls back to the top result when nothing is
3691
- // selected yet.
3758
+ // The agent the spawn action is anchored to. PINNED to the agent that was open
3759
+ // when the omnibox launched (omniReturnSel) NOT the live `sel`, which now
3760
+ // moves as you arrow-preview candidates so the spawn cwd/cli stays put as you
3761
+ // browse. Falls back to the top result when nothing was open.
3692
3762
  function omniAnchor() {
3693
- const cur = sel ? entries.find((x) => x._key === sel) : null;
3763
+ const cur = omniReturnSel ? entries.find((x) => x._key === omniReturnSel) : null;
3694
3764
  if (cur) return cur;
3695
3765
  const first = omniRows.find((r) => r.kind === "agent");
3696
3766
  return first ? first.entry : null;
3697
3767
  }
3698
3768
 
3769
+ // Which agent the highlighted candidate should preview in the background: an
3770
+ // agent row → that agent; the spawn row / an empty list → the launch-time
3771
+ // agent (so the backdrop shows the spawn target's cwd).
3772
+ function omniPreviewTarget() {
3773
+ const row = omniRows[omniIdx];
3774
+ if (row && row.kind === "agent") return row.entry._key;
3775
+ return omniReturnSel;
3776
+ }
3777
+ // Swap the background terminal to the highlighted candidate. Debounced so a
3778
+ // held arrow key doesn't rebuild xterm + reconnect the tail on every repeat,
3779
+ // and deduped by key so re-renders (filtering, tail-search inserts) don't
3780
+ // re-peek the agent already shown. Called only on explicit user moves (arrow /
3781
+ // type), never on open, so the bg stays on the original until you act.
3782
+ function omniPreview() {
3783
+ const key = omniPreviewTarget();
3784
+ if (key === omniPreviewKey) return; // already targeting this agent
3785
+ omniPreviewKey = key;
3786
+ if (omniPreviewTimer) clearTimeout(omniPreviewTimer);
3787
+ omniPreviewTimer = setTimeout(() => {
3788
+ omniPreviewTimer = null;
3789
+ if (!omniOpen()) return; // closed during the debounce window
3790
+ if (!key || key === sel) return; // nothing to peek / already showing it
3791
+ omniPreviewing = true;
3792
+ select(key, { preview: true });
3793
+ $("omni-input").focus(); // select() must not steal the keyboard
3794
+ }, 120);
3795
+ }
3796
+
3699
3797
  function renderOmni() {
3700
3798
  const q = $("omni-input").value.trim();
3701
3799
  if (omniIdx >= omniRows.length) omniIdx = Math.max(0, omniRows.length - 1);
@@ -3784,8 +3882,12 @@
3784
3882
  : esc(raw);
3785
3883
  const at = omniRows.findIndex((r) => r.kind === "spawn");
3786
3884
  const row = { kind: "agent", entry: e, snippet };
3787
- if (at >= 0) omniRows.splice(at, 0, row);
3788
- else omniRows.push(row);
3885
+ if (at >= 0) {
3886
+ omniRows.splice(at, 0, row);
3887
+ // Keep the highlight (and thus the preview) anchored to the SAME row:
3888
+ // an insert at/above omniIdx shifts our row down one, so follow it.
3889
+ if (at <= omniIdx) omniIdx++;
3890
+ } else omniRows.push(row);
3789
3891
  }),
3790
3892
  );
3791
3893
  if (seq === omniTailSeq) renderOmni();
@@ -3795,13 +3897,14 @@
3795
3897
  if (!omniRows.length) return;
3796
3898
  omniIdx = (omniIdx + d + omniRows.length) % omniRows.length;
3797
3899
  renderOmni();
3900
+ omniPreview();
3798
3901
  }
3799
3902
  async function omniActivate(forceSpawn) {
3800
3903
  const q = $("omni-input").value.trim();
3801
3904
  const row = omniRows[omniIdx];
3802
3905
  if (forceSpawn || (row && row.kind === "spawn")) {
3803
3906
  const anchor = omniAnchor();
3804
- closeOmni();
3907
+ closeOmni(false); // committing — keep the bg as-is, spawnAndSelect takes over
3805
3908
  await spawnAndSelect(
3806
3909
  { cli: anchor?.cli || "claude", cwd: anchor?.cwd || undefined, prompt: q || undefined },
3807
3910
  anchor?._room,
@@ -3809,12 +3912,17 @@
3809
3912
  return;
3810
3913
  }
3811
3914
  if (row && row.kind === "agent") {
3812
- closeOmni();
3915
+ closeOmni(false); // committing the previewed agent — don't restore the original
3813
3916
  select(row.entry._key);
3814
3917
  }
3815
3918
  }
3816
3919
 
3817
- $("omni-input").addEventListener("input", runOmni);
3920
+ // Typing re-filters AND re-previews the new top match (user-initiated, so a
3921
+ // bg swap here is expected); the open's own runOmni() call is silent.
3922
+ $("omni-input").addEventListener("input", () => {
3923
+ runOmni();
3924
+ omniPreview();
3925
+ });
3818
3926
  $("omni-results").addEventListener("click", (ev) => {
3819
3927
  const r = ev.target.closest(".omni-row");
3820
3928
  if (!r) return;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "claude-yes",
3
- "version": "1.146.0",
3
+ "version": "1.148.0",
4
4
  "description": "A wrapper tool that automates interactions with various AI CLI tools by automatically handling common prompts and responses.",
5
5
  "keywords": [
6
6
  "ai",
@@ -1,8 +0,0 @@
1
- import "./ts-69rArGvR.js";
2
- import "./logger-CDIsZ-Pp.js";
3
- import "./versionChecker-CMTv-957.js";
4
- import "./pidStore-fqXqTKkh.js";
5
- import "./globalPidIndex-DlmmJlO8.js";
6
- import { t as SUPPORTED_CLIS } from "./SUPPORTED_CLIS-CnkmOL3h.js";
7
-
8
- export { SUPPORTED_CLIS };