agent-yes 1.125.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-gldLvxxn.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-BB-l_J5d.js → schedule-DpU_v1GI.js} +4 -4
- package/dist/{serve-Ch_WYsPB.js → serve-TblBCSP1.js} +5 -5
- package/dist/{setup-BMo2EhUJ.js → setup-Ckac0l6u.js} +2 -2
- package/dist/{subcommands-C1vGCBlc.js → subcommands-CfIvTc92.js} +4 -4
- package/dist/{subcommands-C13_tHG5.js → subcommands-muAbavuV.js} +1 -1
- package/dist/{ts-Dlf0U2sb.js → ts-mC5Sxj8J.js} +2 -2
- package/dist/{versionChecker-DY4oPzQl.js → versionChecker-B0h02RsF.js} +2 -2
- package/lab/ui/index.html +84 -39
- package/package.json +1 -1
- package/dist/SUPPORTED_CLIS-DNtSBnm9.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,18 +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
|
|
1248
|
-
|
|
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>
|
|
1249
1287
|
<button class="kb" data-arrow="up" title="Up" aria-label="Up">↑</button>
|
|
1250
1288
|
<button class="kb" data-arrow="down" title="Down" aria-label="Down">↓</button>
|
|
1251
1289
|
<button class="kb" data-arrow="left" title="Left" aria-label="Left">←</button>
|
|
1252
1290
|
<button class="kb" data-arrow="right" title="Right" aria-label="Right">→</button>
|
|
1253
|
-
<button class="kb" data-key="enter" title="Enter">⏎</button>
|
|
1291
|
+
<button class="kb" data-key="enter" title="Enter" aria-label="Enter">⏎</button>
|
|
1254
1292
|
</div>
|
|
1255
1293
|
<!-- Line composer — the reliable path for typing a prompt on a phone:
|
|
1256
1294
|
a normal textarea (no IME/autocorrect surprises that plague xterm's
|
|
@@ -2251,7 +2289,8 @@
|
|
|
2251
2289
|
// sequences straight to the selected agent's stdin, and a sticky Ctrl/Alt
|
|
2252
2290
|
// rewrites the NEXT character typed on the soft keyboard.
|
|
2253
2291
|
let modCtrl = false,
|
|
2254
|
-
modAlt = false
|
|
2292
|
+
modAlt = false,
|
|
2293
|
+
modShift = false;
|
|
2255
2294
|
// Send raw bytes to the currently-selected agent. Uses the live `sel`, so
|
|
2256
2295
|
// it always hits the open agent even while an old terminal tears down mid
|
|
2257
2296
|
// switch — the same /api/send wire the terminal's own input uses.
|
|
@@ -2263,20 +2302,25 @@
|
|
|
2263
2302
|
.post("/api/send", { keyword: String(e.pid), msg: data, code: "none" })
|
|
2264
2303
|
.catch(() => {});
|
|
2265
2304
|
}
|
|
2266
|
-
// Apply a pending sticky Ctrl/Alt to
|
|
2267
|
-
//
|
|
2268
|
-
//
|
|
2269
|
-
//
|
|
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).
|
|
2270
2312
|
function applyStickyMods(d) {
|
|
2271
|
-
if (
|
|
2313
|
+
if (!modCtrl && !modAlt && !modShift) return d;
|
|
2272
2314
|
let c = d;
|
|
2273
|
-
if (
|
|
2274
|
-
|
|
2275
|
-
|
|
2276
|
-
|
|
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;
|
|
2277
2322
|
}
|
|
2278
|
-
|
|
2279
|
-
modCtrl = modAlt = false;
|
|
2323
|
+
modCtrl = modAlt = modShift = false; // one-shot — disarm on any input
|
|
2280
2324
|
syncModButtons();
|
|
2281
2325
|
return c;
|
|
2282
2326
|
}
|
|
@@ -2285,6 +2329,7 @@
|
|
|
2285
2329
|
if (!kb) return;
|
|
2286
2330
|
kb.querySelector('[data-mod="ctrl"]')?.classList.toggle("on", modCtrl);
|
|
2287
2331
|
kb.querySelector('[data-mod="alt"]')?.classList.toggle("on", modAlt);
|
|
2332
|
+
kb.querySelector('[data-mod="shift"]')?.classList.toggle("on", modShift);
|
|
2288
2333
|
}
|
|
2289
2334
|
(function keybarBoot() {
|
|
2290
2335
|
const kb = $("keybar");
|
|
@@ -2302,21 +2347,23 @@
|
|
|
2302
2347
|
const b = ev.target.closest("button.kb");
|
|
2303
2348
|
if (!b) return;
|
|
2304
2349
|
if (b.dataset.mod) {
|
|
2305
|
-
// sticky toggle — armed for the next soft-keyboard
|
|
2306
|
-
|
|
2307
|
-
|
|
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;
|
|
2308
2355
|
syncModButtons();
|
|
2309
2356
|
return;
|
|
2310
2357
|
}
|
|
2311
2358
|
let seq = null;
|
|
2312
2359
|
if (b.dataset.arrow) {
|
|
2313
2360
|
const L = ARROW[b.dataset.arrow];
|
|
2314
|
-
if (modCtrl || modAlt) {
|
|
2315
|
-
//
|
|
2316
|
-
// m = 1 + Alt(2) + Ctrl(4) (e.g. Ctrl-Left = ESC [ 1 ; 5 D
|
|
2317
|
-
// 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
|
|
2318
2365
|
// SS3, so DECCKM doesn't apply when a modifier is held.
|
|
2319
|
-
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;
|
|
2320
2367
|
} else {
|
|
2321
2368
|
// Honour application-cursor-key mode (DECCKM): TUIs that enable it
|
|
2322
2369
|
// expect SS3 (ESC O x) arrows, not CSI (ESC [ x). xterm tracks it.
|
|
@@ -2325,13 +2372,16 @@
|
|
|
2325
2372
|
}
|
|
2326
2373
|
} else if (b.dataset.key) {
|
|
2327
2374
|
seq = SEQ[b.dataset.key];
|
|
2328
|
-
//
|
|
2329
|
-
|
|
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.
|
|
2330
2380
|
if (seq != null && modAlt) seq = "\x1b" + seq;
|
|
2331
2381
|
}
|
|
2332
2382
|
if (seq == null) return;
|
|
2333
2383
|
// the armed modifier (if any) has now been folded into this key — clear it
|
|
2334
|
-
modCtrl = modAlt = false;
|
|
2384
|
+
modCtrl = modAlt = modShift = false;
|
|
2335
2385
|
syncModButtons();
|
|
2336
2386
|
sendToSelected(seq);
|
|
2337
2387
|
});
|
|
@@ -2353,13 +2403,8 @@
|
|
|
2353
2403
|
let v = ta.value;
|
|
2354
2404
|
if (!v) return;
|
|
2355
2405
|
// An armed sticky Ctrl/Alt decorates a single-char line (e.g. Ctrl-D);
|
|
2356
|
-
//
|
|
2357
|
-
// it doesn't silently leak into the next terminal keystroke.
|
|
2406
|
+
// applyStickyMods also disarms for longer text, so it can't leak onward.
|
|
2358
2407
|
v = applyStickyMods(v);
|
|
2359
|
-
if (modCtrl || modAlt) {
|
|
2360
|
-
modCtrl = modAlt = false;
|
|
2361
|
-
syncModButtons();
|
|
2362
|
-
}
|
|
2363
2408
|
sendToSelected(v + "\r");
|
|
2364
2409
|
ta.value = "";
|
|
2365
2410
|
grow();
|
package/package.json
CHANGED
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
import "./ts-Dlf0U2sb.js";
|
|
2
|
-
import "./logger-B9h0djqx.js";
|
|
3
|
-
import "./versionChecker-DY4oPzQl.js";
|
|
4
|
-
import "./pidStore-CGKIhaJO.js";
|
|
5
|
-
import "./globalPidIndex-C7r2m6s7.js";
|
|
6
|
-
import { t as SUPPORTED_CLIS } from "./SUPPORTED_CLIS-gldLvxxn.js";
|
|
7
|
-
|
|
8
|
-
export { SUPPORTED_CLIS };
|