agent-yes 1.124.0 → 1.126.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.
- package/dist/{SUPPORTED_CLIS-D_-bIOlW.js → SUPPORTED_CLIS-CdY3HoJ6.js} +2 -2
- package/dist/SUPPORTED_CLIS-Rru_Sz2g.js +8 -0
- package/dist/cli.js +3 -3
- package/dist/index.js +2 -2
- package/dist/{schedule-D2cn8N7o.js → schedule-DpU_v1GI.js} +4 -4
- package/dist/{serve-Bo3bDXQG.js → serve-TblBCSP1.js} +5 -5
- package/dist/{setup-CvOr258q.js → setup-Ckac0l6u.js} +2 -2
- package/dist/{subcommands-ClVHy-xI.js → subcommands-CfIvTc92.js} +4 -4
- package/dist/{subcommands-Llf9o8nh.js → subcommands-muAbavuV.js} +1 -1
- package/dist/{ts-DGIglR4L.js → ts-mC5Sxj8J.js} +2 -2
- package/dist/{versionChecker-gaQkM2Hy.js → versionChecker-B0h02RsF.js} +2 -2
- package/lab/ui/index.html +87 -39
- package/package.json +1 -1
- package/dist/SUPPORTED_CLIS-Cvm7yo5d.js +0 -8
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { t as CLIS_CONFIG } from "./ts-
|
|
1
|
+
import { t as CLIS_CONFIG } from "./ts-mC5Sxj8J.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-
|
|
8
|
+
//# sourceMappingURL=SUPPORTED_CLIS-CdY3HoJ6.js.map
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import "./ts-mC5Sxj8J.js";
|
|
2
|
+
import "./logger-B9h0djqx.js";
|
|
3
|
+
import "./versionChecker-B0h02RsF.js";
|
|
4
|
+
import "./pidStore-CGKIhaJO.js";
|
|
5
|
+
import "./globalPidIndex-C7r2m6s7.js";
|
|
6
|
+
import { t as SUPPORTED_CLIS } from "./SUPPORTED_CLIS-CdY3HoJ6.js";
|
|
7
|
+
|
|
8
|
+
export { SUPPORTED_CLIS };
|
package/dist/cli.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
#!/usr/bin/env bun
|
|
2
2
|
import { n as logger } from "./logger-B9h0djqx.js";
|
|
3
|
-
import { i as versionString, n as displayVersion, r as getInstalledPackage, t as checkAndAutoUpdate } from "./versionChecker-
|
|
3
|
+
import { i as versionString, n as displayVersion, r as getInstalledPackage, t as checkAndAutoUpdate } from "./versionChecker-B0h02RsF.js";
|
|
4
4
|
import { argv } from "process";
|
|
5
5
|
import { execFileSync, spawn } from "child_process";
|
|
6
6
|
import ms from "ms";
|
|
@@ -482,7 +482,7 @@ function buildRustArgs(argv, cliFromScript, supportedClis) {
|
|
|
482
482
|
{
|
|
483
483
|
const rawArg = process.argv[2];
|
|
484
484
|
const isHelpFlag = rawArg === "-h" || rawArg === "--help";
|
|
485
|
-
const { isSubcommand, runSubcommand, cmdHelp } = await import("./subcommands-
|
|
485
|
+
const { isSubcommand, runSubcommand, cmdHelp } = await import("./subcommands-muAbavuV.js");
|
|
486
486
|
if (isHelpFlag && process.argv.length === 3) {
|
|
487
487
|
cmdHelp();
|
|
488
488
|
process.exit(0);
|
|
@@ -515,7 +515,7 @@ if (config.useRust) {
|
|
|
515
515
|
}
|
|
516
516
|
}
|
|
517
517
|
if (rustBinary) {
|
|
518
|
-
const { SUPPORTED_CLIS } = await import("./SUPPORTED_CLIS-
|
|
518
|
+
const { SUPPORTED_CLIS } = await import("./SUPPORTED_CLIS-Rru_Sz2g.js");
|
|
519
519
|
const rustArgs = buildRustArgs(process.argv, config.cli, SUPPORTED_CLIS);
|
|
520
520
|
if (config.verbose) {
|
|
521
521
|
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-
|
|
1
|
+
import { a as removeControlCharacters, i as AgentContext, n as agentYes, r as config, t as CLIS_CONFIG } from "./ts-mC5Sxj8J.js";
|
|
2
2
|
import "./logger-B9h0djqx.js";
|
|
3
|
-
import "./versionChecker-
|
|
3
|
+
import "./versionChecker-B0h02RsF.js";
|
|
4
4
|
import "./pidStore-CGKIhaJO.js";
|
|
5
5
|
import "./globalPidIndex-C7r2m6s7.js";
|
|
6
6
|
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import "./ts-
|
|
1
|
+
import "./ts-mC5Sxj8J.js";
|
|
2
2
|
import "./logger-B9h0djqx.js";
|
|
3
|
-
import "./versionChecker-
|
|
3
|
+
import "./versionChecker-B0h02RsF.js";
|
|
4
4
|
import "./pidStore-CGKIhaJO.js";
|
|
5
5
|
import "./globalPidIndex-C7r2m6s7.js";
|
|
6
|
-
import { t as SUPPORTED_CLIS } from "./SUPPORTED_CLIS-
|
|
6
|
+
import { t as SUPPORTED_CLIS } from "./SUPPORTED_CLIS-CdY3HoJ6.js";
|
|
7
7
|
import { n as resolveSpawnCwd } from "./workspaceConfig-BJO4fzEn.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-
|
|
144
|
+
//# sourceMappingURL=schedule-DpU_v1GI.js.map
|
|
@@ -1,13 +1,13 @@
|
|
|
1
|
-
import "./ts-
|
|
1
|
+
import "./ts-mC5Sxj8J.js";
|
|
2
2
|
import "./logger-B9h0djqx.js";
|
|
3
|
-
import { r as getInstalledPackage } from "./versionChecker-
|
|
3
|
+
import { r as getInstalledPackage } from "./versionChecker-B0h02RsF.js";
|
|
4
4
|
import "./pidStore-CGKIhaJO.js";
|
|
5
5
|
import { a as updateGlobalPidStatus } from "./globalPidIndex-C7r2m6s7.js";
|
|
6
6
|
import { t as pgidForWrapper } from "./reaper-BkjPN7mw.js";
|
|
7
7
|
import "./configShared-C5QaNPnz.js";
|
|
8
|
-
import { t as SUPPORTED_CLIS } from "./SUPPORTED_CLIS-
|
|
8
|
+
import { t as SUPPORTED_CLIS } from "./SUPPORTED_CLIS-CdY3HoJ6.js";
|
|
9
9
|
import "./remotes-D8GvSbhf.js";
|
|
10
|
-
import { f as readNotes, g as snapshotStatus, m as resolveOne, o as extractTaskCounts, p as renderRawLog, r as controlCodeFromName, u as listRecords, v as writeToIpc } from "./subcommands-
|
|
10
|
+
import { f as readNotes, g as snapshotStatus, m as resolveOne, o as extractTaskCounts, p as renderRawLog, r as controlCodeFromName, u as listRecords, v as writeToIpc } from "./subcommands-CfIvTc92.js";
|
|
11
11
|
import yargs from "yargs";
|
|
12
12
|
import { mkdir, open, readFile, stat, writeFile } from "fs/promises";
|
|
13
13
|
import { homedir, hostname, userInfo } from "os";
|
|
@@ -1107,4 +1107,4 @@ Options:
|
|
|
1107
1107
|
|
|
1108
1108
|
//#endregion
|
|
1109
1109
|
export { cmdServe };
|
|
1110
|
-
//# sourceMappingURL=serve-
|
|
1110
|
+
//# sourceMappingURL=serve-TblBCSP1.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-
|
|
35
|
+
const { cmdServe } = await import("./serve-TblBCSP1.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-
|
|
45
|
+
//# sourceMappingURL=setup-Ckac0l6u.js.map
|
|
@@ -524,15 +524,15 @@ async function runSubcommand(argv) {
|
|
|
524
524
|
case "restart": return await cmdRestart(rest);
|
|
525
525
|
case "note": return await cmdNote(rest);
|
|
526
526
|
case "serve": {
|
|
527
|
-
const { cmdServe } = await import("./serve-
|
|
527
|
+
const { cmdServe } = await import("./serve-TblBCSP1.js");
|
|
528
528
|
return cmdServe(rest);
|
|
529
529
|
}
|
|
530
530
|
case "setup": {
|
|
531
|
-
const { cmdSetup } = await import("./setup-
|
|
531
|
+
const { cmdSetup } = await import("./setup-Ckac0l6u.js");
|
|
532
532
|
return cmdSetup(rest);
|
|
533
533
|
}
|
|
534
534
|
case "schedule": {
|
|
535
|
-
const { cmdSchedule } = await import("./schedule-
|
|
535
|
+
const { cmdSchedule } = await import("./schedule-DpU_v1GI.js");
|
|
536
536
|
return cmdSchedule(rest);
|
|
537
537
|
}
|
|
538
538
|
case "remote": {
|
|
@@ -2304,4 +2304,4 @@ async function cmdResultSet(rest) {
|
|
|
2304
2304
|
|
|
2305
2305
|
//#endregion
|
|
2306
2306
|
export { stopTipForCli as _, extractNeedsInput as a, isPidAlive as c, matchKeyword as d, readNotes as f, snapshotStatus as g, runSubcommand as h, cursorAbs as i, isSubcommand as l, resolveOne as m, cmdHelp as n, extractTaskCounts as o, renderRawLog as p, controlCodeFromName as r, finalizedLines as s, GRACEFUL_EXIT_COMMANDS as t, listRecords as u, writeToIpc as v };
|
|
2307
|
-
//# sourceMappingURL=subcommands-
|
|
2307
|
+
//# sourceMappingURL=subcommands-CfIvTc92.js.map
|
|
@@ -2,6 +2,6 @@ import "./logger-B9h0djqx.js";
|
|
|
2
2
|
import "./globalPidIndex-C7r2m6s7.js";
|
|
3
3
|
import "./configShared-C5QaNPnz.js";
|
|
4
4
|
import "./remotes-D8GvSbhf.js";
|
|
5
|
-
import { _ as stopTipForCli, a as extractNeedsInput, c as isPidAlive, d as matchKeyword, f as readNotes, g as snapshotStatus, h as runSubcommand, i as cursorAbs, l as isSubcommand, m as resolveOne, n as cmdHelp, o as extractTaskCounts, p as renderRawLog, r as controlCodeFromName, s as finalizedLines, t as GRACEFUL_EXIT_COMMANDS, u as listRecords, v as writeToIpc } from "./subcommands-
|
|
5
|
+
import { _ as stopTipForCli, a as extractNeedsInput, c as isPidAlive, d as matchKeyword, f as readNotes, g as snapshotStatus, h as runSubcommand, i as cursorAbs, l as isSubcommand, m as resolveOne, n as cmdHelp, o as extractTaskCounts, p as renderRawLog, r as controlCodeFromName, s as finalizedLines, t as GRACEFUL_EXIT_COMMANDS, u as listRecords, v as writeToIpc } from "./subcommands-CfIvTc92.js";
|
|
6
6
|
|
|
7
7
|
export { cmdHelp, isSubcommand, runSubcommand };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { n as logger, t as addTransport } from "./logger-B9h0djqx.js";
|
|
2
|
-
import { r as getInstalledPackage } from "./versionChecker-
|
|
2
|
+
import { r as getInstalledPackage } from "./versionChecker-B0h02RsF.js";
|
|
3
3
|
import { t as agentYesHome } from "./agentYesHome-BvaUOzCV.js";
|
|
4
4
|
import { i as shouldUseLock, r as releaseLock, t as acquireLock } from "./runningLock-CJxsoGdb.js";
|
|
5
5
|
import { t as PidStore } from "./pidStore-CGKIhaJO.js";
|
|
@@ -1787,4 +1787,4 @@ function sleep(ms) {
|
|
|
1787
1787
|
|
|
1788
1788
|
//#endregion
|
|
1789
1789
|
export { removeControlCharacters as a, AgentContext as i, agentYes as n, config as r, CLIS_CONFIG as t };
|
|
1790
|
-
//# sourceMappingURL=ts-
|
|
1790
|
+
//# sourceMappingURL=ts-mC5Sxj8J.js.map
|
|
@@ -7,7 +7,7 @@ import { fileURLToPath } from "url";
|
|
|
7
7
|
|
|
8
8
|
//#region package.json
|
|
9
9
|
var name = "agent-yes";
|
|
10
|
-
var version = "1.
|
|
10
|
+
var version = "1.126.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-
|
|
218
|
+
//# sourceMappingURL=versionChecker-B0h02RsF.js.map
|
package/lab/ui/index.html
CHANGED
|
@@ -165,9 +165,11 @@
|
|
|
165
165
|
border-radius: 999px;
|
|
166
166
|
border: 1px solid currentColor;
|
|
167
167
|
text-transform: uppercase;
|
|
168
|
-
opacity: 0.9;
|
|
169
168
|
cursor: help;
|
|
170
169
|
}
|
|
170
|
+
/* NB: no opacity on .ctype — CSS opacity applies to the whole subtree, so
|
|
171
|
+
it would bleed the terminal through the .ctip popover below. Dim the pill
|
|
172
|
+
via border/text color instead if needed. */
|
|
171
173
|
.ctype[hidden] {
|
|
172
174
|
display: none;
|
|
173
175
|
}
|
|
@@ -180,10 +182,13 @@
|
|
|
180
182
|
z-index: 30;
|
|
181
183
|
min-width: 240px;
|
|
182
184
|
padding: 8px 10px;
|
|
183
|
-
background: var(--panel);
|
|
185
|
+
background: var(--panel); /* fallback when color-mix is unsupported */
|
|
186
|
+
background: color-mix(in srgb, var(--panel) 90%, transparent);
|
|
187
|
+
backdrop-filter: blur(14px) saturate(1.4);
|
|
188
|
+
-webkit-backdrop-filter: blur(14px) saturate(1.4);
|
|
184
189
|
border: 1px solid var(--line);
|
|
185
|
-
border-radius:
|
|
186
|
-
box-shadow: 0
|
|
190
|
+
border-radius: 10px;
|
|
191
|
+
box-shadow: 0 10px 30px rgba(0, 0, 0, 0.45);
|
|
187
192
|
color: var(--fg);
|
|
188
193
|
font-family: var(--mono);
|
|
189
194
|
font-size: 10.5px;
|
|
@@ -997,6 +1002,10 @@
|
|
|
997
1002
|
border-color: var(--accent);
|
|
998
1003
|
color: #fff;
|
|
999
1004
|
}
|
|
1005
|
+
/* modifier glyphs (⌃ ⌥ ⇧) read better a touch larger than the text keys */
|
|
1006
|
+
.keybar .kbmod {
|
|
1007
|
+
font-size: 16px;
|
|
1008
|
+
}
|
|
1000
1009
|
/* Line composer — mobile-only. Carries the bottom safe-area inset so it
|
|
1001
1010
|
clears the home indicator (completes the terminal pane's inset cover). */
|
|
1002
1011
|
.composer {
|
|
@@ -1239,17 +1248,47 @@
|
|
|
1239
1248
|
posts raw sequences to the agent over the same /api/send wire. -->
|
|
1240
1249
|
<div class="keybar" id="keybar" role="group" aria-label="terminal keys">
|
|
1241
1250
|
<button class="kb" data-key="esc" title="Escape">Esc</button>
|
|
1242
|
-
<button
|
|
1243
|
-
|
|
1251
|
+
<button
|
|
1252
|
+
class="kb kbmod"
|
|
1253
|
+
data-mod="ctrl"
|
|
1254
|
+
title="Ctrl — applies to the next key"
|
|
1255
|
+
aria-label="Control"
|
|
1256
|
+
>
|
|
1257
|
+
⌃
|
|
1258
|
+
</button>
|
|
1259
|
+
<button
|
|
1260
|
+
class="kb kbmod"
|
|
1261
|
+
data-mod="alt"
|
|
1262
|
+
title="Alt / Option — applies to the next key"
|
|
1263
|
+
aria-label="Alt"
|
|
1264
|
+
>
|
|
1265
|
+
⌥
|
|
1266
|
+
</button>
|
|
1267
|
+
<button
|
|
1268
|
+
class="kb kbmod"
|
|
1269
|
+
data-mod="shift"
|
|
1270
|
+
title="Shift — applies to the next key"
|
|
1271
|
+
aria-label="Shift"
|
|
1272
|
+
>
|
|
1273
|
+
⇧
|
|
1244
1274
|
</button>
|
|
1245
|
-
<button class="kb kbmod" data-mod="alt" title="Alt — applies to the next key">Alt</button>
|
|
1246
1275
|
<button class="kb" data-key="tab" title="Tab">Tab</button>
|
|
1247
|
-
<button
|
|
1276
|
+
<button
|
|
1277
|
+
class="kb"
|
|
1278
|
+
data-key="stab"
|
|
1279
|
+
title="Shift-Tab (e.g. cycle modes)"
|
|
1280
|
+
aria-label="Shift Tab"
|
|
1281
|
+
>
|
|
1282
|
+
⇧Tab
|
|
1283
|
+
</button>
|
|
1284
|
+
<button class="kb" data-key="cc" title="Ctrl-C — interrupt" aria-label="Control C">
|
|
1285
|
+
^C
|
|
1286
|
+
</button>
|
|
1248
1287
|
<button class="kb" data-arrow="up" title="Up" aria-label="Up">↑</button>
|
|
1249
1288
|
<button class="kb" data-arrow="down" title="Down" aria-label="Down">↓</button>
|
|
1250
1289
|
<button class="kb" data-arrow="left" title="Left" aria-label="Left">←</button>
|
|
1251
1290
|
<button class="kb" data-arrow="right" title="Right" aria-label="Right">→</button>
|
|
1252
|
-
<button class="kb" data-key="enter" title="Enter">⏎</button>
|
|
1291
|
+
<button class="kb" data-key="enter" title="Enter" aria-label="Enter">⏎</button>
|
|
1253
1292
|
</div>
|
|
1254
1293
|
<!-- Line composer — the reliable path for typing a prompt on a phone:
|
|
1255
1294
|
a normal textarea (no IME/autocorrect surprises that plague xterm's
|
|
@@ -2250,7 +2289,8 @@
|
|
|
2250
2289
|
// sequences straight to the selected agent's stdin, and a sticky Ctrl/Alt
|
|
2251
2290
|
// rewrites the NEXT character typed on the soft keyboard.
|
|
2252
2291
|
let modCtrl = false,
|
|
2253
|
-
modAlt = false
|
|
2292
|
+
modAlt = false,
|
|
2293
|
+
modShift = false;
|
|
2254
2294
|
// Send raw bytes to the currently-selected agent. Uses the live `sel`, so
|
|
2255
2295
|
// it always hits the open agent even while an old terminal tears down mid
|
|
2256
2296
|
// switch — the same /api/send wire the terminal's own input uses.
|
|
@@ -2262,20 +2302,25 @@
|
|
|
2262
2302
|
.post("/api/send", { keyword: String(e.pid), msg: data, code: "none" })
|
|
2263
2303
|
.catch(() => {});
|
|
2264
2304
|
}
|
|
2265
|
-
// Apply a pending sticky Ctrl/Alt to
|
|
2266
|
-
//
|
|
2267
|
-
//
|
|
2268
|
-
//
|
|
2305
|
+
// Apply a pending sticky Ctrl/Alt to a typed character, then disarm. Only a
|
|
2306
|
+
// SINGLE character is transformed: Ctrl folds @A–Z[\]^_ (case-insensitive)
|
|
2307
|
+
// to 0x00–0x1f; Alt/Meta is an ESC prefix; Shift is a no-op (the soft
|
|
2308
|
+
// keyboard already produced the shifted char — Shift only matters for the
|
|
2309
|
+
// key bar's Tab/arrows). Any OTHER input (paste, IME commit, escape/mouse
|
|
2310
|
+
// sequence) passes through unchanged but STILL disarms — a one-shot modifier
|
|
2311
|
+
// must not survive to a later key (e.g. tap ⇧, paste, then an arrow).
|
|
2269
2312
|
function applyStickyMods(d) {
|
|
2270
|
-
if (
|
|
2313
|
+
if (!modCtrl && !modAlt && !modShift) return d;
|
|
2271
2314
|
let c = d;
|
|
2272
|
-
if (
|
|
2273
|
-
|
|
2274
|
-
|
|
2275
|
-
|
|
2315
|
+
if (typeof d === "string" && d.length === 1) {
|
|
2316
|
+
if (modCtrl) {
|
|
2317
|
+
const u = d.toUpperCase().charCodeAt(0);
|
|
2318
|
+
if (u >= 64 && u <= 95) c = String.fromCharCode(u - 64);
|
|
2319
|
+
else if (u === 32) c = "\x00"; // Ctrl-Space → NUL
|
|
2320
|
+
}
|
|
2321
|
+
if (modAlt) c = "\x1b" + c;
|
|
2276
2322
|
}
|
|
2277
|
-
|
|
2278
|
-
modCtrl = modAlt = false;
|
|
2323
|
+
modCtrl = modAlt = modShift = false; // one-shot — disarm on any input
|
|
2279
2324
|
syncModButtons();
|
|
2280
2325
|
return c;
|
|
2281
2326
|
}
|
|
@@ -2284,11 +2329,14 @@
|
|
|
2284
2329
|
if (!kb) return;
|
|
2285
2330
|
kb.querySelector('[data-mod="ctrl"]')?.classList.toggle("on", modCtrl);
|
|
2286
2331
|
kb.querySelector('[data-mod="alt"]')?.classList.toggle("on", modAlt);
|
|
2332
|
+
kb.querySelector('[data-mod="shift"]')?.classList.toggle("on", modShift);
|
|
2287
2333
|
}
|
|
2288
2334
|
(function keybarBoot() {
|
|
2289
2335
|
const kb = $("keybar");
|
|
2290
2336
|
if (!kb) return;
|
|
2291
|
-
|
|
2337
|
+
// stab = Shift-Tab → CBT (ESC [ Z); back-tab / reverse field nav, and
|
|
2338
|
+
// what Claude Code's TUI reads to cycle permission modes.
|
|
2339
|
+
const SEQ = { esc: "\x1b", tab: "\t", stab: "\x1b[Z", enter: "\r", cc: "\x03" };
|
|
2292
2340
|
const ARROW = { up: "A", down: "B", right: "C", left: "D" };
|
|
2293
2341
|
// Don't let a button steal focus — that would drop the soft keyboard and
|
|
2294
2342
|
// blur whatever the user is typing into (terminal or composer).
|
|
@@ -2299,21 +2347,23 @@
|
|
|
2299
2347
|
const b = ev.target.closest("button.kb");
|
|
2300
2348
|
if (!b) return;
|
|
2301
2349
|
if (b.dataset.mod) {
|
|
2302
|
-
// sticky toggle — armed for the next soft-keyboard
|
|
2303
|
-
|
|
2304
|
-
|
|
2350
|
+
// sticky toggle — armed for the next key (a soft-keyboard char or a bar key)
|
|
2351
|
+
const m = b.dataset.mod;
|
|
2352
|
+
if (m === "ctrl") modCtrl = !modCtrl;
|
|
2353
|
+
else if (m === "alt") modAlt = !modAlt;
|
|
2354
|
+
else if (m === "shift") modShift = !modShift;
|
|
2305
2355
|
syncModButtons();
|
|
2306
2356
|
return;
|
|
2307
2357
|
}
|
|
2308
2358
|
let seq = null;
|
|
2309
2359
|
if (b.dataset.arrow) {
|
|
2310
2360
|
const L = ARROW[b.dataset.arrow];
|
|
2311
|
-
if (modCtrl || modAlt) {
|
|
2312
|
-
//
|
|
2313
|
-
// m = 1 + Alt(2) + Ctrl(4) (e.g. Ctrl-Left = ESC [ 1 ; 5 D
|
|
2314
|
-
// word-wise motion). Modified cursor keys are always CSI, never
|
|
2361
|
+
if (modCtrl || modAlt || modShift) {
|
|
2362
|
+
// Modifier + arrow → CSI form ESC [ 1 ; <m> <L>, where
|
|
2363
|
+
// m = 1 + Shift(1) + Alt(2) + Ctrl(4) (e.g. Ctrl-Left = ESC [ 1 ; 5 D
|
|
2364
|
+
// for word-wise motion). Modified cursor keys are always CSI, never
|
|
2315
2365
|
// SS3, so DECCKM doesn't apply when a modifier is held.
|
|
2316
|
-
seq = "\x1b[1;" + (1 + (modAlt ? 2 : 0) + (modCtrl ? 4 : 0)) + L;
|
|
2366
|
+
seq = "\x1b[1;" + (1 + (modShift ? 1 : 0) + (modAlt ? 2 : 0) + (modCtrl ? 4 : 0)) + L;
|
|
2317
2367
|
} else {
|
|
2318
2368
|
// Honour application-cursor-key mode (DECCKM): TUIs that enable it
|
|
2319
2369
|
// expect SS3 (ESC O x) arrows, not CSI (ESC [ x). xterm tracks it.
|
|
@@ -2322,13 +2372,16 @@
|
|
|
2322
2372
|
}
|
|
2323
2373
|
} else if (b.dataset.key) {
|
|
2324
2374
|
seq = SEQ[b.dataset.key];
|
|
2325
|
-
//
|
|
2326
|
-
|
|
2375
|
+
// Shift+Tab → CBT (ESC [ Z), same as the dedicated ⇧Tab key.
|
|
2376
|
+
if (b.dataset.key === "tab" && modShift) seq = "\x1b[Z";
|
|
2377
|
+
// Alt/Meta on a fixed key = ESC prefix, layered ON TOP of the above so
|
|
2378
|
+
// Alt+Shift+Tab → ESC ESC [ Z (not just ESC [ Z). Ctrl/Shift on
|
|
2379
|
+
// Esc/Enter/^C have no standard sequence, so they stay the bare key.
|
|
2327
2380
|
if (seq != null && modAlt) seq = "\x1b" + seq;
|
|
2328
2381
|
}
|
|
2329
2382
|
if (seq == null) return;
|
|
2330
2383
|
// the armed modifier (if any) has now been folded into this key — clear it
|
|
2331
|
-
modCtrl = modAlt = false;
|
|
2384
|
+
modCtrl = modAlt = modShift = false;
|
|
2332
2385
|
syncModButtons();
|
|
2333
2386
|
sendToSelected(seq);
|
|
2334
2387
|
});
|
|
@@ -2350,13 +2403,8 @@
|
|
|
2350
2403
|
let v = ta.value;
|
|
2351
2404
|
if (!v) return;
|
|
2352
2405
|
// An armed sticky Ctrl/Alt decorates a single-char line (e.g. Ctrl-D);
|
|
2353
|
-
//
|
|
2354
|
-
// it doesn't silently leak into the next terminal keystroke.
|
|
2406
|
+
// applyStickyMods also disarms for longer text, so it can't leak onward.
|
|
2355
2407
|
v = applyStickyMods(v);
|
|
2356
|
-
if (modCtrl || modAlt) {
|
|
2357
|
-
modCtrl = modAlt = false;
|
|
2358
|
-
syncModButtons();
|
|
2359
|
-
}
|
|
2360
2408
|
sendToSelected(v + "\r");
|
|
2361
2409
|
ta.value = "";
|
|
2362
2410
|
grow();
|
package/package.json
CHANGED
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
import "./ts-DGIglR4L.js";
|
|
2
|
-
import "./logger-B9h0djqx.js";
|
|
3
|
-
import "./versionChecker-gaQkM2Hy.js";
|
|
4
|
-
import "./pidStore-CGKIhaJO.js";
|
|
5
|
-
import "./globalPidIndex-C7r2m6s7.js";
|
|
6
|
-
import { t as SUPPORTED_CLIS } from "./SUPPORTED_CLIS-D_-bIOlW.js";
|
|
7
|
-
|
|
8
|
-
export { SUPPORTED_CLIS };
|