@namzu/cli 45.6.0 → 45.7.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/CHANGELOG.md +6 -0
- package/dist/bin.js +1 -1
- package/dist/chunks/{bin-main-AHYAIBE5.js → bin-main-LXWGB4OG.js} +3 -3
- package/dist/chunks/{chat-T3VP3DCV.js → chat-43PBV7FK.js} +2 -2
- package/dist/chunks/{chunk-EYCASCZZ.js → chunk-CX7BSYST.js} +2 -2
- package/dist/chunks/{chunk-OVOCG3EH.js → chunk-GPA7Y4OA.js} +6 -6
- package/dist/chunks/{chunk-MS2IMZPW.js → chunk-M4JIXKZL.js} +8 -1
- package/dist/chunks/{chunk-MS2IMZPW.js.map → chunk-M4JIXKZL.js.map} +1 -1
- package/dist/chunks/{chunk-XHUT5RDY.js → chunk-NHCVWH7D.js} +2 -2
- package/dist/chunks/{chunk-JNUPACSU.js → chunk-SSYTEIX5.js} +2 -2
- package/dist/chunks/{chunk-O6QFZAP2.js → chunk-YUMBJ6IT.js} +3 -3
- package/dist/chunks/{chunk-E3GOWVGE.js → chunk-YX7WHZAR.js} +2 -2
- package/dist/chunks/{doctor-N7PH4K4N.js → doctor-DUEPRCGZ.js} +6 -6
- package/dist/chunks/{exec-LSYIE23V.js → exec-544ZWPWM.js} +2 -2
- package/dist/chunks/{live-JVMAGAIE.js → live-6CIVSKFU.js} +5 -5
- package/dist/chunks/{pal-DUQ2OASI.js → pal-NJWKENBJ.js} +2 -2
- package/dist/chunks/{start-check-LNDBVE4T.js → start-check-M4YDWO36.js} +2 -2
- package/dist/chunks/{tui-MXWQWWGT.js → tui-OYA5Z4UH.js} +86 -10
- package/dist/chunks/{tui-MXWQWWGT.js.map → tui-OYA5Z4UH.js.map} +1 -1
- package/dist/chunks/{upgrade-27Z2TXDS.js → upgrade-7W7CHF72.js} +3 -3
- package/dist/index.js +6 -6
- package/dist/tui/App.d.ts.map +1 -1
- package/dist/tui/CopyPicker.d.ts +3 -1
- package/dist/tui/CopyPicker.d.ts.map +1 -1
- package/dist/tui/copy-targets.d.ts +13 -0
- package/dist/tui/copy-targets.d.ts.map +1 -1
- package/dist/tui/slashCommands.d.ts +4 -0
- package/dist/tui/slashCommands.d.ts.map +1 -1
- package/package.json +2 -2
- /package/dist/chunks/{bin-main-AHYAIBE5.js.map → bin-main-LXWGB4OG.js.map} +0 -0
- /package/dist/chunks/{chat-T3VP3DCV.js.map → chat-43PBV7FK.js.map} +0 -0
- /package/dist/chunks/{chunk-EYCASCZZ.js.map → chunk-CX7BSYST.js.map} +0 -0
- /package/dist/chunks/{chunk-OVOCG3EH.js.map → chunk-GPA7Y4OA.js.map} +0 -0
- /package/dist/chunks/{chunk-XHUT5RDY.js.map → chunk-NHCVWH7D.js.map} +0 -0
- /package/dist/chunks/{chunk-JNUPACSU.js.map → chunk-SSYTEIX5.js.map} +0 -0
- /package/dist/chunks/{chunk-O6QFZAP2.js.map → chunk-YUMBJ6IT.js.map} +0 -0
- /package/dist/chunks/{chunk-E3GOWVGE.js.map → chunk-YX7WHZAR.js.map} +0 -0
- /package/dist/chunks/{doctor-N7PH4K4N.js.map → doctor-DUEPRCGZ.js.map} +0 -0
- /package/dist/chunks/{exec-LSYIE23V.js.map → exec-544ZWPWM.js.map} +0 -0
- /package/dist/chunks/{live-JVMAGAIE.js.map → live-6CIVSKFU.js.map} +0 -0
- /package/dist/chunks/{pal-DUQ2OASI.js.map → pal-NJWKENBJ.js.map} +0 -0
- /package/dist/chunks/{start-check-LNDBVE4T.js.map → start-check-M4YDWO36.js.map} +0 -0
- /package/dist/chunks/{upgrade-27Z2TXDS.js.map → upgrade-7W7CHF72.js.map} +0 -0
|
@@ -127,7 +127,7 @@ function createPalCommand(resumeCommand) {
|
|
|
127
127
|
if (verb === "chat") {
|
|
128
128
|
const [id, ...args] = rest;
|
|
129
129
|
if (!id) throw new Error("A Pal id is required.");
|
|
130
|
-
return (await import("./chat-
|
|
130
|
+
return (await import("./chat-43PBV7FK.js")).runPalChat(ctx, id, args, {
|
|
131
131
|
resumeCommand
|
|
132
132
|
});
|
|
133
133
|
}
|
|
@@ -202,4 +202,4 @@ export {
|
|
|
202
202
|
createPalCommand,
|
|
203
203
|
palCommand
|
|
204
204
|
};
|
|
205
|
-
//# sourceMappingURL=pal-
|
|
205
|
+
//# sourceMappingURL=pal-NJWKENBJ.js.map
|
|
@@ -3,10 +3,10 @@ const require = __namzuCreateRequire(import.meta.url);
|
|
|
3
3
|
import {
|
|
4
4
|
START_CHECK_FLAG,
|
|
5
5
|
runStartCheck
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-NHCVWH7D.js";
|
|
7
7
|
import "./chunk-76FLAFCG.js";
|
|
8
8
|
export {
|
|
9
9
|
START_CHECK_FLAG,
|
|
10
10
|
runStartCheck
|
|
11
11
|
};
|
|
12
|
-
//# sourceMappingURL=start-check-
|
|
12
|
+
//# sourceMappingURL=start-check-M4YDWO36.js.map
|
|
@@ -59,7 +59,7 @@ import {
|
|
|
59
59
|
useReducedMotion,
|
|
60
60
|
useThemeEpoch,
|
|
61
61
|
useThemeSubscription
|
|
62
|
-
} from "./chunk-
|
|
62
|
+
} from "./chunk-M4JIXKZL.js";
|
|
63
63
|
import {
|
|
64
64
|
handleTerminationSignals
|
|
65
65
|
} from "./chunk-WVNXGMNE.js";
|
|
@@ -369,14 +369,14 @@ import {
|
|
|
369
369
|
} from "./chunk-PRNBQTUI.js";
|
|
370
370
|
import {
|
|
371
371
|
startAutoUpdate
|
|
372
|
-
} from "./chunk-
|
|
372
|
+
} from "./chunk-CX7BSYST.js";
|
|
373
373
|
import {
|
|
374
374
|
readManifest
|
|
375
375
|
} from "./chunk-AK2U3N2A.js";
|
|
376
376
|
import {
|
|
377
377
|
resolveNpmInvocation
|
|
378
|
-
} from "./chunk-
|
|
379
|
-
import "./chunk-
|
|
378
|
+
} from "./chunk-SSYTEIX5.js";
|
|
379
|
+
import "./chunk-NHCVWH7D.js";
|
|
380
380
|
import {
|
|
381
381
|
ScheduleConflictError,
|
|
382
382
|
confirmationHolds,
|
|
@@ -45037,12 +45037,12 @@ __name(GlowRule, "GlowRule");
|
|
|
45037
45037
|
|
|
45038
45038
|
// src/tui/CopyPicker.tsx
|
|
45039
45039
|
var import_jsx_runtime17 = __toESM(require_jsx_runtime(), 1);
|
|
45040
|
-
function CopyPicker({ targets, selected }) {
|
|
45040
|
+
function CopyPicker({ targets, selected, mode = "copy" }) {
|
|
45041
45041
|
const { start, items: visible } = selectionWindow(targets, selected);
|
|
45042
45042
|
const terminal = use_window_size_default();
|
|
45043
45043
|
return /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)(Box_default, { flexDirection: "column", borderStyle: "round", borderColor: theme.border.focus, paddingX: 1, children: [
|
|
45044
45044
|
/* @__PURE__ */ (0, import_jsx_runtime17.jsxs)(Box_default, { justifyContent: "space-between", children: [
|
|
45045
|
-
/* @__PURE__ */ (0, import_jsx_runtime17.jsx)(Text, { color: theme.accent.user, bold: true, children: "Copy from response" }),
|
|
45045
|
+
/* @__PURE__ */ (0, import_jsx_runtime17.jsx)(Text, { color: theme.accent.user, bold: true, children: mode === "run" ? "Run from response" : "Copy from response" }),
|
|
45046
45046
|
/* @__PURE__ */ (0, import_jsx_runtime17.jsxs)(Text, { color: theme.text.muted, children: [
|
|
45047
45047
|
selected + 1,
|
|
45048
45048
|
"/",
|
|
@@ -45074,7 +45074,11 @@ function CopyPicker({ targets, selected }) {
|
|
|
45074
45074
|
{ text: "PgUp/PgDn jump", rank: 1 },
|
|
45075
45075
|
{ text: "Home/End", rank: 1 },
|
|
45076
45076
|
{ text: "1\u20139 select", rank: 2 },
|
|
45077
|
-
{
|
|
45077
|
+
{
|
|
45078
|
+
text: mode === "run" ? "enter put in prompt" : "enter copy",
|
|
45079
|
+
short: "enter",
|
|
45080
|
+
rank: 5
|
|
45081
|
+
},
|
|
45078
45082
|
{ text: "esc cancel", short: "esc", rank: 5 }
|
|
45079
45083
|
],
|
|
45080
45084
|
boxedHintWidth(terminal.columns)
|
|
@@ -50362,6 +50366,31 @@ function quoteHasProse(lines2) {
|
|
|
50362
50366
|
return false;
|
|
50363
50367
|
}
|
|
50364
50368
|
__name(quoteHasProse, "quoteHasProse");
|
|
50369
|
+
var SHELL_LANGUAGES = /* @__PURE__ */ new Set([
|
|
50370
|
+
"sh",
|
|
50371
|
+
"bash",
|
|
50372
|
+
"shell",
|
|
50373
|
+
"zsh",
|
|
50374
|
+
"console",
|
|
50375
|
+
"shellsession",
|
|
50376
|
+
"terminal"
|
|
50377
|
+
]);
|
|
50378
|
+
function runnableCommands(source) {
|
|
50379
|
+
const out = [];
|
|
50380
|
+
for (const target of copyTargetsForResponse(source)) {
|
|
50381
|
+
if (target.kind !== "code") continue;
|
|
50382
|
+
const language = target.label.endsWith(" code") ? target.label.slice(0, -5).toLowerCase() : void 0;
|
|
50383
|
+
if (language !== void 0 && !SHELL_LANGUAGES.has(language)) continue;
|
|
50384
|
+
const lines2 = target.text.replace(/\r\n/gu, "\n").replace(/\n+$/u, "").split("\n");
|
|
50385
|
+
const content = lines2.filter((line) => line.trim() !== "");
|
|
50386
|
+
if (content.length === 0 || content.every((line) => line.trim().startsWith("#"))) continue;
|
|
50387
|
+
const prompted = content.every((line) => /^\$ /u.test(line));
|
|
50388
|
+
const text = (prompted ? lines2.map((line) => line.replace(/^\$ /u, "")) : lines2).join("\n");
|
|
50389
|
+
out.push({ label: target.label, text });
|
|
50390
|
+
}
|
|
50391
|
+
return out;
|
|
50392
|
+
}
|
|
50393
|
+
__name(runnableCommands, "runnableCommands");
|
|
50365
50394
|
|
|
50366
50395
|
// src/tui/edit-prompts.ts
|
|
50367
50396
|
function editablePrompts(history, transcript) {
|
|
@@ -59240,6 +59269,16 @@ ${blocks.join("\n\n")}`;
|
|
|
59240
59269
|
const picker = copyPickerRef.current;
|
|
59241
59270
|
const target = picker?.targets[index];
|
|
59242
59271
|
if (!picker || !target) return;
|
|
59272
|
+
if (picker.mode === "run") {
|
|
59273
|
+
setCopyPicker(null);
|
|
59274
|
+
composerDraftTokenRef.current += 1;
|
|
59275
|
+
setComposerDraft({ token: composerDraftTokenRef.current, text: `!${target.text}` });
|
|
59276
|
+
pushMessage(
|
|
59277
|
+
"system",
|
|
59278
|
+
"The command is in the prompt: press Enter to run it, or edit it first."
|
|
59279
|
+
);
|
|
59280
|
+
return;
|
|
59281
|
+
}
|
|
59243
59282
|
setCopyPicker(null);
|
|
59244
59283
|
const origin = picker.provenance === "persisted" ? "the latest saved reply" : "the latest normally completed answer";
|
|
59245
59284
|
const selection = target.kind === "whole" ? origin : `${target.label} from ${origin}`;
|
|
@@ -60601,7 +60640,7 @@ ${blocks.join("\n\n")}`;
|
|
|
60601
60640
|
doctorRunningRef.current = true;
|
|
60602
60641
|
const progressId = pushMessage("system", "Checking\u2026");
|
|
60603
60642
|
try {
|
|
60604
|
-
const { runLiveDoctor } = await import("./live-
|
|
60643
|
+
const { runLiveDoctor } = await import("./live-6CIVSKFU.js");
|
|
60605
60644
|
const { describePlainDoctor } = await import("./plain-report-XVPBQDLE.js");
|
|
60606
60645
|
const report = await runLiveDoctor({
|
|
60607
60646
|
...ctxRef.current.telemetry ? { telemetry: ctxRef.current.telemetry } : {}
|
|
@@ -65437,6 +65476,36 @@ ${plugins.map((plugin) => {
|
|
|
65437
65476
|
});
|
|
65438
65477
|
return;
|
|
65439
65478
|
}
|
|
65479
|
+
case "run": {
|
|
65480
|
+
const target = lastCompletedOutputRef.current;
|
|
65481
|
+
const commands = target ? runnableCommands(target.text) : [];
|
|
65482
|
+
if (!target || commands.length === 0) {
|
|
65483
|
+
pushMessage(
|
|
65484
|
+
"system",
|
|
65485
|
+
"No command to run in the latest answer \u2014 /run looks for shell code blocks in the latest answer that finished normally."
|
|
65486
|
+
);
|
|
65487
|
+
return;
|
|
65488
|
+
}
|
|
65489
|
+
if (commands.length === 1) {
|
|
65490
|
+
composerDraftTokenRef.current += 1;
|
|
65491
|
+
setComposerDraft({
|
|
65492
|
+
token: composerDraftTokenRef.current,
|
|
65493
|
+
text: `!${commands[0]?.text ?? ""}`
|
|
65494
|
+
});
|
|
65495
|
+
pushMessage(
|
|
65496
|
+
"system",
|
|
65497
|
+
"The command is in the prompt: press Enter to run it, or edit it first."
|
|
65498
|
+
);
|
|
65499
|
+
return;
|
|
65500
|
+
}
|
|
65501
|
+
setSelectedCopy(0);
|
|
65502
|
+
setCopyPicker({
|
|
65503
|
+
targets: commands.map((c) => ({ kind: "code", label: c.label, text: c.text })),
|
|
65504
|
+
provenance: target.provenance,
|
|
65505
|
+
mode: "run"
|
|
65506
|
+
});
|
|
65507
|
+
return;
|
|
65508
|
+
}
|
|
65440
65509
|
case "raw": {
|
|
65441
65510
|
const enabled = slash.enabled === "toggle" ? !rawOutput : slash.enabled;
|
|
65442
65511
|
setRawOutput(enabled);
|
|
@@ -67588,7 +67657,14 @@ ${plugins.map((plugin) => {
|
|
|
67588
67657
|
extra: /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(ThemeSample, { width: Math.max(10, (terminal.columns ?? 80) - 6) })
|
|
67589
67658
|
} : {}
|
|
67590
67659
|
}
|
|
67591
|
-
) : permission === null && scheduleReviewPrompt === null && !childSurfaceOpen && copyPicker ? /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(
|
|
67660
|
+
) : permission === null && scheduleReviewPrompt === null && !childSurfaceOpen && copyPicker ? /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(
|
|
67661
|
+
CopyPicker,
|
|
67662
|
+
{
|
|
67663
|
+
targets: copyPicker.targets,
|
|
67664
|
+
selected: selectedCopy,
|
|
67665
|
+
...copyPicker.mode ? { mode: copyPicker.mode } : {}
|
|
67666
|
+
}
|
|
67667
|
+
) : null,
|
|
67592
67668
|
scrollOpen && permission === null && scheduleReviewPrompt === null ? /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(
|
|
67593
67669
|
TranscriptScrollView,
|
|
67594
67670
|
{
|
|
@@ -68829,4 +68905,4 @@ react/cjs/react-jsx-runtime.development.js:
|
|
|
68829
68905
|
* LICENSE file in the root directory of this source tree.
|
|
68830
68906
|
*)
|
|
68831
68907
|
*/
|
|
68832
|
-
//# sourceMappingURL=tui-
|
|
68908
|
+
//# sourceMappingURL=tui-OYA5Z4UH.js.map
|