gearbox-code 0.2.2 → 0.2.3
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/cli.mjs +25 -5
- package/package.json +1 -1
package/dist/cli.mjs
CHANGED
|
@@ -146967,6 +146967,7 @@ function App2({ selector: initialSelector, runner, fullscreen = false, resumeId
|
|
|
146967
146967
|
const notifyRef = import_react26.useRef(loadPrefs().notify !== false);
|
|
146968
146968
|
const firstRunRef = import_react26.useRef(!loadPrefs().onboarded);
|
|
146969
146969
|
const pasteStoreRef = import_react26.useRef(new Map);
|
|
146970
|
+
const pasteBufRef = import_react26.useRef(null);
|
|
146970
146971
|
const pasteIdRef = import_react26.useRef(0);
|
|
146971
146972
|
const copiedSelectionRef = import_react26.useRef("");
|
|
146972
146973
|
const mouseAnchorRef = import_react26.useRef(null);
|
|
@@ -148114,7 +148115,7 @@ ${map4}
|
|
|
148114
148115
|
process.stdout.write("\x1B[?1049h\x1B[2J\x1B[H");
|
|
148115
148116
|
if (process.env.GEARBOX_MOUSE !== "0")
|
|
148116
148117
|
process.stdout.write("\x1B[?1000h\x1B[?1002h\x1B[?1006h");
|
|
148117
|
-
process.stdout.write("\x1B[?
|
|
148118
|
+
process.stdout.write("\x1B[?2004h\x1B[?25l");
|
|
148118
148119
|
setRawMode?.(true);
|
|
148119
148120
|
}
|
|
148120
148121
|
};
|
|
@@ -149424,6 +149425,25 @@ Example: /mcp add github npx -y @modelcontextprotocol/server-github`);
|
|
|
149424
149425
|
use_input_default((input, key) => {
|
|
149425
149426
|
if (/\[<\d+;\d+;\d+[Mm]/.test(input))
|
|
149426
149427
|
return;
|
|
149428
|
+
if (pasteBufRef.current !== null || input.includes("\x1B[200~")) {
|
|
149429
|
+
pasteBufRef.current = (pasteBufRef.current ?? "") + input;
|
|
149430
|
+
if (!pasteBufRef.current.includes("\x1B[201~"))
|
|
149431
|
+
return;
|
|
149432
|
+
const clean = sanitizeInputText(pasteBufRef.current.replace(/\x1b\[20[01]~/g, ""));
|
|
149433
|
+
pasteBufRef.current = null;
|
|
149434
|
+
const e2 = editRef.current;
|
|
149435
|
+
const lines2 = clean.split(`
|
|
149436
|
+
`).length;
|
|
149437
|
+
if (clean.length > 400 || lines2 > 4) {
|
|
149438
|
+
const id = ++pasteIdRef.current;
|
|
149439
|
+
const ph = `[Pasted #${id}: ${lines2} line${lines2 === 1 ? "" : "s"} · ${clean.length.toLocaleString()} chars]`;
|
|
149440
|
+
pasteStoreRef.current.set(ph, clean);
|
|
149441
|
+
setEdit({ value: e2.value.slice(0, e2.cursor) + ph + e2.value.slice(e2.cursor), cursor: e2.cursor + ph.length });
|
|
149442
|
+
} else {
|
|
149443
|
+
setEdit({ value: e2.value.slice(0, e2.cursor) + clean + e2.value.slice(e2.cursor), cursor: e2.cursor + clean.length });
|
|
149444
|
+
}
|
|
149445
|
+
return;
|
|
149446
|
+
}
|
|
149427
149447
|
if (permRef.current) {
|
|
149428
149448
|
if (input === "1")
|
|
149429
149449
|
resolvePerm("once");
|
|
@@ -149669,14 +149689,14 @@ Example: /mcp add github npx -y @modelcontextprotocol/server-github`);
|
|
|
149669
149689
|
return;
|
|
149670
149690
|
}
|
|
149671
149691
|
}
|
|
149672
|
-
if (!busyRef.current &&
|
|
149673
|
-
`))
|
|
149692
|
+
if (!busyRef.current && input.length > 240 && input.includes(`
|
|
149693
|
+
`)) {
|
|
149674
149694
|
const clean = sanitizeInputText(input);
|
|
149675
149695
|
const lines2 = clean.split(`
|
|
149676
149696
|
`).length;
|
|
149677
149697
|
if (lines2 > 4 || clean.length > 400) {
|
|
149678
149698
|
const id = ++pasteIdRef.current;
|
|
149679
|
-
const ph = `[Pasted #${id}: ${lines2} line${lines2
|
|
149699
|
+
const ph = `[Pasted #${id}: ${lines2} line${lines2 === 1 ? "" : "s"} · ${clean.length.toLocaleString()} chars]`;
|
|
149680
149700
|
pasteStoreRef.current.set(ph, clean);
|
|
149681
149701
|
const e2 = editRef.current;
|
|
149682
149702
|
setEdit({ value: e2.value.slice(0, e2.cursor) + ph + e2.value.slice(e2.cursor), cursor: e2.cursor + ph.length });
|
|
@@ -150628,7 +150648,7 @@ process.once("SIGTERM", () => {
|
|
|
150628
150648
|
process.exit(0);
|
|
150629
150649
|
});
|
|
150630
150650
|
if (process.stdout.isTTY)
|
|
150631
|
-
process.stdout.write("\x1B[?
|
|
150651
|
+
process.stdout.write("\x1B[?2004h\x1B[?25l");
|
|
150632
150652
|
if (fullscreen)
|
|
150633
150653
|
process.stdout.write("\x1B[?1049h\x1B[2J\x1B[H");
|
|
150634
150654
|
if (mouse)
|
package/package.json
CHANGED