@kryvenaiofficial/kryven 0.2.4 → 0.2.5
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 +771 -660
- package/package.json +1 -1
- package/scripts/postinstall.cjs +1 -1
package/dist/cli.mjs
CHANGED
|
@@ -5310,7 +5310,7 @@ var require_cross_spawn = __commonJS({
|
|
|
5310
5310
|
var cp2 = __require("child_process");
|
|
5311
5311
|
var parse = require_parse();
|
|
5312
5312
|
var enoent = require_enoent();
|
|
5313
|
-
function
|
|
5313
|
+
function spawn10(command, args, options) {
|
|
5314
5314
|
const parsed = parse(command, args, options);
|
|
5315
5315
|
const spawned = cp2.spawn(parsed.command, parsed.args, parsed.options);
|
|
5316
5316
|
enoent.hookChildProcess(spawned, parsed);
|
|
@@ -5322,8 +5322,8 @@ var require_cross_spawn = __commonJS({
|
|
|
5322
5322
|
result.error = result.error || enoent.verifyENOENTSync(result.status, parsed);
|
|
5323
5323
|
return result;
|
|
5324
5324
|
}
|
|
5325
|
-
module.exports =
|
|
5326
|
-
module.exports.spawn =
|
|
5325
|
+
module.exports = spawn10;
|
|
5326
|
+
module.exports.spawn = spawn10;
|
|
5327
5327
|
module.exports.sync = spawnSync3;
|
|
5328
5328
|
module.exports._parse = parse;
|
|
5329
5329
|
module.exports._enoent = enoent;
|
|
@@ -32502,7 +32502,7 @@ async function modelsCommand() {
|
|
|
32502
32502
|
}
|
|
32503
32503
|
|
|
32504
32504
|
// src/commands/chat.ts
|
|
32505
|
-
var
|
|
32505
|
+
var import_react30 = __toESM(require_react(), 1);
|
|
32506
32506
|
|
|
32507
32507
|
// node_modules/ink/build/render.js
|
|
32508
32508
|
import { Stream } from "node:stream";
|
|
@@ -37657,7 +37657,7 @@ var import_react20 = __toESM(require_react(), 1);
|
|
|
37657
37657
|
var import_react21 = __toESM(require_react(), 1);
|
|
37658
37658
|
|
|
37659
37659
|
// src/tui/REPL.tsx
|
|
37660
|
-
var
|
|
37660
|
+
var import_react28 = __toESM(require_react(), 1);
|
|
37661
37661
|
|
|
37662
37662
|
// src/tui/Markdown.tsx
|
|
37663
37663
|
var import_jsx_runtime = __toESM(require_jsx_runtime(), 1);
|
|
@@ -37810,6 +37810,9 @@ var MarkdownStream = ({
|
|
|
37810
37810
|
] });
|
|
37811
37811
|
};
|
|
37812
37812
|
|
|
37813
|
+
// src/tui/PromptInput.tsx
|
|
37814
|
+
var import_react24 = __toESM(require_react(), 1);
|
|
37815
|
+
|
|
37813
37816
|
// node_modules/ink-text-input/build/index.js
|
|
37814
37817
|
var import_react23 = __toESM(require_react(), 1);
|
|
37815
37818
|
function TextInput({ value: originalValue, placeholder = "", focus = true, mask, highlightPastedText = false, showCursor = true, onChange, onSubmit }) {
|
|
@@ -37902,6 +37905,13 @@ var build_default = TextInput;
|
|
|
37902
37905
|
|
|
37903
37906
|
// src/tui/PromptInput.tsx
|
|
37904
37907
|
var import_jsx_runtime4 = __toESM(require_jsx_runtime(), 1);
|
|
37908
|
+
var EXAMPLES = [
|
|
37909
|
+
"Fix the failing test",
|
|
37910
|
+
"Add a dark mode toggle",
|
|
37911
|
+
"Explain this stack trace",
|
|
37912
|
+
"Refactor this function",
|
|
37913
|
+
"Find the rate limiter"
|
|
37914
|
+
];
|
|
37905
37915
|
var PromptInput = ({
|
|
37906
37916
|
value,
|
|
37907
37917
|
onChange,
|
|
@@ -37910,26 +37920,41 @@ var PromptInput = ({
|
|
|
37910
37920
|
placeholder,
|
|
37911
37921
|
vimMode,
|
|
37912
37922
|
vimCmdline,
|
|
37913
|
-
accentColor
|
|
37923
|
+
accentColor,
|
|
37924
|
+
model,
|
|
37925
|
+
mood,
|
|
37926
|
+
themeColors
|
|
37914
37927
|
}) => {
|
|
37928
|
+
const fg = themeColors?.fg ?? "#F5EFE6";
|
|
37929
|
+
const muted = themeColors?.muted ?? "#736560";
|
|
37930
|
+
const info = themeColors?.info ?? "#7EA8C4";
|
|
37931
|
+
const accent = accentColor ?? "#8B5CF6";
|
|
37915
37932
|
const isStatic = disabled || vimMode === "NORMAL";
|
|
37916
|
-
const
|
|
37917
|
-
const
|
|
37918
|
-
|
|
37919
|
-
|
|
37920
|
-
|
|
37921
|
-
|
|
37922
|
-
|
|
37923
|
-
|
|
37924
|
-
|
|
37925
|
-
|
|
37926
|
-
|
|
37927
|
-
|
|
37928
|
-
|
|
37929
|
-
|
|
37930
|
-
|
|
37931
|
-
|
|
37932
|
-
|
|
37933
|
+
const barColor = disabled ? muted : vimMode === "NORMAL" ? "#F59E0B" : accent;
|
|
37934
|
+
const example = (0, import_react24.useMemo)(() => EXAMPLES[Math.floor(Math.random() * EXAMPLES.length)], []);
|
|
37935
|
+
const ph = placeholder ?? `Ask anything... "${example}"`;
|
|
37936
|
+
return /* @__PURE__ */ (0, import_jsx_runtime4.jsxs)(
|
|
37937
|
+
Box_default,
|
|
37938
|
+
{
|
|
37939
|
+
flexDirection: "column",
|
|
37940
|
+
width: "100%",
|
|
37941
|
+
paddingLeft: 1,
|
|
37942
|
+
borderStyle: "single",
|
|
37943
|
+
borderTop: false,
|
|
37944
|
+
borderRight: false,
|
|
37945
|
+
borderBottom: false,
|
|
37946
|
+
borderLeftColor: barColor,
|
|
37947
|
+
children: [
|
|
37948
|
+
/* @__PURE__ */ (0, import_jsx_runtime4.jsx)(Box_default, { children: isStatic ? /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(Text, { color: value ? fg : muted, children: vimCmdline != null ? `:${vimCmdline}` : value || ph }) : /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(build_default, { value, onChange, onSubmit, placeholder: ph }) }),
|
|
37949
|
+
(mood || model) && /* @__PURE__ */ (0, import_jsx_runtime4.jsxs)(Box_default, { marginTop: 1, flexDirection: "row", children: [
|
|
37950
|
+
mood ? /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(Text, { color: info, children: mood }) : null,
|
|
37951
|
+
mood && model ? /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(Text, { color: muted, children: " \xB7 " }) : null,
|
|
37952
|
+
model ? /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(Text, { color: fg, children: model }) : null,
|
|
37953
|
+
vimMode ? /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(Text, { color: muted, children: ` ${vimMode === "NORMAL" ? "N" : "I"}` }) : null
|
|
37954
|
+
] })
|
|
37955
|
+
]
|
|
37956
|
+
}
|
|
37957
|
+
);
|
|
37933
37958
|
};
|
|
37934
37959
|
|
|
37935
37960
|
// src/tui/StatusBar.tsx
|
|
@@ -37989,12 +38014,12 @@ function fmt(n2) {
|
|
|
37989
38014
|
}
|
|
37990
38015
|
|
|
37991
38016
|
// node_modules/ink-spinner/build/index.js
|
|
37992
|
-
var
|
|
38017
|
+
var import_react25 = __toESM(require_react(), 1);
|
|
37993
38018
|
var import_cli_spinners = __toESM(require_cli_spinners(), 1);
|
|
37994
38019
|
function Spinner({ type = "dots" }) {
|
|
37995
|
-
const [frame, setFrame] = (0,
|
|
38020
|
+
const [frame, setFrame] = (0, import_react25.useState)(0);
|
|
37996
38021
|
const spinner = import_cli_spinners.default[type];
|
|
37997
|
-
(0,
|
|
38022
|
+
(0, import_react25.useEffect)(() => {
|
|
37998
38023
|
const timer = setInterval(() => {
|
|
37999
38024
|
setFrame((previousFrame) => {
|
|
38000
38025
|
const isLastFrame = previousFrame === spinner.frames.length - 1;
|
|
@@ -38005,7 +38030,7 @@ function Spinner({ type = "dots" }) {
|
|
|
38005
38030
|
clearInterval(timer);
|
|
38006
38031
|
};
|
|
38007
38032
|
}, [spinner]);
|
|
38008
|
-
return
|
|
38033
|
+
return import_react25.default.createElement(Text, null, spinner.frames[frame]);
|
|
38009
38034
|
}
|
|
38010
38035
|
var build_default2 = Spinner;
|
|
38011
38036
|
|
|
@@ -38017,7 +38042,7 @@ var Spinner2 = ({ label }) => /* @__PURE__ */ (0, import_jsx_runtime6.jsxs)(Text
|
|
|
38017
38042
|
] });
|
|
38018
38043
|
|
|
38019
38044
|
// src/tui/ToolCall.tsx
|
|
38020
|
-
var
|
|
38045
|
+
var import_react26 = __toESM(require_react(), 1);
|
|
38021
38046
|
var import_jsx_runtime7 = __toESM(require_jsx_runtime(), 1);
|
|
38022
38047
|
var STATUS_ICON = {
|
|
38023
38048
|
running: "\u25D0",
|
|
@@ -38111,9 +38136,9 @@ var ToolCall = ({
|
|
|
38111
38136
|
collapsed = false,
|
|
38112
38137
|
paused = false
|
|
38113
38138
|
}) => {
|
|
38114
|
-
const startRef = (0,
|
|
38115
|
-
const [elapsed, setElapsed] = (0,
|
|
38116
|
-
(0,
|
|
38139
|
+
const startRef = (0, import_react26.useRef)(Date.now());
|
|
38140
|
+
const [elapsed, setElapsed] = (0, import_react26.useState)(0);
|
|
38141
|
+
(0, import_react26.useEffect)(() => {
|
|
38117
38142
|
if (status !== "running" || paused) {
|
|
38118
38143
|
setElapsed(Date.now() - startRef.current);
|
|
38119
38144
|
return;
|
|
@@ -38269,6 +38294,34 @@ var ModelPicker = ({ models, selected, current }) => {
|
|
|
38269
38294
|
] });
|
|
38270
38295
|
};
|
|
38271
38296
|
|
|
38297
|
+
// src/tui/Wordmark.tsx
|
|
38298
|
+
var import_jsx_runtime10 = __toESM(require_jsx_runtime(), 1);
|
|
38299
|
+
var ROWS = [
|
|
38300
|
+
"## ## ##### ## ## ## ## ##### ## ##",
|
|
38301
|
+
"## ## ## ## #### ## ## ## ### ##",
|
|
38302
|
+
"#### ##### ## ## ## ##### #### ##",
|
|
38303
|
+
"## ## ## ## ## ## ## ## ## ####",
|
|
38304
|
+
"## ## ## ## ## ### ##### ## ###"
|
|
38305
|
+
];
|
|
38306
|
+
var Wordmark = ({ muted, fg }) => {
|
|
38307
|
+
const rows = ROWS.map((r) => r.replace(/#/g, "\u2588"));
|
|
38308
|
+
const width = Math.max(...rows.map((r) => r.length));
|
|
38309
|
+
const mid = Math.floor(width / 2);
|
|
38310
|
+
let split = mid;
|
|
38311
|
+
outer: for (let d = 0; d <= mid; d++) {
|
|
38312
|
+
for (const c3 of [mid - d, mid + d]) {
|
|
38313
|
+
if (c3 >= 0 && c3 <= width && rows.every((r) => (r[c3] ?? " ") === " ")) {
|
|
38314
|
+
split = c3;
|
|
38315
|
+
break outer;
|
|
38316
|
+
}
|
|
38317
|
+
}
|
|
38318
|
+
}
|
|
38319
|
+
return /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(Box_default, { flexDirection: "column", children: rows.map((line, i2) => /* @__PURE__ */ (0, import_jsx_runtime10.jsxs)(Box_default, { flexDirection: "row", children: [
|
|
38320
|
+
/* @__PURE__ */ (0, import_jsx_runtime10.jsx)(Text, { color: muted, children: line.slice(0, split) }),
|
|
38321
|
+
/* @__PURE__ */ (0, import_jsx_runtime10.jsx)(Text, { bold: true, color: fg, children: line.slice(split) })
|
|
38322
|
+
] }, i2)) });
|
|
38323
|
+
};
|
|
38324
|
+
|
|
38272
38325
|
// src/commands-palette/parser.ts
|
|
38273
38326
|
function parseSlash(input) {
|
|
38274
38327
|
const t = input.trimStart();
|
|
@@ -38397,39 +38450,39 @@ import { opendirSync } from "node:fs";
|
|
|
38397
38450
|
import { join as join26, dirname as dirname12, basename as basename5 } from "node:path";
|
|
38398
38451
|
|
|
38399
38452
|
// src/commands-palette/builtin/help.tsx
|
|
38400
|
-
var
|
|
38453
|
+
var import_jsx_runtime11 = __toESM(require_jsx_runtime(), 1);
|
|
38401
38454
|
var helpCommand = {
|
|
38402
38455
|
name: "help",
|
|
38403
38456
|
description: "Show available slash commands",
|
|
38404
38457
|
run: () => ({
|
|
38405
38458
|
type: "render",
|
|
38406
|
-
element: /* @__PURE__ */ (0,
|
|
38459
|
+
element: /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(HelpPanel, {})
|
|
38407
38460
|
})
|
|
38408
38461
|
};
|
|
38409
38462
|
var HelpPanel = () => {
|
|
38410
38463
|
const commands = [...listCommands()].sort(
|
|
38411
38464
|
(a2, b) => a2.name.localeCompare(b.name)
|
|
38412
38465
|
);
|
|
38413
|
-
return /* @__PURE__ */ (0,
|
|
38414
|
-
/* @__PURE__ */ (0,
|
|
38466
|
+
return /* @__PURE__ */ (0, import_jsx_runtime11.jsxs)(Box_default, { flexDirection: "column", borderStyle: "round", borderColor: "cyan", paddingX: 1, children: [
|
|
38467
|
+
/* @__PURE__ */ (0, import_jsx_runtime11.jsxs)(Text, { bold: true, color: "cyan", children: [
|
|
38415
38468
|
"Kryven CLI commands (",
|
|
38416
38469
|
commands.length,
|
|
38417
38470
|
")"
|
|
38418
38471
|
] }),
|
|
38419
|
-
commands.map((c3) => /* @__PURE__ */ (0,
|
|
38420
|
-
/* @__PURE__ */ (0,
|
|
38472
|
+
commands.map((c3) => /* @__PURE__ */ (0, import_jsx_runtime11.jsxs)(Box_default, { children: [
|
|
38473
|
+
/* @__PURE__ */ (0, import_jsx_runtime11.jsx)(Box_default, { width: 16, children: /* @__PURE__ */ (0, import_jsx_runtime11.jsxs)(Text, { color: "cyan", children: [
|
|
38421
38474
|
"/",
|
|
38422
38475
|
c3.name
|
|
38423
38476
|
] }) }),
|
|
38424
|
-
/* @__PURE__ */ (0,
|
|
38425
|
-
c3.argHint ? /* @__PURE__ */ (0,
|
|
38477
|
+
/* @__PURE__ */ (0, import_jsx_runtime11.jsxs)(Text, { children: [
|
|
38478
|
+
c3.argHint ? /* @__PURE__ */ (0, import_jsx_runtime11.jsxs)(Text, { color: "gray", children: [
|
|
38426
38479
|
c3.argHint,
|
|
38427
38480
|
" "
|
|
38428
38481
|
] }) : null,
|
|
38429
38482
|
c3.description
|
|
38430
38483
|
] })
|
|
38431
38484
|
] }, c3.name)),
|
|
38432
|
-
/* @__PURE__ */ (0,
|
|
38485
|
+
/* @__PURE__ */ (0, import_jsx_runtime11.jsx)(Box_default, { marginTop: 1, children: /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(Text, { color: "gray", children: "Ctrl+C to cancel an in-flight response \xB7 Ctrl+D to exit" }) })
|
|
38433
38486
|
] });
|
|
38434
38487
|
};
|
|
38435
38488
|
|
|
@@ -38481,7 +38534,7 @@ var loginCommand2 = {
|
|
|
38481
38534
|
};
|
|
38482
38535
|
|
|
38483
38536
|
// src/commands-palette/builtin/cost.tsx
|
|
38484
|
-
var
|
|
38537
|
+
var import_jsx_runtime12 = __toESM(require_jsx_runtime(), 1);
|
|
38485
38538
|
var RATES = {
|
|
38486
38539
|
flash: { in: 0.5, out: 4 },
|
|
38487
38540
|
extended: { in: 0.65, out: 7 },
|
|
@@ -38513,7 +38566,7 @@ var costCommand = {
|
|
|
38513
38566
|
description: "Show token usage this session",
|
|
38514
38567
|
run: (_args, ctx) => ({
|
|
38515
38568
|
type: "render",
|
|
38516
|
-
element: /* @__PURE__ */ (0,
|
|
38569
|
+
element: /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(CostPanel, { ctx })
|
|
38517
38570
|
})
|
|
38518
38571
|
};
|
|
38519
38572
|
var CostPanel = ({ ctx }) => {
|
|
@@ -38530,38 +38583,38 @@ var CostPanel = ({ ctx }) => {
|
|
|
38530
38583
|
const rate = rateFor(ctx.model);
|
|
38531
38584
|
const tierLabel = tierFor(ctx.model);
|
|
38532
38585
|
const usd = sessionCostUsd(ctx.conversation.all(), ctx.model);
|
|
38533
|
-
return /* @__PURE__ */ (0,
|
|
38534
|
-
/* @__PURE__ */ (0,
|
|
38535
|
-
/* @__PURE__ */ (0,
|
|
38586
|
+
return /* @__PURE__ */ (0, import_jsx_runtime12.jsxs)(Box_default, { flexDirection: "column", borderStyle: "round", borderColor: "magenta", paddingX: 1, children: [
|
|
38587
|
+
/* @__PURE__ */ (0, import_jsx_runtime12.jsx)(Text, { bold: true, color: "magenta", children: "Session cost" }),
|
|
38588
|
+
/* @__PURE__ */ (0, import_jsx_runtime12.jsxs)(Text, { children: [
|
|
38536
38589
|
"Model: ",
|
|
38537
|
-
/* @__PURE__ */ (0,
|
|
38590
|
+
/* @__PURE__ */ (0, import_jsx_runtime12.jsx)(Text, { color: "cyan", children: ctx.model }),
|
|
38538
38591
|
" (tier ",
|
|
38539
38592
|
tierLabel,
|
|
38540
38593
|
")"
|
|
38541
38594
|
] }),
|
|
38542
|
-
/* @__PURE__ */ (0,
|
|
38595
|
+
/* @__PURE__ */ (0, import_jsx_runtime12.jsxs)(Text, { children: [
|
|
38543
38596
|
"Messages: ",
|
|
38544
38597
|
ctx.conversation.size()
|
|
38545
38598
|
] }),
|
|
38546
|
-
/* @__PURE__ */ (0,
|
|
38599
|
+
/* @__PURE__ */ (0, import_jsx_runtime12.jsxs)(Text, { children: [
|
|
38547
38600
|
"Prompt tokens: ",
|
|
38548
38601
|
promptTok.toLocaleString(),
|
|
38549
38602
|
" \xB7 Completion tokens:",
|
|
38550
38603
|
" ",
|
|
38551
38604
|
completionTok.toLocaleString()
|
|
38552
38605
|
] }),
|
|
38553
|
-
/* @__PURE__ */ (0,
|
|
38606
|
+
/* @__PURE__ */ (0, import_jsx_runtime12.jsxs)(Text, { children: [
|
|
38554
38607
|
"Kryven tokens charged: ",
|
|
38555
38608
|
kryvenTok.toLocaleString()
|
|
38556
38609
|
] }),
|
|
38557
|
-
/* @__PURE__ */ (0,
|
|
38610
|
+
/* @__PURE__ */ (0, import_jsx_runtime12.jsxs)(Text, { children: [
|
|
38558
38611
|
"Approx USD: ",
|
|
38559
|
-
/* @__PURE__ */ (0,
|
|
38612
|
+
/* @__PURE__ */ (0, import_jsx_runtime12.jsxs)(Text, { color: "green", children: [
|
|
38560
38613
|
"$",
|
|
38561
38614
|
usd.toFixed(4)
|
|
38562
38615
|
] })
|
|
38563
38616
|
] }),
|
|
38564
|
-
/* @__PURE__ */ (0,
|
|
38617
|
+
/* @__PURE__ */ (0, import_jsx_runtime12.jsxs)(Text, { color: "gray", children: [
|
|
38565
38618
|
"(Rates: $",
|
|
38566
38619
|
rate.in,
|
|
38567
38620
|
"/M in, $",
|
|
@@ -38591,7 +38644,7 @@ function setSkills(skills) {
|
|
|
38591
38644
|
}
|
|
38592
38645
|
|
|
38593
38646
|
// src/commands-palette/builtin/skill.tsx
|
|
38594
|
-
var
|
|
38647
|
+
var import_jsx_runtime13 = __toESM(require_jsx_runtime(), 1);
|
|
38595
38648
|
var skillCommand = {
|
|
38596
38649
|
name: "skill",
|
|
38597
38650
|
description: "Run an installed skill (or list all)",
|
|
@@ -38605,17 +38658,17 @@ var skillCommand = {
|
|
|
38605
38658
|
}
|
|
38606
38659
|
return {
|
|
38607
38660
|
type: "render",
|
|
38608
|
-
element: /* @__PURE__ */ (0,
|
|
38609
|
-
/* @__PURE__ */ (0,
|
|
38661
|
+
element: /* @__PURE__ */ (0, import_jsx_runtime13.jsxs)(Box_default, { flexDirection: "column", borderStyle: "round", borderColor: "cyan", paddingX: 1, children: [
|
|
38662
|
+
/* @__PURE__ */ (0, import_jsx_runtime13.jsxs)(Text, { bold: true, color: "cyan", children: [
|
|
38610
38663
|
"Skills (",
|
|
38611
38664
|
all.length,
|
|
38612
38665
|
")"
|
|
38613
38666
|
] }),
|
|
38614
|
-
all.map((s2) => /* @__PURE__ */ (0,
|
|
38615
|
-
/* @__PURE__ */ (0,
|
|
38616
|
-
/* @__PURE__ */ (0,
|
|
38667
|
+
all.map((s2) => /* @__PURE__ */ (0, import_jsx_runtime13.jsxs)(Box_default, { children: [
|
|
38668
|
+
/* @__PURE__ */ (0, import_jsx_runtime13.jsx)(Box_default, { width: 28, children: /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(Text, { color: "cyan", children: s2.name }) }),
|
|
38669
|
+
/* @__PURE__ */ (0, import_jsx_runtime13.jsx)(Text, { color: "gray", children: s2.frontmatter.description || "" })
|
|
38617
38670
|
] }, s2.name)),
|
|
38618
|
-
/* @__PURE__ */ (0,
|
|
38671
|
+
/* @__PURE__ */ (0, import_jsx_runtime13.jsxs)(Text, { color: "gray", children: [
|
|
38619
38672
|
"Run with: /skill ",
|
|
38620
38673
|
"<name>",
|
|
38621
38674
|
" [args]"
|
|
@@ -38845,7 +38898,7 @@ function listAgents() {
|
|
|
38845
38898
|
}
|
|
38846
38899
|
|
|
38847
38900
|
// src/commands-palette/builtin/agent.tsx
|
|
38848
|
-
var
|
|
38901
|
+
var import_jsx_runtime14 = __toESM(require_jsx_runtime(), 1);
|
|
38849
38902
|
var agentCommand = {
|
|
38850
38903
|
name: "agent",
|
|
38851
38904
|
description: "Activate a custom subagent (or list available)",
|
|
@@ -38859,17 +38912,17 @@ var agentCommand = {
|
|
|
38859
38912
|
}
|
|
38860
38913
|
return {
|
|
38861
38914
|
type: "render",
|
|
38862
|
-
element: /* @__PURE__ */ (0,
|
|
38863
|
-
/* @__PURE__ */ (0,
|
|
38915
|
+
element: /* @__PURE__ */ (0, import_jsx_runtime14.jsxs)(Box_default, { flexDirection: "column", borderStyle: "round", borderColor: "cyan", paddingX: 1, children: [
|
|
38916
|
+
/* @__PURE__ */ (0, import_jsx_runtime14.jsxs)(Text, { bold: true, color: "cyan", children: [
|
|
38864
38917
|
"Custom agents (",
|
|
38865
38918
|
all.length,
|
|
38866
38919
|
")"
|
|
38867
38920
|
] }),
|
|
38868
|
-
all.map((a3) => /* @__PURE__ */ (0,
|
|
38869
|
-
/* @__PURE__ */ (0,
|
|
38870
|
-
/* @__PURE__ */ (0,
|
|
38921
|
+
all.map((a3) => /* @__PURE__ */ (0, import_jsx_runtime14.jsxs)(Box_default, { children: [
|
|
38922
|
+
/* @__PURE__ */ (0, import_jsx_runtime14.jsx)(Box_default, { width: 28, children: /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(Text, { color: "cyan", children: a3.name }) }),
|
|
38923
|
+
/* @__PURE__ */ (0, import_jsx_runtime14.jsx)(Text, { color: "gray", children: a3.description })
|
|
38871
38924
|
] }, a3.name)),
|
|
38872
|
-
/* @__PURE__ */ (0,
|
|
38925
|
+
/* @__PURE__ */ (0, import_jsx_runtime14.jsxs)(Text, { color: "gray", children: [
|
|
38873
38926
|
"Activate with: /agent ",
|
|
38874
38927
|
"<name>"
|
|
38875
38928
|
] })
|
|
@@ -38898,7 +38951,7 @@ ${a2.allowedTools.length ? `
|
|
|
38898
38951
|
|
|
38899
38952
|
// src/commands-palette/builtin/diff.tsx
|
|
38900
38953
|
init_execa();
|
|
38901
|
-
var
|
|
38954
|
+
var import_jsx_runtime15 = __toESM(require_jsx_runtime(), 1);
|
|
38902
38955
|
var diffCommand = {
|
|
38903
38956
|
name: "diff",
|
|
38904
38957
|
description: "Show the working-tree git diff (use --stat for a summary)",
|
|
@@ -38927,16 +38980,16 @@ var diffCommand = {
|
|
|
38927
38980
|
const truncated = raw.split("\n").length > 200;
|
|
38928
38981
|
return {
|
|
38929
38982
|
type: "render",
|
|
38930
|
-
element: /* @__PURE__ */ (0,
|
|
38931
|
-
/* @__PURE__ */ (0,
|
|
38983
|
+
element: /* @__PURE__ */ (0, import_jsx_runtime15.jsxs)(Box_default, { flexDirection: "column", children: [
|
|
38984
|
+
/* @__PURE__ */ (0, import_jsx_runtime15.jsxs)(Text, { bold: true, color: "magentaBright", children: [
|
|
38932
38985
|
"git diff",
|
|
38933
38986
|
statOnly ? " --stat" : ""
|
|
38934
38987
|
] }),
|
|
38935
38988
|
lines.map((l, i2) => {
|
|
38936
38989
|
const color = l.startsWith("+") && !l.startsWith("+++") ? "green" : l.startsWith("-") && !l.startsWith("---") ? "red" : l.startsWith("@@") ? "cyan" : l.startsWith("diff ") || l.startsWith("index ") ? "yellow" : "gray";
|
|
38937
|
-
return /* @__PURE__ */ (0,
|
|
38990
|
+
return /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(Text, { color, children: l.length > 200 ? l.slice(0, 200) + " \u2026" : l || "\xA0" }, i2);
|
|
38938
38991
|
}),
|
|
38939
|
-
truncated ? /* @__PURE__ */ (0,
|
|
38992
|
+
truncated ? /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(Text, { color: "gray", children: "\u2026 (diff truncated)" }) : null
|
|
38940
38993
|
] })
|
|
38941
38994
|
};
|
|
38942
38995
|
}
|
|
@@ -39109,7 +39162,7 @@ function renderRepoMap(map, opts = {}) {
|
|
|
39109
39162
|
}
|
|
39110
39163
|
|
|
39111
39164
|
// src/commands-palette/builtin/map.tsx
|
|
39112
|
-
var
|
|
39165
|
+
var import_jsx_runtime16 = __toESM(require_jsx_runtime(), 1);
|
|
39113
39166
|
var mapCommand = {
|
|
39114
39167
|
name: "map",
|
|
39115
39168
|
description: "Show a symbol map of the current repo (optionally filtered by query)",
|
|
@@ -39126,9 +39179,9 @@ var mapCommand = {
|
|
|
39126
39179
|
const lines = text.split("\n");
|
|
39127
39180
|
return {
|
|
39128
39181
|
type: "render",
|
|
39129
|
-
element: /* @__PURE__ */ (0,
|
|
39130
|
-
/* @__PURE__ */ (0,
|
|
39131
|
-
lines.slice(1).map((l, i2) => /* @__PURE__ */ (0,
|
|
39182
|
+
element: /* @__PURE__ */ (0, import_jsx_runtime16.jsxs)(Box_default, { flexDirection: "column", children: [
|
|
39183
|
+
/* @__PURE__ */ (0, import_jsx_runtime16.jsx)(Text, { bold: true, color: "magentaBright", children: lines[0] }),
|
|
39184
|
+
lines.slice(1).map((l, i2) => /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(Text, { color: "gray", children: l }, i2))
|
|
39132
39185
|
] })
|
|
39133
39186
|
};
|
|
39134
39187
|
}
|
|
@@ -39231,7 +39284,7 @@ async function uninstallSkill(name) {
|
|
|
39231
39284
|
}
|
|
39232
39285
|
|
|
39233
39286
|
// src/commands-palette/builtin/skills.tsx
|
|
39234
|
-
var
|
|
39287
|
+
var import_jsx_runtime17 = __toESM(require_jsx_runtime(), 1);
|
|
39235
39288
|
var SCOPE_COLOR = {
|
|
39236
39289
|
"project-kryven": "cyan",
|
|
39237
39290
|
"project-claude": "cyan",
|
|
@@ -39250,35 +39303,35 @@ var SkillRow = ({ skill }) => {
|
|
|
39250
39303
|
const desc = skill.frontmatter.description || "(no description)";
|
|
39251
39304
|
const scope = SCOPE_LABEL[skill.scope];
|
|
39252
39305
|
const scopeColor = SCOPE_COLOR[skill.scope];
|
|
39253
|
-
return /* @__PURE__ */ (0,
|
|
39254
|
-
/* @__PURE__ */ (0,
|
|
39255
|
-
/* @__PURE__ */ (0,
|
|
39306
|
+
return /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)(Box_default, { children: [
|
|
39307
|
+
/* @__PURE__ */ (0, import_jsx_runtime17.jsx)(Box_default, { width: 26, children: /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(Text, { color: "magentaBright", children: skill.name }) }),
|
|
39308
|
+
/* @__PURE__ */ (0, import_jsx_runtime17.jsx)(Box_default, { width: 10, children: /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)(Text, { color: scopeColor, children: [
|
|
39256
39309
|
"[",
|
|
39257
39310
|
scope,
|
|
39258
39311
|
"]"
|
|
39259
39312
|
] }) }),
|
|
39260
|
-
/* @__PURE__ */ (0,
|
|
39313
|
+
/* @__PURE__ */ (0, import_jsx_runtime17.jsx)(Text, { color: "gray", children: desc })
|
|
39261
39314
|
] });
|
|
39262
39315
|
};
|
|
39263
|
-
var SkillList = ({ skills }) => /* @__PURE__ */ (0,
|
|
39264
|
-
/* @__PURE__ */ (0,
|
|
39316
|
+
var SkillList = ({ skills }) => /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)(Box_default, { flexDirection: "column", borderStyle: "round", borderColor: "magenta", paddingX: 1, children: [
|
|
39317
|
+
/* @__PURE__ */ (0, import_jsx_runtime17.jsxs)(Text, { bold: true, color: "magentaBright", children: [
|
|
39265
39318
|
"Skills (",
|
|
39266
39319
|
skills.length,
|
|
39267
39320
|
" installed)"
|
|
39268
39321
|
] }),
|
|
39269
|
-
skills.map((s) => /* @__PURE__ */ (0,
|
|
39270
|
-
/* @__PURE__ */ (0,
|
|
39271
|
-
/* @__PURE__ */ (0,
|
|
39322
|
+
skills.map((s) => /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(SkillRow, { skill: s }, s.name)),
|
|
39323
|
+
/* @__PURE__ */ (0, import_jsx_runtime17.jsxs)(Box_default, { marginTop: 1, flexDirection: "column", children: [
|
|
39324
|
+
/* @__PURE__ */ (0, import_jsx_runtime17.jsxs)(Text, { color: "gray", children: [
|
|
39272
39325
|
" /skills install ",
|
|
39273
39326
|
"<url|path>",
|
|
39274
39327
|
" \u2014 install a skill from GitHub or local path"
|
|
39275
39328
|
] }),
|
|
39276
|
-
/* @__PURE__ */ (0,
|
|
39329
|
+
/* @__PURE__ */ (0, import_jsx_runtime17.jsxs)(Text, { color: "gray", children: [
|
|
39277
39330
|
" /skills uninstall ",
|
|
39278
39331
|
"<name>",
|
|
39279
39332
|
" \u2014 remove a user-installed skill"
|
|
39280
39333
|
] }),
|
|
39281
|
-
/* @__PURE__ */ (0,
|
|
39334
|
+
/* @__PURE__ */ (0, import_jsx_runtime17.jsxs)(Text, { color: "gray", children: [
|
|
39282
39335
|
" /skills info ",
|
|
39283
39336
|
"<name>",
|
|
39284
39337
|
" \u2014 show full skill metadata"
|
|
@@ -39301,19 +39354,19 @@ var SkillDetail = ({ skill }) => {
|
|
|
39301
39354
|
["Source", skill.sourcePath]
|
|
39302
39355
|
];
|
|
39303
39356
|
const bodyPreview = skill.body.trim().split("\n").slice(0, 6).join("\n");
|
|
39304
|
-
return /* @__PURE__ */ (0,
|
|
39305
|
-
/* @__PURE__ */ (0,
|
|
39357
|
+
return /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)(Box_default, { flexDirection: "column", borderStyle: "round", borderColor: "magenta", paddingX: 1, children: [
|
|
39358
|
+
/* @__PURE__ */ (0, import_jsx_runtime17.jsxs)(Text, { bold: true, color: "magentaBright", children: [
|
|
39306
39359
|
"Skill: ",
|
|
39307
39360
|
skill.name
|
|
39308
39361
|
] }),
|
|
39309
|
-
rows.map(([k, v]) => /* @__PURE__ */ (0,
|
|
39310
|
-
/* @__PURE__ */ (0,
|
|
39311
|
-
/* @__PURE__ */ (0,
|
|
39362
|
+
rows.map(([k, v]) => /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)(Box_default, { children: [
|
|
39363
|
+
/* @__PURE__ */ (0, import_jsx_runtime17.jsx)(Box_default, { width: 22, children: /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(Text, { color: "gray", children: k }) }),
|
|
39364
|
+
/* @__PURE__ */ (0, import_jsx_runtime17.jsx)(Text, { children: v })
|
|
39312
39365
|
] }, k)),
|
|
39313
|
-
/* @__PURE__ */ (0,
|
|
39314
|
-
/* @__PURE__ */ (0,
|
|
39315
|
-
bodyPreview.split("\n").map((l, i2) => /* @__PURE__ */ (0,
|
|
39316
|
-
skill.body.trim().split("\n").length > 6 && /* @__PURE__ */ (0,
|
|
39366
|
+
/* @__PURE__ */ (0, import_jsx_runtime17.jsxs)(Box_default, { marginTop: 1, flexDirection: "column", children: [
|
|
39367
|
+
/* @__PURE__ */ (0, import_jsx_runtime17.jsx)(Text, { color: "gray", children: "Body preview:" }),
|
|
39368
|
+
bodyPreview.split("\n").map((l, i2) => /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(Text, { color: "white", children: l }, i2)),
|
|
39369
|
+
skill.body.trim().split("\n").length > 6 && /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)(Text, { color: "gray", children: [
|
|
39317
39370
|
"\u2026 (truncated \u2014 ",
|
|
39318
39371
|
skill.body.trim().split("\n").length,
|
|
39319
39372
|
" lines total)"
|
|
@@ -39331,7 +39384,7 @@ function runList() {
|
|
|
39331
39384
|
}
|
|
39332
39385
|
return {
|
|
39333
39386
|
type: "render",
|
|
39334
|
-
element: /* @__PURE__ */ (0,
|
|
39387
|
+
element: /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(SkillList, { skills: all })
|
|
39335
39388
|
};
|
|
39336
39389
|
}
|
|
39337
39390
|
function runInfo(name) {
|
|
@@ -39344,7 +39397,7 @@ function runInfo(name) {
|
|
|
39344
39397
|
}
|
|
39345
39398
|
return {
|
|
39346
39399
|
type: "render",
|
|
39347
|
-
element: /* @__PURE__ */ (0,
|
|
39400
|
+
element: /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(SkillDetail, { skill: s })
|
|
39348
39401
|
};
|
|
39349
39402
|
}
|
|
39350
39403
|
async function runInstall(source, cwd2) {
|
|
@@ -39418,7 +39471,7 @@ var skillsCommand = {
|
|
|
39418
39471
|
};
|
|
39419
39472
|
|
|
39420
39473
|
// src/commands-palette/builtin/search.tsx
|
|
39421
|
-
var
|
|
39474
|
+
var import_jsx_runtime18 = __toESM(require_jsx_runtime(), 1);
|
|
39422
39475
|
import { readdir as readdir3, stat as stat2, readFile as readFile3 } from "node:fs/promises";
|
|
39423
39476
|
import { join as join6, relative } from "node:path";
|
|
39424
39477
|
var IGNORE_DIRS = /* @__PURE__ */ new Set([
|
|
@@ -39518,34 +39571,34 @@ async function contentSearch(pattern, cwd2) {
|
|
|
39518
39571
|
}
|
|
39519
39572
|
return { matches, truncated };
|
|
39520
39573
|
}
|
|
39521
|
-
var FileNameResultsPanel = ({ query, results }) => /* @__PURE__ */ (0,
|
|
39522
|
-
/* @__PURE__ */ (0,
|
|
39574
|
+
var FileNameResultsPanel = ({ query, results }) => /* @__PURE__ */ (0, import_jsx_runtime18.jsxs)(Box_default, { flexDirection: "column", children: [
|
|
39575
|
+
/* @__PURE__ */ (0, import_jsx_runtime18.jsxs)(Text, { bold: true, color: "magentaBright", children: [
|
|
39523
39576
|
results.length,
|
|
39524
39577
|
' file(s) matching "',
|
|
39525
39578
|
query,
|
|
39526
39579
|
'"'
|
|
39527
39580
|
] }),
|
|
39528
|
-
results.map(({ rel }) => /* @__PURE__ */ (0,
|
|
39529
|
-
/* @__PURE__ */ (0,
|
|
39530
|
-
/* @__PURE__ */ (0,
|
|
39581
|
+
results.map(({ rel }) => /* @__PURE__ */ (0, import_jsx_runtime18.jsxs)(Box_default, { children: [
|
|
39582
|
+
/* @__PURE__ */ (0, import_jsx_runtime18.jsx)(Text, { color: "gray", children: " " }),
|
|
39583
|
+
/* @__PURE__ */ (0, import_jsx_runtime18.jsx)(Text, { color: "cyan", children: rel })
|
|
39531
39584
|
] }, rel))
|
|
39532
39585
|
] });
|
|
39533
|
-
var ContentResultsPanel = ({ pattern, matches, truncated }) => /* @__PURE__ */ (0,
|
|
39534
|
-
/* @__PURE__ */ (0,
|
|
39586
|
+
var ContentResultsPanel = ({ pattern, matches, truncated }) => /* @__PURE__ */ (0, import_jsx_runtime18.jsxs)(Box_default, { flexDirection: "column", children: [
|
|
39587
|
+
/* @__PURE__ */ (0, import_jsx_runtime18.jsxs)(Text, { bold: true, color: "magentaBright", children: [
|
|
39535
39588
|
matches.length,
|
|
39536
39589
|
" match line(s) for /",
|
|
39537
39590
|
pattern,
|
|
39538
39591
|
"/",
|
|
39539
39592
|
truncated ? " (truncated)" : ""
|
|
39540
39593
|
] }),
|
|
39541
|
-
matches.map(({ rel, line, snippet }, i2) => /* @__PURE__ */ (0,
|
|
39542
|
-
/* @__PURE__ */ (0,
|
|
39543
|
-
/* @__PURE__ */ (0,
|
|
39594
|
+
matches.map(({ rel, line, snippet }, i2) => /* @__PURE__ */ (0, import_jsx_runtime18.jsxs)(Box_default, { flexDirection: "row", children: [
|
|
39595
|
+
/* @__PURE__ */ (0, import_jsx_runtime18.jsx)(Text, { color: "cyan", children: rel }),
|
|
39596
|
+
/* @__PURE__ */ (0, import_jsx_runtime18.jsxs)(Text, { color: "gray", children: [
|
|
39544
39597
|
":",
|
|
39545
39598
|
line,
|
|
39546
39599
|
": "
|
|
39547
39600
|
] }),
|
|
39548
|
-
/* @__PURE__ */ (0,
|
|
39601
|
+
/* @__PURE__ */ (0, import_jsx_runtime18.jsx)(Text, { children: snippet.length > 80 ? snippet.slice(0, 80) + " \u2026" : snippet })
|
|
39549
39602
|
] }, i2))
|
|
39550
39603
|
] });
|
|
39551
39604
|
var searchCommand = {
|
|
@@ -39574,7 +39627,7 @@ var searchCommand = {
|
|
|
39574
39627
|
}
|
|
39575
39628
|
return {
|
|
39576
39629
|
type: "render",
|
|
39577
|
-
element: /* @__PURE__ */ (0,
|
|
39630
|
+
element: /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(ContentResultsPanel, { pattern, matches, truncated })
|
|
39578
39631
|
};
|
|
39579
39632
|
}
|
|
39580
39633
|
const results = await fileNameSearch(trimmed, ctx.cwd);
|
|
@@ -39583,13 +39636,13 @@ var searchCommand = {
|
|
|
39583
39636
|
}
|
|
39584
39637
|
return {
|
|
39585
39638
|
type: "render",
|
|
39586
|
-
element: /* @__PURE__ */ (0,
|
|
39639
|
+
element: /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(FileNameResultsPanel, { query: trimmed, results })
|
|
39587
39640
|
};
|
|
39588
39641
|
}
|
|
39589
39642
|
};
|
|
39590
39643
|
|
|
39591
39644
|
// src/commands-palette/builtin/new.tsx
|
|
39592
|
-
var
|
|
39645
|
+
var import_jsx_runtime19 = __toESM(require_jsx_runtime(), 1);
|
|
39593
39646
|
var TEMPLATES = [
|
|
39594
39647
|
{
|
|
39595
39648
|
name: "react",
|
|
@@ -39635,14 +39688,14 @@ var TEMPLATES = [
|
|
|
39635
39688
|
}
|
|
39636
39689
|
];
|
|
39637
39690
|
var TEMPLATE_MAP = new Map(TEMPLATES.map((t) => [t.name, t]));
|
|
39638
|
-
var TemplatePicker = () => /* @__PURE__ */ (0,
|
|
39639
|
-
/* @__PURE__ */ (0,
|
|
39640
|
-
/* @__PURE__ */ (0,
|
|
39641
|
-
/* @__PURE__ */ (0,
|
|
39642
|
-
/* @__PURE__ */ (0,
|
|
39643
|
-
/* @__PURE__ */ (0,
|
|
39691
|
+
var TemplatePicker = () => /* @__PURE__ */ (0, import_jsx_runtime19.jsxs)(Box_default, { flexDirection: "column", borderStyle: "round", borderColor: "magenta", paddingX: 1, children: [
|
|
39692
|
+
/* @__PURE__ */ (0, import_jsx_runtime19.jsx)(Text, { bold: true, color: "magentaBright", children: "New conversation \u2014 choose a template" }),
|
|
39693
|
+
/* @__PURE__ */ (0, import_jsx_runtime19.jsx)(Box_default, { marginTop: 1, flexDirection: "column", children: TEMPLATES.map((t) => /* @__PURE__ */ (0, import_jsx_runtime19.jsxs)(Box_default, { children: [
|
|
39694
|
+
/* @__PURE__ */ (0, import_jsx_runtime19.jsx)(Box_default, { width: 12, children: /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(Text, { color: "magenta", children: t.name }) }),
|
|
39695
|
+
/* @__PURE__ */ (0, import_jsx_runtime19.jsx)(Box_default, { width: 22, children: /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(Text, { bold: true, children: t.label }) }),
|
|
39696
|
+
/* @__PURE__ */ (0, import_jsx_runtime19.jsx)(Text, { color: "gray", children: t.description })
|
|
39644
39697
|
] }, t.name)) }),
|
|
39645
|
-
/* @__PURE__ */ (0,
|
|
39698
|
+
/* @__PURE__ */ (0, import_jsx_runtime19.jsx)(Box_default, { marginTop: 1, children: /* @__PURE__ */ (0, import_jsx_runtime19.jsxs)(Text, { color: "gray", children: [
|
|
39646
39699
|
"Start with: /new ",
|
|
39647
39700
|
"<name>",
|
|
39648
39701
|
" \xB7 Blank session: /new blank"
|
|
@@ -39657,7 +39710,7 @@ var newCommand = {
|
|
|
39657
39710
|
if (!arg) {
|
|
39658
39711
|
return {
|
|
39659
39712
|
type: "render",
|
|
39660
|
-
element: /* @__PURE__ */ (0,
|
|
39713
|
+
element: /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(TemplatePicker, {})
|
|
39661
39714
|
};
|
|
39662
39715
|
}
|
|
39663
39716
|
if (arg === "blank") {
|
|
@@ -39767,7 +39820,7 @@ var exportCommand = {
|
|
|
39767
39820
|
|
|
39768
39821
|
// src/commands-palette/builtin/permissions.tsx
|
|
39769
39822
|
init_schema();
|
|
39770
|
-
var
|
|
39823
|
+
var import_jsx_runtime20 = __toESM(require_jsx_runtime(), 1);
|
|
39771
39824
|
import { existsSync as existsSync8, readFileSync as readFileSync6, writeFileSync as writeFileSync3, mkdirSync as mkdirSync3 } from "node:fs";
|
|
39772
39825
|
import { join as join8, dirname as dirname4 } from "node:path";
|
|
39773
39826
|
function settingsPath(cwd2) {
|
|
@@ -39852,14 +39905,14 @@ function resetRules(cwd2) {
|
|
|
39852
39905
|
const next = { ...cfg, permissions: { allow: [], ask: [], deny: [] } };
|
|
39853
39906
|
writeProjectConfig(cwd2, next);
|
|
39854
39907
|
}
|
|
39855
|
-
var BucketSection = ({ label, color, rules, emptyNote }) => /* @__PURE__ */ (0,
|
|
39856
|
-
/* @__PURE__ */ (0,
|
|
39857
|
-
rules.length === 0 ? /* @__PURE__ */ (0,
|
|
39908
|
+
var BucketSection = ({ label, color, rules, emptyNote }) => /* @__PURE__ */ (0, import_jsx_runtime20.jsxs)(Box_default, { flexDirection: "column", marginBottom: 1, children: [
|
|
39909
|
+
/* @__PURE__ */ (0, import_jsx_runtime20.jsx)(Text, { bold: true, color, children: label }),
|
|
39910
|
+
rules.length === 0 ? /* @__PURE__ */ (0, import_jsx_runtime20.jsxs)(Text, { color: "gray", children: [
|
|
39858
39911
|
" ",
|
|
39859
39912
|
emptyNote
|
|
39860
|
-
] }) : rules.map((r) => /* @__PURE__ */ (0,
|
|
39913
|
+
] }) : rules.map((r) => /* @__PURE__ */ (0, import_jsx_runtime20.jsxs)(Text, { color: "white", children: [
|
|
39861
39914
|
" ",
|
|
39862
|
-
/* @__PURE__ */ (0,
|
|
39915
|
+
/* @__PURE__ */ (0, import_jsx_runtime20.jsx)(Text, { color, children: "\u2022" }),
|
|
39863
39916
|
" ",
|
|
39864
39917
|
r
|
|
39865
39918
|
] }, r))
|
|
@@ -39869,7 +39922,7 @@ var PermissionsView = ({
|
|
|
39869
39922
|
ask,
|
|
39870
39923
|
deny,
|
|
39871
39924
|
configPath
|
|
39872
|
-
}) => /* @__PURE__ */ (0,
|
|
39925
|
+
}) => /* @__PURE__ */ (0, import_jsx_runtime20.jsxs)(
|
|
39873
39926
|
Box_default,
|
|
39874
39927
|
{
|
|
39875
39928
|
flexDirection: "column",
|
|
@@ -39878,10 +39931,10 @@ var PermissionsView = ({
|
|
|
39878
39931
|
paddingX: 1,
|
|
39879
39932
|
paddingY: 0,
|
|
39880
39933
|
children: [
|
|
39881
|
-
/* @__PURE__ */ (0,
|
|
39882
|
-
/* @__PURE__ */ (0,
|
|
39883
|
-
/* @__PURE__ */ (0,
|
|
39884
|
-
/* @__PURE__ */ (0,
|
|
39934
|
+
/* @__PURE__ */ (0, import_jsx_runtime20.jsx)(Text, { bold: true, color: "magentaBright", children: "Project permissions" }),
|
|
39935
|
+
/* @__PURE__ */ (0, import_jsx_runtime20.jsx)(Text, { color: "gray", children: configPath }),
|
|
39936
|
+
/* @__PURE__ */ (0, import_jsx_runtime20.jsxs)(Box_default, { marginTop: 1, flexDirection: "column", children: [
|
|
39937
|
+
/* @__PURE__ */ (0, import_jsx_runtime20.jsx)(
|
|
39885
39938
|
BucketSection,
|
|
39886
39939
|
{
|
|
39887
39940
|
label: "allow (auto-approve these tools)",
|
|
@@ -39890,7 +39943,7 @@ var PermissionsView = ({
|
|
|
39890
39943
|
emptyNote: "(none)"
|
|
39891
39944
|
}
|
|
39892
39945
|
),
|
|
39893
|
-
/* @__PURE__ */ (0,
|
|
39946
|
+
/* @__PURE__ */ (0, import_jsx_runtime20.jsx)(
|
|
39894
39947
|
BucketSection,
|
|
39895
39948
|
{
|
|
39896
39949
|
label: "ask (always prompt before running)",
|
|
@@ -39899,7 +39952,7 @@ var PermissionsView = ({
|
|
|
39899
39952
|
emptyNote: "(none \u2014 risk model decides)"
|
|
39900
39953
|
}
|
|
39901
39954
|
),
|
|
39902
|
-
/* @__PURE__ */ (0,
|
|
39955
|
+
/* @__PURE__ */ (0, import_jsx_runtime20.jsx)(
|
|
39903
39956
|
BucketSection,
|
|
39904
39957
|
{
|
|
39905
39958
|
label: "deny (never run these tools)",
|
|
@@ -39909,20 +39962,20 @@ var PermissionsView = ({
|
|
|
39909
39962
|
}
|
|
39910
39963
|
)
|
|
39911
39964
|
] }),
|
|
39912
|
-
/* @__PURE__ */ (0,
|
|
39913
|
-
/* @__PURE__ */ (0,
|
|
39914
|
-
/* @__PURE__ */ (0,
|
|
39915
|
-
/* @__PURE__ */ (0,
|
|
39916
|
-
/* @__PURE__ */ (0,
|
|
39965
|
+
/* @__PURE__ */ (0, import_jsx_runtime20.jsxs)(Box_default, { flexDirection: "column", marginTop: 1, children: [
|
|
39966
|
+
/* @__PURE__ */ (0, import_jsx_runtime20.jsx)(Text, { color: "gray", children: "Risk model defaults:" }),
|
|
39967
|
+
/* @__PURE__ */ (0, import_jsx_runtime20.jsx)(Text, { color: "gray", children: " low (read-only) \u2192 auto-allow" }),
|
|
39968
|
+
/* @__PURE__ */ (0, import_jsx_runtime20.jsx)(Text, { color: "gray", children: " medium (writes/net) \u2192 ask once per session" }),
|
|
39969
|
+
/* @__PURE__ */ (0, import_jsx_runtime20.jsx)(Text, { color: "gray", children: " high (destructive) \u2192 always ask" })
|
|
39917
39970
|
] }),
|
|
39918
|
-
/* @__PURE__ */ (0,
|
|
39919
|
-
/* @__PURE__ */ (0,
|
|
39971
|
+
/* @__PURE__ */ (0, import_jsx_runtime20.jsxs)(Box_default, { flexDirection: "column", marginTop: 1, children: [
|
|
39972
|
+
/* @__PURE__ */ (0, import_jsx_runtime20.jsxs)(Text, { color: "gray", children: [
|
|
39920
39973
|
"Manage: /permissions allow|ask|deny ",
|
|
39921
39974
|
"<pattern>",
|
|
39922
39975
|
" \xB7 /permissions rm ",
|
|
39923
39976
|
"<pattern>"
|
|
39924
39977
|
] }),
|
|
39925
|
-
/* @__PURE__ */ (0,
|
|
39978
|
+
/* @__PURE__ */ (0, import_jsx_runtime20.jsx)(Text, { color: "gray", children: "Reset: /permissions reset --confirm" })
|
|
39926
39979
|
] })
|
|
39927
39980
|
]
|
|
39928
39981
|
}
|
|
@@ -39939,7 +39992,7 @@ var permissionsCommand = {
|
|
|
39939
39992
|
const { allow, ask, deny } = normalizePermissions(cfg);
|
|
39940
39993
|
return {
|
|
39941
39994
|
type: "render",
|
|
39942
|
-
element: /* @__PURE__ */ (0,
|
|
39995
|
+
element: /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(
|
|
39943
39996
|
PermissionsView,
|
|
39944
39997
|
{
|
|
39945
39998
|
allow,
|
|
@@ -40018,7 +40071,7 @@ var permissionsCommand = {
|
|
|
40018
40071
|
};
|
|
40019
40072
|
|
|
40020
40073
|
// src/commands-palette/builtin/agents.tsx
|
|
40021
|
-
var
|
|
40074
|
+
var import_jsx_runtime21 = __toESM(require_jsx_runtime(), 1);
|
|
40022
40075
|
var SCOPE_LABEL2 = {
|
|
40023
40076
|
"project-kryven": "project",
|
|
40024
40077
|
"project-claude": "project",
|
|
@@ -40048,17 +40101,17 @@ var AgentRow = ({ agent }) => {
|
|
|
40048
40101
|
const tagColor = SCOPE_COLOR2[agent.scope] ?? "gray";
|
|
40049
40102
|
const modelNote = agent.model ? ` [${agent.model}]` : "";
|
|
40050
40103
|
const toolNote = agent.allowedTools.length > 0 ? ` \xB7 tools: ${agent.allowedTools.slice(0, 4).join(", ")}${agent.allowedTools.length > 4 ? " \u2026" : ""}` : "";
|
|
40051
|
-
return /* @__PURE__ */ (0,
|
|
40052
|
-
/* @__PURE__ */ (0,
|
|
40053
|
-
/* @__PURE__ */ (0,
|
|
40054
|
-
/* @__PURE__ */ (0,
|
|
40104
|
+
return /* @__PURE__ */ (0, import_jsx_runtime21.jsxs)(Box_default, { flexDirection: "column", marginBottom: 0, children: [
|
|
40105
|
+
/* @__PURE__ */ (0, import_jsx_runtime21.jsxs)(Box_default, { children: [
|
|
40106
|
+
/* @__PURE__ */ (0, import_jsx_runtime21.jsx)(Box_default, { width: 24, children: /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(Text, { color: "magentaBright", bold: true, children: agent.name }) }),
|
|
40107
|
+
/* @__PURE__ */ (0, import_jsx_runtime21.jsxs)(Text, { color: tagColor, dimColor: true, children: [
|
|
40055
40108
|
"[",
|
|
40056
40109
|
scopeTag(agent),
|
|
40057
40110
|
"]"
|
|
40058
40111
|
] }),
|
|
40059
|
-
/* @__PURE__ */ (0,
|
|
40112
|
+
/* @__PURE__ */ (0, import_jsx_runtime21.jsx)(Text, { color: "gray", children: modelNote })
|
|
40060
40113
|
] }),
|
|
40061
|
-
agent.description || toolNote ? /* @__PURE__ */ (0,
|
|
40114
|
+
agent.description || toolNote ? /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(Box_default, { paddingLeft: 2, children: /* @__PURE__ */ (0, import_jsx_runtime21.jsxs)(Text, { color: "gray", children: [
|
|
40062
40115
|
agent.description || "",
|
|
40063
40116
|
toolNote
|
|
40064
40117
|
] }) }) : null
|
|
@@ -40066,7 +40119,7 @@ var AgentRow = ({ agent }) => {
|
|
|
40066
40119
|
};
|
|
40067
40120
|
var BrowserPanel = ({ agents }) => {
|
|
40068
40121
|
const groups = groupByScope(agents);
|
|
40069
|
-
return /* @__PURE__ */ (0,
|
|
40122
|
+
return /* @__PURE__ */ (0, import_jsx_runtime21.jsxs)(
|
|
40070
40123
|
Box_default,
|
|
40071
40124
|
{
|
|
40072
40125
|
flexDirection: "column",
|
|
@@ -40074,30 +40127,30 @@ var BrowserPanel = ({ agents }) => {
|
|
|
40074
40127
|
borderColor: "magentaBright",
|
|
40075
40128
|
paddingX: 1,
|
|
40076
40129
|
children: [
|
|
40077
|
-
/* @__PURE__ */ (0,
|
|
40130
|
+
/* @__PURE__ */ (0, import_jsx_runtime21.jsxs)(Text, { bold: true, color: "magentaBright", children: [
|
|
40078
40131
|
"Custom agents (",
|
|
40079
40132
|
agents.length,
|
|
40080
40133
|
")"
|
|
40081
40134
|
] }),
|
|
40082
|
-
[...groups.entries()].map(([label, group]) => /* @__PURE__ */ (0,
|
|
40083
|
-
/* @__PURE__ */ (0,
|
|
40135
|
+
[...groups.entries()].map(([label, group]) => /* @__PURE__ */ (0, import_jsx_runtime21.jsxs)(Box_default, { flexDirection: "column", marginTop: 1, children: [
|
|
40136
|
+
/* @__PURE__ */ (0, import_jsx_runtime21.jsxs)(Text, { color: "cyan", bold: true, children: [
|
|
40084
40137
|
label,
|
|
40085
40138
|
" scope (",
|
|
40086
40139
|
group.length,
|
|
40087
40140
|
")"
|
|
40088
40141
|
] }),
|
|
40089
|
-
group.map((a2) => /* @__PURE__ */ (0,
|
|
40142
|
+
group.map((a2) => /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(AgentRow, { agent: a2 }, a2.name))
|
|
40090
40143
|
] }, label)),
|
|
40091
|
-
/* @__PURE__ */ (0,
|
|
40092
|
-
/* @__PURE__ */ (0,
|
|
40144
|
+
/* @__PURE__ */ (0, import_jsx_runtime21.jsxs)(Box_default, { marginTop: 1, flexDirection: "column", children: [
|
|
40145
|
+
/* @__PURE__ */ (0, import_jsx_runtime21.jsxs)(Text, { color: "gray", children: [
|
|
40093
40146
|
"Activate: /agents ",
|
|
40094
40147
|
"<name>"
|
|
40095
40148
|
] }),
|
|
40096
|
-
/* @__PURE__ */ (0,
|
|
40149
|
+
/* @__PURE__ */ (0, import_jsx_runtime21.jsxs)(Text, { color: "gray", children: [
|
|
40097
40150
|
"Inspect: /agents --info ",
|
|
40098
40151
|
"<name>"
|
|
40099
40152
|
] }),
|
|
40100
|
-
/* @__PURE__ */ (0,
|
|
40153
|
+
/* @__PURE__ */ (0, import_jsx_runtime21.jsxs)(Text, { color: "gray", children: [
|
|
40101
40154
|
"Drop agents at .kryven/agents/",
|
|
40102
40155
|
"<name>",
|
|
40103
40156
|
".md or ~/.kryven/agents/",
|
|
@@ -40112,7 +40165,7 @@ var BrowserPanel = ({ agents }) => {
|
|
|
40112
40165
|
var InfoPanel = ({ agent }) => {
|
|
40113
40166
|
const promptLines = agent.systemPrompt.split("\n").slice(0, 20);
|
|
40114
40167
|
const truncated = agent.systemPrompt.split("\n").length > 20;
|
|
40115
|
-
return /* @__PURE__ */ (0,
|
|
40168
|
+
return /* @__PURE__ */ (0, import_jsx_runtime21.jsxs)(
|
|
40116
40169
|
Box_default,
|
|
40117
40170
|
{
|
|
40118
40171
|
flexDirection: "column",
|
|
@@ -40120,36 +40173,36 @@ var InfoPanel = ({ agent }) => {
|
|
|
40120
40173
|
borderColor: "magentaBright",
|
|
40121
40174
|
paddingX: 1,
|
|
40122
40175
|
children: [
|
|
40123
|
-
/* @__PURE__ */ (0,
|
|
40176
|
+
/* @__PURE__ */ (0, import_jsx_runtime21.jsxs)(Text, { bold: true, color: "magentaBright", children: [
|
|
40124
40177
|
"Agent: ",
|
|
40125
40178
|
agent.name
|
|
40126
40179
|
] }),
|
|
40127
|
-
/* @__PURE__ */ (0,
|
|
40128
|
-
/* @__PURE__ */ (0,
|
|
40129
|
-
/* @__PURE__ */ (0,
|
|
40130
|
-
/* @__PURE__ */ (0,
|
|
40180
|
+
/* @__PURE__ */ (0, import_jsx_runtime21.jsxs)(Box_default, { marginTop: 1, flexDirection: "column", children: [
|
|
40181
|
+
/* @__PURE__ */ (0, import_jsx_runtime21.jsxs)(Box_default, { children: [
|
|
40182
|
+
/* @__PURE__ */ (0, import_jsx_runtime21.jsx)(Box_default, { width: 14, children: /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(Text, { color: "gray", children: "Scope" }) }),
|
|
40183
|
+
/* @__PURE__ */ (0, import_jsx_runtime21.jsx)(Text, { color: "cyan", children: scopeTag(agent) })
|
|
40131
40184
|
] }),
|
|
40132
|
-
/* @__PURE__ */ (0,
|
|
40133
|
-
/* @__PURE__ */ (0,
|
|
40134
|
-
/* @__PURE__ */ (0,
|
|
40185
|
+
/* @__PURE__ */ (0, import_jsx_runtime21.jsxs)(Box_default, { children: [
|
|
40186
|
+
/* @__PURE__ */ (0, import_jsx_runtime21.jsx)(Box_default, { width: 14, children: /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(Text, { color: "gray", children: "Model" }) }),
|
|
40187
|
+
/* @__PURE__ */ (0, import_jsx_runtime21.jsx)(Text, { children: agent.model ?? "(default)" })
|
|
40135
40188
|
] }),
|
|
40136
|
-
/* @__PURE__ */ (0,
|
|
40137
|
-
/* @__PURE__ */ (0,
|
|
40138
|
-
/* @__PURE__ */ (0,
|
|
40189
|
+
/* @__PURE__ */ (0, import_jsx_runtime21.jsxs)(Box_default, { children: [
|
|
40190
|
+
/* @__PURE__ */ (0, import_jsx_runtime21.jsx)(Box_default, { width: 14, children: /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(Text, { color: "gray", children: "Tools" }) }),
|
|
40191
|
+
/* @__PURE__ */ (0, import_jsx_runtime21.jsx)(Text, { children: agent.allowedTools.length > 0 ? agent.allowedTools.join(", ") : "(all)" })
|
|
40139
40192
|
] }),
|
|
40140
|
-
/* @__PURE__ */ (0,
|
|
40141
|
-
/* @__PURE__ */ (0,
|
|
40142
|
-
/* @__PURE__ */ (0,
|
|
40193
|
+
/* @__PURE__ */ (0, import_jsx_runtime21.jsxs)(Box_default, { children: [
|
|
40194
|
+
/* @__PURE__ */ (0, import_jsx_runtime21.jsx)(Box_default, { width: 14, children: /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(Text, { color: "gray", children: "Description" }) }),
|
|
40195
|
+
/* @__PURE__ */ (0, import_jsx_runtime21.jsx)(Text, { children: agent.description || "(none)" })
|
|
40143
40196
|
] }),
|
|
40144
|
-
/* @__PURE__ */ (0,
|
|
40145
|
-
/* @__PURE__ */ (0,
|
|
40146
|
-
/* @__PURE__ */ (0,
|
|
40197
|
+
/* @__PURE__ */ (0, import_jsx_runtime21.jsxs)(Box_default, { children: [
|
|
40198
|
+
/* @__PURE__ */ (0, import_jsx_runtime21.jsx)(Box_default, { width: 14, children: /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(Text, { color: "gray", children: "Source" }) }),
|
|
40199
|
+
/* @__PURE__ */ (0, import_jsx_runtime21.jsx)(Text, { color: "gray", children: agent.sourcePath })
|
|
40147
40200
|
] })
|
|
40148
40201
|
] }),
|
|
40149
|
-
/* @__PURE__ */ (0,
|
|
40150
|
-
/* @__PURE__ */ (0,
|
|
40151
|
-
promptLines.map((line, i2) => /* @__PURE__ */ (0,
|
|
40152
|
-
truncated ? /* @__PURE__ */ (0,
|
|
40202
|
+
/* @__PURE__ */ (0, import_jsx_runtime21.jsxs)(Box_default, { marginTop: 1, flexDirection: "column", children: [
|
|
40203
|
+
/* @__PURE__ */ (0, import_jsx_runtime21.jsx)(Text, { color: "magentaBright", bold: true, children: "System prompt preview:" }),
|
|
40204
|
+
promptLines.map((line, i2) => /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(Text, { color: "gray", children: line || " " }, i2)),
|
|
40205
|
+
truncated ? /* @__PURE__ */ (0, import_jsx_runtime21.jsxs)(Text, { color: "gray", dimColor: true, children: [
|
|
40153
40206
|
"\u2026 (truncated \u2014 ",
|
|
40154
40207
|
agent.systemPrompt.split("\n").length,
|
|
40155
40208
|
" lines total)"
|
|
@@ -40175,7 +40228,7 @@ var agentsCommand = {
|
|
|
40175
40228
|
}
|
|
40176
40229
|
return {
|
|
40177
40230
|
type: "render",
|
|
40178
|
-
element: /* @__PURE__ */ (0,
|
|
40231
|
+
element: /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(BrowserPanel, { agents: all })
|
|
40179
40232
|
};
|
|
40180
40233
|
}
|
|
40181
40234
|
if (trimmed.startsWith("--info")) {
|
|
@@ -40192,7 +40245,7 @@ var agentsCommand = {
|
|
|
40192
40245
|
}
|
|
40193
40246
|
return {
|
|
40194
40247
|
type: "render",
|
|
40195
|
-
element: /* @__PURE__ */ (0,
|
|
40248
|
+
element: /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(InfoPanel, { agent: a3 })
|
|
40196
40249
|
};
|
|
40197
40250
|
}
|
|
40198
40251
|
const [name, ...rest] = trimmed.split(/\s+/);
|
|
@@ -40227,7 +40280,7 @@ ${a2.systemPrompt}${toolLine}${argText}`.trim(),
|
|
|
40227
40280
|
};
|
|
40228
40281
|
|
|
40229
40282
|
// src/commands-palette/builtin/about.tsx
|
|
40230
|
-
var
|
|
40283
|
+
var import_react27 = __toESM(require_react(), 1);
|
|
40231
40284
|
init_modes();
|
|
40232
40285
|
|
|
40233
40286
|
// src/mcp/manager.ts
|
|
@@ -40336,12 +40389,12 @@ async function setAuthHeader(id, authHeader) {
|
|
|
40336
40389
|
}
|
|
40337
40390
|
|
|
40338
40391
|
// src/commands-palette/builtin/about.tsx
|
|
40339
|
-
var
|
|
40392
|
+
var import_jsx_runtime22 = __toESM(require_jsx_runtime(), 1);
|
|
40340
40393
|
var CLI_VERSION = "0.1.1";
|
|
40341
40394
|
var CLI_NAME = "@kryvenaiofficial/kryven";
|
|
40342
40395
|
var AboutPanel = ({ ctx }) => {
|
|
40343
|
-
const [data, setData] = (0,
|
|
40344
|
-
(0,
|
|
40396
|
+
const [data, setData] = (0, import_react27.useState)(null);
|
|
40397
|
+
(0, import_react27.useEffect)(() => {
|
|
40345
40398
|
let cancelled = false;
|
|
40346
40399
|
resolveEffectiveServers(ctx.cwd).then((servers) => {
|
|
40347
40400
|
if (cancelled) return;
|
|
@@ -40361,9 +40414,9 @@ var AboutPanel = ({ ctx }) => {
|
|
|
40361
40414
|
const rows = [
|
|
40362
40415
|
[
|
|
40363
40416
|
"CLI",
|
|
40364
|
-
/* @__PURE__ */ (0,
|
|
40365
|
-
/* @__PURE__ */ (0,
|
|
40366
|
-
/* @__PURE__ */ (0,
|
|
40417
|
+
/* @__PURE__ */ (0, import_jsx_runtime22.jsxs)(Text, { children: [
|
|
40418
|
+
/* @__PURE__ */ (0, import_jsx_runtime22.jsx)(Text, { color: "magentaBright", children: CLI_NAME }),
|
|
40419
|
+
/* @__PURE__ */ (0, import_jsx_runtime22.jsxs)(Text, { color: "gray", children: [
|
|
40367
40420
|
" v",
|
|
40368
40421
|
CLI_VERSION
|
|
40369
40422
|
] })
|
|
@@ -40371,31 +40424,31 @@ var AboutPanel = ({ ctx }) => {
|
|
|
40371
40424
|
],
|
|
40372
40425
|
[
|
|
40373
40426
|
"Model",
|
|
40374
|
-
/* @__PURE__ */ (0,
|
|
40427
|
+
/* @__PURE__ */ (0, import_jsx_runtime22.jsx)(Text, { color: "cyan", children: ctx.model }, "model")
|
|
40375
40428
|
],
|
|
40376
40429
|
[
|
|
40377
40430
|
"Mood",
|
|
40378
|
-
/* @__PURE__ */ (0,
|
|
40431
|
+
/* @__PURE__ */ (0, import_jsx_runtime22.jsx)(Text, { color: "cyan", children: ctx.mood }, "mood")
|
|
40379
40432
|
],
|
|
40380
40433
|
[
|
|
40381
40434
|
"Skills",
|
|
40382
|
-
/* @__PURE__ */ (0,
|
|
40383
|
-
/* @__PURE__ */ (0,
|
|
40384
|
-
/* @__PURE__ */ (0,
|
|
40435
|
+
/* @__PURE__ */ (0, import_jsx_runtime22.jsx)(Text, { children: skills.length === 0 ? /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(Text, { color: "gray", children: "none installed" }) : /* @__PURE__ */ (0, import_jsx_runtime22.jsxs)(Text, { children: [
|
|
40436
|
+
/* @__PURE__ */ (0, import_jsx_runtime22.jsx)(Text, { color: "magentaBright", children: skills.length }),
|
|
40437
|
+
/* @__PURE__ */ (0, import_jsx_runtime22.jsx)(Text, { color: "gray", children: " installed" })
|
|
40385
40438
|
] }) }, "skills")
|
|
40386
40439
|
],
|
|
40387
40440
|
[
|
|
40388
40441
|
"Agents",
|
|
40389
|
-
/* @__PURE__ */ (0,
|
|
40390
|
-
/* @__PURE__ */ (0,
|
|
40391
|
-
/* @__PURE__ */ (0,
|
|
40442
|
+
/* @__PURE__ */ (0, import_jsx_runtime22.jsx)(Text, { children: agents.length === 0 ? /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(Text, { color: "gray", children: "none loaded" }) : /* @__PURE__ */ (0, import_jsx_runtime22.jsxs)(Text, { children: [
|
|
40443
|
+
/* @__PURE__ */ (0, import_jsx_runtime22.jsx)(Text, { color: "magentaBright", children: agents.length }),
|
|
40444
|
+
/* @__PURE__ */ (0, import_jsx_runtime22.jsx)(Text, { color: "gray", children: " loaded" })
|
|
40392
40445
|
] }) }, "agents")
|
|
40393
40446
|
],
|
|
40394
40447
|
[
|
|
40395
40448
|
"Permissions",
|
|
40396
|
-
/* @__PURE__ */ (0,
|
|
40397
|
-
/* @__PURE__ */ (0,
|
|
40398
|
-
/* @__PURE__ */ (0,
|
|
40449
|
+
/* @__PURE__ */ (0, import_jsx_runtime22.jsxs)(Text, { children: [
|
|
40450
|
+
/* @__PURE__ */ (0, import_jsx_runtime22.jsx)(Text, { color: "yellow", children: permMode }),
|
|
40451
|
+
/* @__PURE__ */ (0, import_jsx_runtime22.jsxs)(Text, { color: "gray", children: [
|
|
40399
40452
|
" \u2014 ",
|
|
40400
40453
|
permDesc
|
|
40401
40454
|
] })
|
|
@@ -40403,9 +40456,9 @@ var AboutPanel = ({ ctx }) => {
|
|
|
40403
40456
|
],
|
|
40404
40457
|
[
|
|
40405
40458
|
"MCP servers",
|
|
40406
|
-
data === null ? /* @__PURE__ */ (0,
|
|
40407
|
-
/* @__PURE__ */ (0,
|
|
40408
|
-
/* @__PURE__ */ (0,
|
|
40459
|
+
data === null ? /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(Text, { color: "gray", children: "loading\u2026" }, "mcp") : data.mcpCount === 0 ? /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(Text, { color: "gray", children: "none configured" }, "mcp") : /* @__PURE__ */ (0, import_jsx_runtime22.jsxs)(Text, { children: [
|
|
40460
|
+
/* @__PURE__ */ (0, import_jsx_runtime22.jsx)(Text, { color: "magentaBright", children: data.mcpEnabled }),
|
|
40461
|
+
/* @__PURE__ */ (0, import_jsx_runtime22.jsxs)(Text, { color: "gray", children: [
|
|
40409
40462
|
" enabled / ",
|
|
40410
40463
|
data.mcpCount,
|
|
40411
40464
|
" configured"
|
|
@@ -40414,15 +40467,15 @@ var AboutPanel = ({ ctx }) => {
|
|
|
40414
40467
|
],
|
|
40415
40468
|
[
|
|
40416
40469
|
"Session",
|
|
40417
|
-
/* @__PURE__ */ (0,
|
|
40418
|
-
/* @__PURE__ */ (0,
|
|
40419
|
-
/* @__PURE__ */ (0,
|
|
40420
|
-
/* @__PURE__ */ (0,
|
|
40421
|
-
/* @__PURE__ */ (0,
|
|
40470
|
+
/* @__PURE__ */ (0, import_jsx_runtime22.jsxs)(Text, { children: [
|
|
40471
|
+
/* @__PURE__ */ (0, import_jsx_runtime22.jsx)(Text, { color: "magentaBright", children: ctx.sessionMessages }),
|
|
40472
|
+
/* @__PURE__ */ (0, import_jsx_runtime22.jsx)(Text, { color: "gray", children: " messages \xB7 " }),
|
|
40473
|
+
/* @__PURE__ */ (0, import_jsx_runtime22.jsx)(Text, { color: "magentaBright", children: ctx.sessionTokens.toLocaleString() }),
|
|
40474
|
+
/* @__PURE__ */ (0, import_jsx_runtime22.jsx)(Text, { color: "gray", children: " tokens" })
|
|
40422
40475
|
] }, "session")
|
|
40423
40476
|
]
|
|
40424
40477
|
];
|
|
40425
|
-
return /* @__PURE__ */ (0,
|
|
40478
|
+
return /* @__PURE__ */ (0, import_jsx_runtime22.jsxs)(
|
|
40426
40479
|
Box_default,
|
|
40427
40480
|
{
|
|
40428
40481
|
flexDirection: "column",
|
|
@@ -40430,12 +40483,12 @@ var AboutPanel = ({ ctx }) => {
|
|
|
40430
40483
|
borderColor: "magenta",
|
|
40431
40484
|
paddingX: 1,
|
|
40432
40485
|
children: [
|
|
40433
|
-
/* @__PURE__ */ (0,
|
|
40434
|
-
/* @__PURE__ */ (0,
|
|
40435
|
-
/* @__PURE__ */ (0,
|
|
40486
|
+
/* @__PURE__ */ (0, import_jsx_runtime22.jsx)(Text, { bold: true, color: "magentaBright", children: "About Kryven CLI" }),
|
|
40487
|
+
/* @__PURE__ */ (0, import_jsx_runtime22.jsx)(Box_default, { marginTop: 1, flexDirection: "column", children: rows.map(([label, value]) => /* @__PURE__ */ (0, import_jsx_runtime22.jsxs)(Box_default, { children: [
|
|
40488
|
+
/* @__PURE__ */ (0, import_jsx_runtime22.jsx)(Box_default, { width: 18, children: /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(Text, { color: "gray", children: label }) }),
|
|
40436
40489
|
value
|
|
40437
40490
|
] }, label)) }),
|
|
40438
|
-
/* @__PURE__ */ (0,
|
|
40491
|
+
/* @__PURE__ */ (0, import_jsx_runtime22.jsx)(Box_default, { marginTop: 1, flexDirection: "column", children: /* @__PURE__ */ (0, import_jsx_runtime22.jsxs)(Text, { color: "gray", children: [
|
|
40439
40492
|
"cwd ",
|
|
40440
40493
|
ctx.cwd
|
|
40441
40494
|
] }) })
|
|
@@ -40448,7 +40501,7 @@ var aboutCommand = {
|
|
|
40448
40501
|
description: "Show CLI version, model, skills, agents, permissions, and MCP server count",
|
|
40449
40502
|
run: (_args, ctx) => ({
|
|
40450
40503
|
type: "render",
|
|
40451
|
-
element: /* @__PURE__ */ (0,
|
|
40504
|
+
element: /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(AboutPanel, { ctx })
|
|
40452
40505
|
})
|
|
40453
40506
|
};
|
|
40454
40507
|
|
|
@@ -40645,22 +40698,22 @@ function getThemeManager() {
|
|
|
40645
40698
|
|
|
40646
40699
|
// src/commands-palette/builtin/theme.tsx
|
|
40647
40700
|
init_load();
|
|
40648
|
-
var
|
|
40701
|
+
var import_jsx_runtime23 = __toESM(require_jsx_runtime(), 1);
|
|
40649
40702
|
var ThemePanel = ({
|
|
40650
40703
|
entries,
|
|
40651
40704
|
current
|
|
40652
|
-
}) => /* @__PURE__ */ (0,
|
|
40653
|
-
/* @__PURE__ */ (0,
|
|
40654
|
-
entries.map((e) => /* @__PURE__ */ (0,
|
|
40655
|
-
/* @__PURE__ */ (0,
|
|
40705
|
+
}) => /* @__PURE__ */ (0, import_jsx_runtime23.jsxs)(Box_default, { flexDirection: "column", borderStyle: "round", borderColor: "magenta", paddingX: 1, children: [
|
|
40706
|
+
/* @__PURE__ */ (0, import_jsx_runtime23.jsx)(Text, { bold: true, color: "magenta", children: "Themes" }),
|
|
40707
|
+
entries.map((e) => /* @__PURE__ */ (0, import_jsx_runtime23.jsxs)(Box_default, { children: [
|
|
40708
|
+
/* @__PURE__ */ (0, import_jsx_runtime23.jsx)(Box_default, { width: 24, children: /* @__PURE__ */ (0, import_jsx_runtime23.jsxs)(Text, { color: e.active ? "magentaBright" : "white", bold: e.active, children: [
|
|
40656
40709
|
e.active ? "\u25B6 " : " ",
|
|
40657
40710
|
e.name
|
|
40658
40711
|
] }) }),
|
|
40659
|
-
/* @__PURE__ */ (0,
|
|
40712
|
+
/* @__PURE__ */ (0, import_jsx_runtime23.jsx)(Text, { color: "gray", children: e.accent })
|
|
40660
40713
|
] }, e.name)),
|
|
40661
|
-
/* @__PURE__ */ (0,
|
|
40714
|
+
/* @__PURE__ */ (0, import_jsx_runtime23.jsx)(Box_default, { marginTop: 1, children: /* @__PURE__ */ (0, import_jsx_runtime23.jsxs)(Text, { color: "gray", children: [
|
|
40662
40715
|
"Active: ",
|
|
40663
|
-
/* @__PURE__ */ (0,
|
|
40716
|
+
/* @__PURE__ */ (0, import_jsx_runtime23.jsx)(Text, { color: "magentaBright", children: current }),
|
|
40664
40717
|
" \xB7 ",
|
|
40665
40718
|
"/theme ",
|
|
40666
40719
|
"<name>",
|
|
@@ -40684,7 +40737,7 @@ var themeCommand = {
|
|
|
40684
40737
|
}));
|
|
40685
40738
|
return {
|
|
40686
40739
|
type: "render",
|
|
40687
|
-
element: /* @__PURE__ */ (0,
|
|
40740
|
+
element: /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(ThemePanel, { entries, current: current.name })
|
|
40688
40741
|
};
|
|
40689
40742
|
}
|
|
40690
40743
|
if (trimmed === "cycle") {
|
|
@@ -40735,7 +40788,7 @@ var themeCommand = {
|
|
|
40735
40788
|
};
|
|
40736
40789
|
|
|
40737
40790
|
// src/commands-palette/builtin/file.tsx
|
|
40738
|
-
var
|
|
40791
|
+
var import_jsx_runtime24 = __toESM(require_jsx_runtime(), 1);
|
|
40739
40792
|
import * as fs3 from "node:fs";
|
|
40740
40793
|
import * as path7 from "node:path";
|
|
40741
40794
|
var IGNORED_DIRS = /* @__PURE__ */ new Set([
|
|
@@ -40837,11 +40890,11 @@ function extColor(relPath) {
|
|
|
40837
40890
|
if ([".py", ".rb", ".go", ".rs"].includes(ext)) return "blue";
|
|
40838
40891
|
return "gray";
|
|
40839
40892
|
}
|
|
40840
|
-
var TreePanel = ({ entries, truncated, cwd: cwd2 }) => /* @__PURE__ */ (0,
|
|
40841
|
-
/* @__PURE__ */ (0,
|
|
40893
|
+
var TreePanel = ({ entries, truncated, cwd: cwd2 }) => /* @__PURE__ */ (0, import_jsx_runtime24.jsxs)(Box_default, { flexDirection: "column", borderStyle: "round", borderColor: "magentaBright", paddingX: 1, children: [
|
|
40894
|
+
/* @__PURE__ */ (0, import_jsx_runtime24.jsxs)(Text, { bold: true, color: "magentaBright", children: [
|
|
40842
40895
|
path7.basename(cwd2),
|
|
40843
40896
|
"/ ",
|
|
40844
|
-
/* @__PURE__ */ (0,
|
|
40897
|
+
/* @__PURE__ */ (0, import_jsx_runtime24.jsxs)(Text, { color: "gray", children: [
|
|
40845
40898
|
"(",
|
|
40846
40899
|
entries.length,
|
|
40847
40900
|
" entries)"
|
|
@@ -40852,21 +40905,21 @@ var TreePanel = ({ entries, truncated, cwd: cwd2 }) => /* @__PURE__ */ (0, impor
|
|
|
40852
40905
|
const indent = " ".repeat(depth);
|
|
40853
40906
|
const name = path7.basename(e.relPath);
|
|
40854
40907
|
if (e.isDir) {
|
|
40855
|
-
return /* @__PURE__ */ (0,
|
|
40908
|
+
return /* @__PURE__ */ (0, import_jsx_runtime24.jsxs)(Text, { color: "magenta", children: [
|
|
40856
40909
|
indent,
|
|
40857
|
-
/* @__PURE__ */ (0,
|
|
40910
|
+
/* @__PURE__ */ (0, import_jsx_runtime24.jsxs)(Text, { bold: true, children: [
|
|
40858
40911
|
name,
|
|
40859
40912
|
"/"
|
|
40860
40913
|
] })
|
|
40861
40914
|
] }, e.relPath);
|
|
40862
40915
|
}
|
|
40863
40916
|
const color = extColor(e.relPath);
|
|
40864
|
-
return /* @__PURE__ */ (0,
|
|
40865
|
-
/* @__PURE__ */ (0,
|
|
40917
|
+
return /* @__PURE__ */ (0, import_jsx_runtime24.jsxs)(Box_default, { children: [
|
|
40918
|
+
/* @__PURE__ */ (0, import_jsx_runtime24.jsxs)(Text, { color, children: [
|
|
40866
40919
|
indent,
|
|
40867
40920
|
name
|
|
40868
40921
|
] }),
|
|
40869
|
-
/* @__PURE__ */ (0,
|
|
40922
|
+
/* @__PURE__ */ (0, import_jsx_runtime24.jsxs)(Text, { color: "gray", children: [
|
|
40870
40923
|
" ",
|
|
40871
40924
|
formatSize(e.size),
|
|
40872
40925
|
" ",
|
|
@@ -40874,58 +40927,58 @@ var TreePanel = ({ entries, truncated, cwd: cwd2 }) => /* @__PURE__ */ (0, impor
|
|
|
40874
40927
|
] })
|
|
40875
40928
|
] }, e.relPath);
|
|
40876
40929
|
}),
|
|
40877
|
-
truncated ? /* @__PURE__ */ (0,
|
|
40930
|
+
truncated ? /* @__PURE__ */ (0, import_jsx_runtime24.jsxs)(Text, { color: "gray", children: [
|
|
40878
40931
|
"\u2026 (more files \u2014 use /file ",
|
|
40879
40932
|
"<glob>",
|
|
40880
40933
|
" to filter)"
|
|
40881
40934
|
] }) : null,
|
|
40882
|
-
/* @__PURE__ */ (0,
|
|
40935
|
+
/* @__PURE__ */ (0, import_jsx_runtime24.jsxs)(Text, { color: "gray", children: [
|
|
40883
40936
|
"Run ",
|
|
40884
|
-
/* @__PURE__ */ (0,
|
|
40937
|
+
/* @__PURE__ */ (0, import_jsx_runtime24.jsxs)(Text, { color: "cyan", children: [
|
|
40885
40938
|
"/file ",
|
|
40886
40939
|
"<glob>"
|
|
40887
40940
|
] }),
|
|
40888
40941
|
" to filter \xB7",
|
|
40889
40942
|
" ",
|
|
40890
|
-
/* @__PURE__ */ (0,
|
|
40943
|
+
/* @__PURE__ */ (0, import_jsx_runtime24.jsxs)(Text, { color: "cyan", children: [
|
|
40891
40944
|
"/file ",
|
|
40892
40945
|
"<path>"
|
|
40893
40946
|
] }),
|
|
40894
40947
|
" to read a file"
|
|
40895
40948
|
] })
|
|
40896
40949
|
] });
|
|
40897
|
-
var MatchPanel = ({ entries, pattern, truncated }) => /* @__PURE__ */ (0,
|
|
40898
|
-
/* @__PURE__ */ (0,
|
|
40950
|
+
var MatchPanel = ({ entries, pattern, truncated }) => /* @__PURE__ */ (0, import_jsx_runtime24.jsxs)(Box_default, { flexDirection: "column", borderStyle: "round", borderColor: "magentaBright", paddingX: 1, children: [
|
|
40951
|
+
/* @__PURE__ */ (0, import_jsx_runtime24.jsxs)(Text, { bold: true, color: "magentaBright", children: [
|
|
40899
40952
|
"Matches for ",
|
|
40900
|
-
/* @__PURE__ */ (0,
|
|
40953
|
+
/* @__PURE__ */ (0, import_jsx_runtime24.jsx)(Text, { color: "cyan", children: pattern }),
|
|
40901
40954
|
" ",
|
|
40902
|
-
/* @__PURE__ */ (0,
|
|
40955
|
+
/* @__PURE__ */ (0, import_jsx_runtime24.jsxs)(Text, { color: "gray", children: [
|
|
40903
40956
|
"(",
|
|
40904
40957
|
entries.length,
|
|
40905
40958
|
truncated ? "+" : "",
|
|
40906
40959
|
" results)"
|
|
40907
40960
|
] })
|
|
40908
40961
|
] }),
|
|
40909
|
-
entries.map((e) => /* @__PURE__ */ (0,
|
|
40910
|
-
/* @__PURE__ */ (0,
|
|
40962
|
+
entries.map((e) => /* @__PURE__ */ (0, import_jsx_runtime24.jsxs)(Box_default, { children: [
|
|
40963
|
+
/* @__PURE__ */ (0, import_jsx_runtime24.jsx)(Box_default, { minWidth: 40, children: /* @__PURE__ */ (0, import_jsx_runtime24.jsxs)(Text, { color: e.isDir ? "magenta" : extColor(e.relPath), children: [
|
|
40911
40964
|
e.relPath,
|
|
40912
40965
|
e.isDir ? "/" : ""
|
|
40913
40966
|
] }) }),
|
|
40914
|
-
!e.isDir && /* @__PURE__ */ (0,
|
|
40967
|
+
!e.isDir && /* @__PURE__ */ (0, import_jsx_runtime24.jsxs)(Text, { color: "gray", children: [
|
|
40915
40968
|
formatSize(e.size),
|
|
40916
40969
|
" ",
|
|
40917
40970
|
formatAge(e.mtime)
|
|
40918
40971
|
] })
|
|
40919
40972
|
] }, e.relPath)),
|
|
40920
|
-
truncated ? /* @__PURE__ */ (0,
|
|
40973
|
+
truncated ? /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(Text, { color: "gray", children: "\u2026 (truncated to 80)" }) : null
|
|
40921
40974
|
] });
|
|
40922
40975
|
var FilePanel = ({ relPath, lines, truncated, totalLines }) => {
|
|
40923
40976
|
const color = extColor(relPath);
|
|
40924
|
-
return /* @__PURE__ */ (0,
|
|
40925
|
-
/* @__PURE__ */ (0,
|
|
40977
|
+
return /* @__PURE__ */ (0, import_jsx_runtime24.jsxs)(Box_default, { flexDirection: "column", borderStyle: "round", borderColor: "magentaBright", paddingX: 1, children: [
|
|
40978
|
+
/* @__PURE__ */ (0, import_jsx_runtime24.jsxs)(Text, { bold: true, color: "magentaBright", children: [
|
|
40926
40979
|
relPath,
|
|
40927
40980
|
" ",
|
|
40928
|
-
/* @__PURE__ */ (0,
|
|
40981
|
+
/* @__PURE__ */ (0, import_jsx_runtime24.jsxs)(Text, { color: "gray", children: [
|
|
40929
40982
|
"(",
|
|
40930
40983
|
totalLines,
|
|
40931
40984
|
" lines",
|
|
@@ -40933,14 +40986,14 @@ var FilePanel = ({ relPath, lines, truncated, totalLines }) => {
|
|
|
40933
40986
|
")"
|
|
40934
40987
|
] })
|
|
40935
40988
|
] }),
|
|
40936
|
-
lines.map((l, i2) => /* @__PURE__ */ (0,
|
|
40937
|
-
/* @__PURE__ */ (0,
|
|
40989
|
+
lines.map((l, i2) => /* @__PURE__ */ (0, import_jsx_runtime24.jsxs)(Box_default, { children: [
|
|
40990
|
+
/* @__PURE__ */ (0, import_jsx_runtime24.jsx)(Box_default, { width: 5, children: /* @__PURE__ */ (0, import_jsx_runtime24.jsxs)(Text, { color: "gray", children: [
|
|
40938
40991
|
String(i2 + 1).padStart(4),
|
|
40939
40992
|
" "
|
|
40940
40993
|
] }) }),
|
|
40941
|
-
/* @__PURE__ */ (0,
|
|
40994
|
+
/* @__PURE__ */ (0, import_jsx_runtime24.jsx)(Text, { color, children: l.length > 160 ? l.slice(0, 160) + " \u2026" : l })
|
|
40942
40995
|
] }, i2)),
|
|
40943
|
-
truncated ? /* @__PURE__ */ (0,
|
|
40996
|
+
truncated ? /* @__PURE__ */ (0, import_jsx_runtime24.jsxs)(Text, { color: "gray", children: [
|
|
40944
40997
|
"\u2026 (truncated \u2014 only first ",
|
|
40945
40998
|
lines.length,
|
|
40946
40999
|
" lines shown)"
|
|
@@ -40960,7 +41013,7 @@ var openCommand = {
|
|
|
40960
41013
|
const truncated2 = entries.length >= MAX_ITEMS;
|
|
40961
41014
|
return {
|
|
40962
41015
|
type: "render",
|
|
40963
|
-
element: /* @__PURE__ */ (0,
|
|
41016
|
+
element: /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(TreePanel, { entries, truncated: truncated2, cwd: ctx.cwd })
|
|
40964
41017
|
};
|
|
40965
41018
|
}
|
|
40966
41019
|
const resolved = path7.isAbsolute(input) ? input : path7.join(ctx.cwd, input);
|
|
@@ -40978,7 +41031,7 @@ var openCommand = {
|
|
|
40978
41031
|
const relPath = path7.relative(ctx.cwd, resolved) || input;
|
|
40979
41032
|
return {
|
|
40980
41033
|
type: "render",
|
|
40981
|
-
element: /* @__PURE__ */ (0,
|
|
41034
|
+
element: /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(
|
|
40982
41035
|
FilePanel,
|
|
40983
41036
|
{
|
|
40984
41037
|
relPath,
|
|
@@ -40996,7 +41049,7 @@ var openCommand = {
|
|
|
40996
41049
|
const truncated2 = entries.length >= MAX_ITEMS;
|
|
40997
41050
|
return {
|
|
40998
41051
|
type: "render",
|
|
40999
|
-
element: /* @__PURE__ */ (0,
|
|
41052
|
+
element: /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(TreePanel, { entries, truncated: truncated2, cwd: resolved })
|
|
41000
41053
|
};
|
|
41001
41054
|
}
|
|
41002
41055
|
const MAX_GLOB_ITEMS = 300;
|
|
@@ -41017,14 +41070,14 @@ var openCommand = {
|
|
|
41017
41070
|
const truncated = matched.length >= MAX_RESULTS;
|
|
41018
41071
|
return {
|
|
41019
41072
|
type: "render",
|
|
41020
|
-
element: /* @__PURE__ */ (0,
|
|
41073
|
+
element: /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(MatchPanel, { entries: matched, pattern: input, truncated })
|
|
41021
41074
|
};
|
|
41022
41075
|
}
|
|
41023
41076
|
};
|
|
41024
41077
|
|
|
41025
41078
|
// src/commands-palette/builtin/sessions.tsx
|
|
41026
41079
|
init_defaults();
|
|
41027
|
-
var
|
|
41080
|
+
var import_jsx_runtime25 = __toESM(require_jsx_runtime(), 1);
|
|
41028
41081
|
import { readdir as readdir5, readFile as readFile6, unlink, stat as stat3 } from "node:fs/promises";
|
|
41029
41082
|
import { join as join12, basename as basename4 } from "node:path";
|
|
41030
41083
|
function fmtDate(ms) {
|
|
@@ -41066,32 +41119,32 @@ async function loadSessionFiles() {
|
|
|
41066
41119
|
metas.sort((a2, b) => b.mtimeMs - a2.mtimeMs);
|
|
41067
41120
|
return metas;
|
|
41068
41121
|
}
|
|
41069
|
-
var SessionListPanel = ({ sessions, dir }) => /* @__PURE__ */ (0,
|
|
41070
|
-
/* @__PURE__ */ (0,
|
|
41122
|
+
var SessionListPanel = ({ sessions, dir }) => /* @__PURE__ */ (0, import_jsx_runtime25.jsxs)(Box_default, { flexDirection: "column", borderStyle: "round", borderColor: "magentaBright", paddingX: 1, children: [
|
|
41123
|
+
/* @__PURE__ */ (0, import_jsx_runtime25.jsxs)(Text, { bold: true, color: "magentaBright", children: [
|
|
41071
41124
|
"Saved sessions (",
|
|
41072
41125
|
sessions.length,
|
|
41073
41126
|
") \u2014 ",
|
|
41074
41127
|
dir
|
|
41075
41128
|
] }),
|
|
41076
|
-
sessions.length === 0 ? /* @__PURE__ */ (0,
|
|
41077
|
-
/* @__PURE__ */ (0,
|
|
41129
|
+
sessions.length === 0 ? /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(Box_default, { marginTop: 1, children: /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(Text, { color: "gray", children: "No sessions saved yet. Use /save to save the current conversation." }) }) : /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(Box_default, { marginTop: 1, flexDirection: "column", children: sessions.map((s, i2) => /* @__PURE__ */ (0, import_jsx_runtime25.jsxs)(Box_default, { flexDirection: "row", marginBottom: 0, children: [
|
|
41130
|
+
/* @__PURE__ */ (0, import_jsx_runtime25.jsx)(Box_default, { width: 4, children: /* @__PURE__ */ (0, import_jsx_runtime25.jsxs)(Text, { color: "gray", dimColor: true, children: [
|
|
41078
41131
|
String(i2 + 1).padStart(2),
|
|
41079
41132
|
"."
|
|
41080
41133
|
] }) }),
|
|
41081
|
-
/* @__PURE__ */ (0,
|
|
41082
|
-
/* @__PURE__ */ (0,
|
|
41083
|
-
/* @__PURE__ */ (0,
|
|
41134
|
+
/* @__PURE__ */ (0, import_jsx_runtime25.jsx)(Box_default, { width: 34, children: /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(Text, { color: "magenta", children: s.basename }) }),
|
|
41135
|
+
/* @__PURE__ */ (0, import_jsx_runtime25.jsx)(Box_default, { width: 18, children: /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(Text, { color: "gray", children: fmtDate(s.mtimeMs) }) }),
|
|
41136
|
+
/* @__PURE__ */ (0, import_jsx_runtime25.jsx)(Box_default, { width: 8, children: /* @__PURE__ */ (0, import_jsx_runtime25.jsxs)(Text, { color: "cyan", children: [
|
|
41084
41137
|
s.messageCount,
|
|
41085
41138
|
"msg"
|
|
41086
41139
|
] }) }),
|
|
41087
|
-
/* @__PURE__ */ (0,
|
|
41140
|
+
/* @__PURE__ */ (0, import_jsx_runtime25.jsx)(Text, { color: "gray", dimColor: true, children: fmtSize(s.sizeBytes) })
|
|
41088
41141
|
] }, s.filename)) }),
|
|
41089
|
-
/* @__PURE__ */ (0,
|
|
41090
|
-
/* @__PURE__ */ (0,
|
|
41142
|
+
/* @__PURE__ */ (0, import_jsx_runtime25.jsxs)(Box_default, { marginTop: 1, flexDirection: "column", children: [
|
|
41143
|
+
/* @__PURE__ */ (0, import_jsx_runtime25.jsxs)(Text, { color: "gray", children: [
|
|
41091
41144
|
"Load: /sessions load ",
|
|
41092
41145
|
"<filename>"
|
|
41093
41146
|
] }),
|
|
41094
|
-
/* @__PURE__ */ (0,
|
|
41147
|
+
/* @__PURE__ */ (0, import_jsx_runtime25.jsx)(Text, { color: "gray", children: "Clear: /sessions clear" })
|
|
41095
41148
|
] })
|
|
41096
41149
|
] });
|
|
41097
41150
|
var sessionsCommand = {
|
|
@@ -41195,21 +41248,21 @@ Failed to delete: ${errs.join(", ")}` : "";
|
|
|
41195
41248
|
const metas = await loadSessionFiles();
|
|
41196
41249
|
return {
|
|
41197
41250
|
type: "render",
|
|
41198
|
-
element: /* @__PURE__ */ (0,
|
|
41251
|
+
element: /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(SessionListPanel, { sessions: metas, dir })
|
|
41199
41252
|
};
|
|
41200
41253
|
}
|
|
41201
41254
|
};
|
|
41202
41255
|
|
|
41203
41256
|
// src/commands-palette/builtin/commands.tsx
|
|
41204
|
-
var
|
|
41205
|
-
var CommandItem = ({ row }) => /* @__PURE__ */ (0,
|
|
41206
|
-
/* @__PURE__ */ (0,
|
|
41207
|
-
/* @__PURE__ */ (0,
|
|
41208
|
-
/* @__PURE__ */ (0,
|
|
41257
|
+
var import_jsx_runtime26 = __toESM(require_jsx_runtime(), 1);
|
|
41258
|
+
var CommandItem = ({ row }) => /* @__PURE__ */ (0, import_jsx_runtime26.jsxs)(Box_default, { children: [
|
|
41259
|
+
/* @__PURE__ */ (0, import_jsx_runtime26.jsx)(Box_default, { width: 14, children: /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(Text, { color: "magentaBright", children: "/" + row.name }) }),
|
|
41260
|
+
/* @__PURE__ */ (0, import_jsx_runtime26.jsx)(Box_default, { width: 26, children: /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(Text, { color: "cyan", children: row.hint }) }),
|
|
41261
|
+
/* @__PURE__ */ (0, import_jsx_runtime26.jsx)(Text, { color: "white", children: row.description })
|
|
41209
41262
|
] });
|
|
41210
41263
|
var CommandsPanel = ({ rows, filter, total }) => {
|
|
41211
41264
|
const heading = filter ? `Commands matching "${filter}" (${rows.length} of ${total})` : `All commands (${rows.length})`;
|
|
41212
|
-
return /* @__PURE__ */ (0,
|
|
41265
|
+
return /* @__PURE__ */ (0, import_jsx_runtime26.jsxs)(
|
|
41213
41266
|
Box_default,
|
|
41214
41267
|
{
|
|
41215
41268
|
flexDirection: "column",
|
|
@@ -41217,9 +41270,9 @@ var CommandsPanel = ({ rows, filter, total }) => {
|
|
|
41217
41270
|
borderColor: "magenta",
|
|
41218
41271
|
paddingX: 1,
|
|
41219
41272
|
children: [
|
|
41220
|
-
/* @__PURE__ */ (0,
|
|
41221
|
-
/* @__PURE__ */ (0,
|
|
41222
|
-
/* @__PURE__ */ (0,
|
|
41273
|
+
/* @__PURE__ */ (0, import_jsx_runtime26.jsx)(Text, { bold: true, color: "magentaBright", children: heading }),
|
|
41274
|
+
/* @__PURE__ */ (0, import_jsx_runtime26.jsx)(Box_default, { flexDirection: "column", marginTop: 1, children: rows.map((row) => /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(CommandItem, { row }, row.name)) }),
|
|
41275
|
+
/* @__PURE__ */ (0, import_jsx_runtime26.jsx)(Box_default, { marginTop: 1, children: /* @__PURE__ */ (0, import_jsx_runtime26.jsxs)(Text, { color: "gray", children: [
|
|
41223
41276
|
"Use /commands ",
|
|
41224
41277
|
"<filter>",
|
|
41225
41278
|
" to search \xB7 /help for quick reference"
|
|
@@ -41261,7 +41314,7 @@ var commandsCommand = {
|
|
|
41261
41314
|
}
|
|
41262
41315
|
return {
|
|
41263
41316
|
type: "render",
|
|
41264
|
-
element: /* @__PURE__ */ (0,
|
|
41317
|
+
element: /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(CommandsPanel, { rows: filtered, filter, total: allRows.length })
|
|
41265
41318
|
};
|
|
41266
41319
|
}
|
|
41267
41320
|
};
|
|
@@ -41381,7 +41434,7 @@ function getKeybindings() {
|
|
|
41381
41434
|
}
|
|
41382
41435
|
|
|
41383
41436
|
// src/commands-palette/builtin/keybindings.tsx
|
|
41384
|
-
var
|
|
41437
|
+
var import_jsx_runtime27 = __toESM(require_jsx_runtime(), 1);
|
|
41385
41438
|
var KB_PATH2 = join14(homedir8(), ".kryven", "keybindings.json");
|
|
41386
41439
|
var VALID_ACTIONS = /* @__PURE__ */ new Set([
|
|
41387
41440
|
"clear",
|
|
@@ -41403,7 +41456,7 @@ async function saveToDisk(bindings) {
|
|
|
41403
41456
|
{ mode: 384 }
|
|
41404
41457
|
);
|
|
41405
41458
|
}
|
|
41406
|
-
var BindingsPanel = ({ bindings }) => /* @__PURE__ */ (0,
|
|
41459
|
+
var BindingsPanel = ({ bindings }) => /* @__PURE__ */ (0, import_jsx_runtime27.jsxs)(
|
|
41407
41460
|
Box_default,
|
|
41408
41461
|
{
|
|
41409
41462
|
flexDirection: "column",
|
|
@@ -41411,21 +41464,21 @@ var BindingsPanel = ({ bindings }) => /* @__PURE__ */ (0, import_jsx_runtime26.j
|
|
|
41411
41464
|
borderColor: "magenta",
|
|
41412
41465
|
paddingX: 1,
|
|
41413
41466
|
children: [
|
|
41414
|
-
/* @__PURE__ */ (0,
|
|
41467
|
+
/* @__PURE__ */ (0, import_jsx_runtime27.jsxs)(Text, { bold: true, color: "magentaBright", children: [
|
|
41415
41468
|
"Keybindings (",
|
|
41416
41469
|
bindings.length,
|
|
41417
41470
|
")"
|
|
41418
41471
|
] }),
|
|
41419
|
-
/* @__PURE__ */ (0,
|
|
41420
|
-
/* @__PURE__ */ (0,
|
|
41421
|
-
/* @__PURE__ */ (0,
|
|
41472
|
+
/* @__PURE__ */ (0, import_jsx_runtime27.jsx)(Box_default, { marginTop: 1, flexDirection: "column", children: bindings.map((b) => /* @__PURE__ */ (0, import_jsx_runtime27.jsxs)(Box_default, { children: [
|
|
41473
|
+
/* @__PURE__ */ (0, import_jsx_runtime27.jsx)(Box_default, { width: 26, children: /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(Text, { color: "magenta", children: b.key }) }),
|
|
41474
|
+
/* @__PURE__ */ (0, import_jsx_runtime27.jsx)(Text, { color: "cyan", children: b.action })
|
|
41422
41475
|
] }, b.key)) }),
|
|
41423
|
-
/* @__PURE__ */ (0,
|
|
41424
|
-
/* @__PURE__ */ (0,
|
|
41476
|
+
/* @__PURE__ */ (0, import_jsx_runtime27.jsxs)(Box_default, { marginTop: 1, flexDirection: "column", children: [
|
|
41477
|
+
/* @__PURE__ */ (0, import_jsx_runtime27.jsxs)(Text, { color: "gray", children: [
|
|
41425
41478
|
"File: ",
|
|
41426
41479
|
KB_PATH2
|
|
41427
41480
|
] }),
|
|
41428
|
-
/* @__PURE__ */ (0,
|
|
41481
|
+
/* @__PURE__ */ (0, import_jsx_runtime27.jsxs)(Text, { color: "gray", children: [
|
|
41429
41482
|
"/keybindings set ",
|
|
41430
41483
|
"<key>",
|
|
41431
41484
|
" ",
|
|
@@ -41434,12 +41487,12 @@ var BindingsPanel = ({ bindings }) => /* @__PURE__ */ (0, import_jsx_runtime26.j
|
|
|
41434
41487
|
"<key>",
|
|
41435
41488
|
" \xB7 /keybindings reset --confirm"
|
|
41436
41489
|
] }),
|
|
41437
|
-
/* @__PURE__ */ (0,
|
|
41490
|
+
/* @__PURE__ */ (0, import_jsx_runtime27.jsx)(Text, { color: "gray", children: "/keybindings actions \u2014 list valid action names" })
|
|
41438
41491
|
] })
|
|
41439
41492
|
]
|
|
41440
41493
|
}
|
|
41441
41494
|
);
|
|
41442
|
-
var ActionsPanel = () => /* @__PURE__ */ (0,
|
|
41495
|
+
var ActionsPanel = () => /* @__PURE__ */ (0, import_jsx_runtime27.jsxs)(
|
|
41443
41496
|
Box_default,
|
|
41444
41497
|
{
|
|
41445
41498
|
flexDirection: "column",
|
|
@@ -41447,12 +41500,12 @@ var ActionsPanel = () => /* @__PURE__ */ (0, import_jsx_runtime26.jsxs)(
|
|
|
41447
41500
|
borderColor: "magenta",
|
|
41448
41501
|
paddingX: 1,
|
|
41449
41502
|
children: [
|
|
41450
|
-
/* @__PURE__ */ (0,
|
|
41503
|
+
/* @__PURE__ */ (0, import_jsx_runtime27.jsxs)(Text, { bold: true, color: "magentaBright", children: [
|
|
41451
41504
|
"Valid actions (",
|
|
41452
41505
|
VALID_ACTIONS.size,
|
|
41453
41506
|
")"
|
|
41454
41507
|
] }),
|
|
41455
|
-
/* @__PURE__ */ (0,
|
|
41508
|
+
/* @__PURE__ */ (0, import_jsx_runtime27.jsx)(Box_default, { marginTop: 1, flexDirection: "column", children: [...VALID_ACTIONS].map((a2) => /* @__PURE__ */ (0, import_jsx_runtime27.jsxs)(Text, { color: "cyan", children: [
|
|
41456
41509
|
" ",
|
|
41457
41510
|
a2
|
|
41458
41511
|
] }, a2)) })
|
|
@@ -41470,7 +41523,7 @@ var keybindingsCommand = {
|
|
|
41470
41523
|
const bindings = getKeybindings().list();
|
|
41471
41524
|
return {
|
|
41472
41525
|
type: "render",
|
|
41473
|
-
element: /* @__PURE__ */ (0,
|
|
41526
|
+
element: /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(BindingsPanel, { bindings })
|
|
41474
41527
|
};
|
|
41475
41528
|
}
|
|
41476
41529
|
if (sub === "path") {
|
|
@@ -41479,7 +41532,7 @@ var keybindingsCommand = {
|
|
|
41479
41532
|
if (sub === "actions") {
|
|
41480
41533
|
return {
|
|
41481
41534
|
type: "render",
|
|
41482
|
-
element: /* @__PURE__ */ (0,
|
|
41535
|
+
element: /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(ActionsPanel, {})
|
|
41483
41536
|
};
|
|
41484
41537
|
}
|
|
41485
41538
|
if (sub === "reset") {
|
|
@@ -41709,7 +41762,7 @@ Preview: ${preview}`
|
|
|
41709
41762
|
|
|
41710
41763
|
// src/commands-palette/builtin/memory.tsx
|
|
41711
41764
|
init_defaults();
|
|
41712
|
-
var
|
|
41765
|
+
var import_jsx_runtime28 = __toESM(require_jsx_runtime(), 1);
|
|
41713
41766
|
import { readFile as readFile8, writeFile as writeFile6, mkdir as mkdir7 } from "node:fs/promises";
|
|
41714
41767
|
import { join as join16, dirname as dirname8 } from "node:path";
|
|
41715
41768
|
function getMemoryPath() {
|
|
@@ -41739,7 +41792,7 @@ function fmtDate2(ts) {
|
|
|
41739
41792
|
const pad = (n2) => String(n2).padStart(2, "0");
|
|
41740
41793
|
return `${d.getFullYear()}-${pad(d.getMonth() + 1)}-${pad(d.getDate())} ${pad(d.getHours())}:${pad(d.getMinutes())}`;
|
|
41741
41794
|
}
|
|
41742
|
-
var NoteListPanel = ({ notes, path: path9 }) => /* @__PURE__ */ (0,
|
|
41795
|
+
var NoteListPanel = ({ notes, path: path9 }) => /* @__PURE__ */ (0, import_jsx_runtime28.jsxs)(
|
|
41743
41796
|
Box_default,
|
|
41744
41797
|
{
|
|
41745
41798
|
flexDirection: "column",
|
|
@@ -41747,42 +41800,42 @@ var NoteListPanel = ({ notes, path: path9 }) => /* @__PURE__ */ (0, import_jsx_r
|
|
|
41747
41800
|
borderColor: "magentaBright",
|
|
41748
41801
|
paddingX: 1,
|
|
41749
41802
|
children: [
|
|
41750
|
-
/* @__PURE__ */ (0,
|
|
41803
|
+
/* @__PURE__ */ (0, import_jsx_runtime28.jsxs)(Text, { bold: true, color: "magentaBright", children: [
|
|
41751
41804
|
"Memory \u2014 ",
|
|
41752
41805
|
notes.length,
|
|
41753
41806
|
" note",
|
|
41754
41807
|
notes.length !== 1 ? "s" : "",
|
|
41755
41808
|
" ",
|
|
41756
|
-
/* @__PURE__ */ (0,
|
|
41809
|
+
/* @__PURE__ */ (0, import_jsx_runtime28.jsxs)(Text, { color: "gray", dimColor: true, children: [
|
|
41757
41810
|
"(",
|
|
41758
41811
|
path9,
|
|
41759
41812
|
")"
|
|
41760
41813
|
] })
|
|
41761
41814
|
] }),
|
|
41762
|
-
notes.length === 0 ? /* @__PURE__ */ (0,
|
|
41815
|
+
notes.length === 0 ? /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(Box_default, { marginTop: 1, children: /* @__PURE__ */ (0, import_jsx_runtime28.jsxs)(Text, { color: "gray", children: [
|
|
41763
41816
|
"No notes yet. Use /memory add ",
|
|
41764
41817
|
"<text>",
|
|
41765
41818
|
" to add one."
|
|
41766
|
-
] }) }) : /* @__PURE__ */ (0,
|
|
41767
|
-
/* @__PURE__ */ (0,
|
|
41768
|
-
/* @__PURE__ */ (0,
|
|
41819
|
+
] }) }) : /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(Box_default, { marginTop: 1, flexDirection: "column", children: notes.map((note, i2) => /* @__PURE__ */ (0, import_jsx_runtime28.jsxs)(Box_default, { flexDirection: "column", marginBottom: 1, children: [
|
|
41820
|
+
/* @__PURE__ */ (0, import_jsx_runtime28.jsxs)(Box_default, { children: [
|
|
41821
|
+
/* @__PURE__ */ (0, import_jsx_runtime28.jsx)(Box_default, { width: 4, children: /* @__PURE__ */ (0, import_jsx_runtime28.jsxs)(Text, { color: "magenta", bold: true, children: [
|
|
41769
41822
|
String(i2 + 1).padStart(2),
|
|
41770
41823
|
"."
|
|
41771
41824
|
] }) }),
|
|
41772
|
-
/* @__PURE__ */ (0,
|
|
41825
|
+
/* @__PURE__ */ (0, import_jsx_runtime28.jsx)(Text, { color: "gray", dimColor: true, children: fmtDate2(note.ts) })
|
|
41773
41826
|
] }),
|
|
41774
|
-
/* @__PURE__ */ (0,
|
|
41827
|
+
/* @__PURE__ */ (0, import_jsx_runtime28.jsx)(Box_default, { paddingLeft: 4, children: /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(Text, { wrap: "wrap", children: note.text }) })
|
|
41775
41828
|
] }, note.ts + "-" + i2)) }),
|
|
41776
|
-
/* @__PURE__ */ (0,
|
|
41777
|
-
/* @__PURE__ */ (0,
|
|
41829
|
+
/* @__PURE__ */ (0, import_jsx_runtime28.jsxs)(Box_default, { marginTop: 1, flexDirection: "column", children: [
|
|
41830
|
+
/* @__PURE__ */ (0, import_jsx_runtime28.jsxs)(Text, { color: "gray", children: [
|
|
41778
41831
|
"Add: /memory add ",
|
|
41779
41832
|
"<text>"
|
|
41780
41833
|
] }),
|
|
41781
|
-
/* @__PURE__ */ (0,
|
|
41834
|
+
/* @__PURE__ */ (0, import_jsx_runtime28.jsxs)(Text, { color: "gray", children: [
|
|
41782
41835
|
"Remove: /memory remove ",
|
|
41783
41836
|
"<n>"
|
|
41784
41837
|
] }),
|
|
41785
|
-
/* @__PURE__ */ (0,
|
|
41838
|
+
/* @__PURE__ */ (0, import_jsx_runtime28.jsx)(Text, { color: "gray", children: "Clear: /memory clear" })
|
|
41786
41839
|
] })
|
|
41787
41840
|
]
|
|
41788
41841
|
}
|
|
@@ -41889,14 +41942,14 @@ var memoryCommand = {
|
|
|
41889
41942
|
}
|
|
41890
41943
|
return {
|
|
41891
41944
|
type: "render",
|
|
41892
|
-
element: /* @__PURE__ */ (0,
|
|
41945
|
+
element: /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(NoteListPanel, { notes, path: getMemoryPath() })
|
|
41893
41946
|
};
|
|
41894
41947
|
}
|
|
41895
41948
|
};
|
|
41896
41949
|
|
|
41897
41950
|
// src/agent/hooks.tsx
|
|
41898
41951
|
init_defaults();
|
|
41899
|
-
var
|
|
41952
|
+
var import_jsx_runtime29 = __toESM(require_jsx_runtime(), 1);
|
|
41900
41953
|
import { existsSync as existsSync12, readFileSync as readFileSync8, writeFileSync as writeFileSync5, mkdirSync as mkdirSync4 } from "node:fs";
|
|
41901
41954
|
import { join as join17, dirname as dirname9 } from "node:path";
|
|
41902
41955
|
function globalSettingsPath() {
|
|
@@ -41991,37 +42044,37 @@ function editHook(path9, event, index, newCommand2) {
|
|
|
41991
42044
|
writeHooks(path9, hooks);
|
|
41992
42045
|
return { ok: true };
|
|
41993
42046
|
}
|
|
41994
|
-
var HookRow = ({ index, entry }) => /* @__PURE__ */ (0,
|
|
41995
|
-
/* @__PURE__ */ (0,
|
|
42047
|
+
var HookRow = ({ index, entry }) => /* @__PURE__ */ (0, import_jsx_runtime29.jsxs)(Box_default, { flexDirection: "row", marginLeft: 2, children: [
|
|
42048
|
+
/* @__PURE__ */ (0, import_jsx_runtime29.jsx)(Box_default, { width: 4, children: /* @__PURE__ */ (0, import_jsx_runtime29.jsxs)(Text, { color: "gray", children: [
|
|
41996
42049
|
"[",
|
|
41997
42050
|
index,
|
|
41998
42051
|
"]"
|
|
41999
42052
|
] }) }),
|
|
42000
|
-
/* @__PURE__ */ (0,
|
|
42001
|
-
/* @__PURE__ */ (0,
|
|
42002
|
-
entry.description ? /* @__PURE__ */ (0,
|
|
42053
|
+
/* @__PURE__ */ (0, import_jsx_runtime29.jsx)(Box_default, { width: 3, children: /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(Text, { color: entry.enabled ? "green" : "gray", children: entry.enabled ? "on" : "off" }) }),
|
|
42054
|
+
/* @__PURE__ */ (0, import_jsx_runtime29.jsx)(Text, { color: entry.enabled ? "white" : "gray", children: entry.command }),
|
|
42055
|
+
entry.description ? /* @__PURE__ */ (0, import_jsx_runtime29.jsxs)(Text, { color: "gray", children: [
|
|
42003
42056
|
" # ",
|
|
42004
42057
|
entry.description
|
|
42005
42058
|
] }) : null
|
|
42006
42059
|
] });
|
|
42007
|
-
var EventSection = ({ event, entries }) => /* @__PURE__ */ (0,
|
|
42008
|
-
/* @__PURE__ */ (0,
|
|
42009
|
-
entries.length === 0 ? /* @__PURE__ */ (0,
|
|
42060
|
+
var EventSection = ({ event, entries }) => /* @__PURE__ */ (0, import_jsx_runtime29.jsxs)(Box_default, { flexDirection: "column", marginBottom: 1, children: [
|
|
42061
|
+
/* @__PURE__ */ (0, import_jsx_runtime29.jsx)(Text, { bold: true, color: "cyan", children: event }),
|
|
42062
|
+
entries.length === 0 ? /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(Text, { color: "gray", dimColor: true, children: " (no hooks)" }) : entries.map((e, i2) => /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(HookRow, { index: i2, entry: e }, i2))
|
|
42010
42063
|
] });
|
|
42011
42064
|
var ScopePanel = ({ scope, settingsPath: settingsPath2, hooks }) => {
|
|
42012
42065
|
const events = Object.keys(hooks);
|
|
42013
|
-
return /* @__PURE__ */ (0,
|
|
42014
|
-
/* @__PURE__ */ (0,
|
|
42015
|
-
/* @__PURE__ */ (0,
|
|
42066
|
+
return /* @__PURE__ */ (0, import_jsx_runtime29.jsxs)(Box_default, { flexDirection: "column", marginBottom: 1, children: [
|
|
42067
|
+
/* @__PURE__ */ (0, import_jsx_runtime29.jsxs)(Box_default, { children: [
|
|
42068
|
+
/* @__PURE__ */ (0, import_jsx_runtime29.jsxs)(Text, { bold: true, color: "magentaBright", children: [
|
|
42016
42069
|
scope === "global" ? "Global" : "Project",
|
|
42017
42070
|
" hooks"
|
|
42018
42071
|
] }),
|
|
42019
|
-
/* @__PURE__ */ (0,
|
|
42072
|
+
/* @__PURE__ */ (0, import_jsx_runtime29.jsxs)(Text, { color: "gray", children: [
|
|
42020
42073
|
" ",
|
|
42021
42074
|
settingsPath2
|
|
42022
42075
|
] })
|
|
42023
42076
|
] }),
|
|
42024
|
-
events.length === 0 ? /* @__PURE__ */ (0,
|
|
42077
|
+
events.length === 0 ? /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(Text, { color: "gray", dimColor: true, children: " (none defined)" }) : events.map((ev) => /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(EventSection, { event: ev, entries: hooks[ev] }, ev))
|
|
42025
42078
|
] });
|
|
42026
42079
|
};
|
|
42027
42080
|
var HooksPanel = ({
|
|
@@ -42030,7 +42083,7 @@ var HooksPanel = ({
|
|
|
42030
42083
|
globalHooks,
|
|
42031
42084
|
projectHooks,
|
|
42032
42085
|
onlyScope
|
|
42033
|
-
}) => /* @__PURE__ */ (0,
|
|
42086
|
+
}) => /* @__PURE__ */ (0, import_jsx_runtime29.jsxs)(
|
|
42034
42087
|
Box_default,
|
|
42035
42088
|
{
|
|
42036
42089
|
flexDirection: "column",
|
|
@@ -42039,13 +42092,13 @@ var HooksPanel = ({
|
|
|
42039
42092
|
paddingX: 1,
|
|
42040
42093
|
paddingY: 0,
|
|
42041
42094
|
children: [
|
|
42042
|
-
/* @__PURE__ */ (0,
|
|
42043
|
-
/* @__PURE__ */ (0,
|
|
42044
|
-
(!onlyScope || onlyScope === "global") && /* @__PURE__ */ (0,
|
|
42045
|
-
(!onlyScope || onlyScope === "project") && /* @__PURE__ */ (0,
|
|
42095
|
+
/* @__PURE__ */ (0, import_jsx_runtime29.jsx)(Text, { bold: true, color: "magentaBright", children: "Workflow hooks" }),
|
|
42096
|
+
/* @__PURE__ */ (0, import_jsx_runtime29.jsxs)(Box_default, { marginTop: 1, flexDirection: "column", children: [
|
|
42097
|
+
(!onlyScope || onlyScope === "global") && /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(ScopePanel, { scope: "global", settingsPath: globalPath, hooks: globalHooks }),
|
|
42098
|
+
(!onlyScope || onlyScope === "project") && /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(ScopePanel, { scope: "project", settingsPath: projectPath, hooks: projectHooks })
|
|
42046
42099
|
] }),
|
|
42047
|
-
/* @__PURE__ */ (0,
|
|
42048
|
-
/* @__PURE__ */ (0,
|
|
42100
|
+
/* @__PURE__ */ (0, import_jsx_runtime29.jsxs)(Box_default, { flexDirection: "column", marginTop: 1, children: [
|
|
42101
|
+
/* @__PURE__ */ (0, import_jsx_runtime29.jsxs)(Text, { color: "gray", children: [
|
|
42049
42102
|
"Add: /hooks add ",
|
|
42050
42103
|
"<global|project>",
|
|
42051
42104
|
" ",
|
|
@@ -42053,7 +42106,7 @@ var HooksPanel = ({
|
|
|
42053
42106
|
" ",
|
|
42054
42107
|
"<command>"
|
|
42055
42108
|
] }),
|
|
42056
|
-
/* @__PURE__ */ (0,
|
|
42109
|
+
/* @__PURE__ */ (0, import_jsx_runtime29.jsxs)(Text, { color: "gray", children: [
|
|
42057
42110
|
"Toggle: /hooks enable|disable ",
|
|
42058
42111
|
"<global|project>",
|
|
42059
42112
|
" ",
|
|
@@ -42061,7 +42114,7 @@ var HooksPanel = ({
|
|
|
42061
42114
|
" ",
|
|
42062
42115
|
"<n>"
|
|
42063
42116
|
] }),
|
|
42064
|
-
/* @__PURE__ */ (0,
|
|
42117
|
+
/* @__PURE__ */ (0, import_jsx_runtime29.jsxs)(Text, { color: "gray", children: [
|
|
42065
42118
|
"Edit: /hooks edit ",
|
|
42066
42119
|
"<global|project>",
|
|
42067
42120
|
" ",
|
|
@@ -42071,7 +42124,7 @@ var HooksPanel = ({
|
|
|
42071
42124
|
" ",
|
|
42072
42125
|
"<newcmd>"
|
|
42073
42126
|
] }),
|
|
42074
|
-
/* @__PURE__ */ (0,
|
|
42127
|
+
/* @__PURE__ */ (0, import_jsx_runtime29.jsxs)(Text, { color: "gray", children: [
|
|
42075
42128
|
"Remove: /hooks rm ",
|
|
42076
42129
|
"<global|project>",
|
|
42077
42130
|
" ",
|
|
@@ -42079,7 +42132,7 @@ var HooksPanel = ({
|
|
|
42079
42132
|
" ",
|
|
42080
42133
|
"<n>"
|
|
42081
42134
|
] }),
|
|
42082
|
-
/* @__PURE__ */ (0,
|
|
42135
|
+
/* @__PURE__ */ (0, import_jsx_runtime29.jsx)(Text, { color: "yellow", children: "Execution is opt-in \u2014 set KRYVEN_HOOKS=1 to run before_tool/after_tool/on_error hooks." })
|
|
42083
42136
|
] })
|
|
42084
42137
|
]
|
|
42085
42138
|
}
|
|
@@ -42110,7 +42163,7 @@ var hooksCommand = {
|
|
|
42110
42163
|
const projectHooks = readHooks(projectPath);
|
|
42111
42164
|
return {
|
|
42112
42165
|
type: "render",
|
|
42113
|
-
element: /* @__PURE__ */ (0,
|
|
42166
|
+
element: /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(
|
|
42114
42167
|
HooksPanel,
|
|
42115
42168
|
{
|
|
42116
42169
|
globalPath,
|
|
@@ -42300,7 +42353,7 @@ Saved to ${path9}`
|
|
|
42300
42353
|
|
|
42301
42354
|
// src/commands-palette/builtin/skill-test.tsx
|
|
42302
42355
|
init_messages();
|
|
42303
|
-
var
|
|
42356
|
+
var import_jsx_runtime30 = __toESM(require_jsx_runtime(), 1);
|
|
42304
42357
|
function makeMockCtx(real) {
|
|
42305
42358
|
const mockConv = new Conversation();
|
|
42306
42359
|
return {
|
|
@@ -42319,7 +42372,7 @@ function makeMockCtx(real) {
|
|
|
42319
42372
|
var SkillListPanel = () => {
|
|
42320
42373
|
const skills = listSkills();
|
|
42321
42374
|
if (skills.length === 0) {
|
|
42322
|
-
return /* @__PURE__ */ (0,
|
|
42375
|
+
return /* @__PURE__ */ (0, import_jsx_runtime30.jsxs)(
|
|
42323
42376
|
Box_default,
|
|
42324
42377
|
{
|
|
42325
42378
|
flexDirection: "column",
|
|
@@ -42327,14 +42380,14 @@ var SkillListPanel = () => {
|
|
|
42327
42380
|
borderColor: "magentaBright",
|
|
42328
42381
|
paddingX: 1,
|
|
42329
42382
|
children: [
|
|
42330
|
-
/* @__PURE__ */ (0,
|
|
42331
|
-
/* @__PURE__ */ (0,
|
|
42332
|
-
/* @__PURE__ */ (0,
|
|
42383
|
+
/* @__PURE__ */ (0, import_jsx_runtime30.jsx)(Text, { bold: true, color: "magentaBright", children: "skill-test" }),
|
|
42384
|
+
/* @__PURE__ */ (0, import_jsx_runtime30.jsx)(Text, { color: "gray", children: "No skills loaded." }),
|
|
42385
|
+
/* @__PURE__ */ (0, import_jsx_runtime30.jsx)(Text, { color: "gray", children: "Install one: `kryven skills install <url>` or drop a SKILL.md at .kryven/skills/<name>/SKILL.md" })
|
|
42333
42386
|
]
|
|
42334
42387
|
}
|
|
42335
42388
|
);
|
|
42336
42389
|
}
|
|
42337
|
-
return /* @__PURE__ */ (0,
|
|
42390
|
+
return /* @__PURE__ */ (0, import_jsx_runtime30.jsxs)(
|
|
42338
42391
|
Box_default,
|
|
42339
42392
|
{
|
|
42340
42393
|
flexDirection: "column",
|
|
@@ -42342,26 +42395,26 @@ var SkillListPanel = () => {
|
|
|
42342
42395
|
borderColor: "magentaBright",
|
|
42343
42396
|
paddingX: 1,
|
|
42344
42397
|
children: [
|
|
42345
|
-
/* @__PURE__ */ (0,
|
|
42398
|
+
/* @__PURE__ */ (0, import_jsx_runtime30.jsxs)(Text, { bold: true, color: "magentaBright", children: [
|
|
42346
42399
|
"skill-test \u2014 ",
|
|
42347
42400
|
skills.length,
|
|
42348
42401
|
" skill",
|
|
42349
42402
|
skills.length !== 1 ? "s" : "",
|
|
42350
42403
|
" loaded"
|
|
42351
42404
|
] }),
|
|
42352
|
-
skills.map((s) => /* @__PURE__ */ (0,
|
|
42353
|
-
/* @__PURE__ */ (0,
|
|
42354
|
-
/* @__PURE__ */ (0,
|
|
42355
|
-
/* @__PURE__ */ (0,
|
|
42405
|
+
skills.map((s) => /* @__PURE__ */ (0, import_jsx_runtime30.jsxs)(Box_default, { flexDirection: "column", marginTop: 0, children: [
|
|
42406
|
+
/* @__PURE__ */ (0, import_jsx_runtime30.jsxs)(Box_default, { children: [
|
|
42407
|
+
/* @__PURE__ */ (0, import_jsx_runtime30.jsx)(Box_default, { width: 28, children: /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(Text, { color: "cyan", children: s.name }) }),
|
|
42408
|
+
/* @__PURE__ */ (0, import_jsx_runtime30.jsx)(Text, { color: "gray", children: s.frontmatter.description ?? "(no description)" })
|
|
42356
42409
|
] }),
|
|
42357
|
-
/* @__PURE__ */ (0,
|
|
42410
|
+
/* @__PURE__ */ (0, import_jsx_runtime30.jsx)(Box_default, { paddingLeft: 2, children: /* @__PURE__ */ (0, import_jsx_runtime30.jsxs)(Text, { color: "gray", children: [
|
|
42358
42411
|
"scope=",
|
|
42359
42412
|
s.scope,
|
|
42360
42413
|
s.frontmatter["disable-model-invocation"] ? " [user-only]" : "",
|
|
42361
42414
|
s.frontmatter["allowed-tools"] ? ` tools=${s.frontmatter["allowed-tools"].join(",")}` : ""
|
|
42362
42415
|
] }) })
|
|
42363
42416
|
] }, s.name)),
|
|
42364
|
-
/* @__PURE__ */ (0,
|
|
42417
|
+
/* @__PURE__ */ (0, import_jsx_runtime30.jsx)(Box_default, { marginTop: 1, children: /* @__PURE__ */ (0, import_jsx_runtime30.jsxs)(Text, { color: "gray", children: [
|
|
42365
42418
|
"Run: /skill-test ",
|
|
42366
42419
|
"<name>",
|
|
42367
42420
|
" [args]"
|
|
@@ -42382,7 +42435,7 @@ var DryRunPanel = ({
|
|
|
42382
42435
|
const bodyLines = injectedBody.split("\n");
|
|
42383
42436
|
const previewLines = bodyLines.slice(0, 20);
|
|
42384
42437
|
const overflow = bodyLines.length - previewLines.length;
|
|
42385
|
-
return /* @__PURE__ */ (0,
|
|
42438
|
+
return /* @__PURE__ */ (0, import_jsx_runtime30.jsxs)(
|
|
42386
42439
|
Box_default,
|
|
42387
42440
|
{
|
|
42388
42441
|
flexDirection: "column",
|
|
@@ -42390,56 +42443,56 @@ var DryRunPanel = ({
|
|
|
42390
42443
|
borderColor: "magentaBright",
|
|
42391
42444
|
paddingX: 1,
|
|
42392
42445
|
children: [
|
|
42393
|
-
/* @__PURE__ */ (0,
|
|
42394
|
-
/* @__PURE__ */ (0,
|
|
42395
|
-
/* @__PURE__ */ (0,
|
|
42396
|
-
forwardedArgs ? /* @__PURE__ */ (0,
|
|
42446
|
+
/* @__PURE__ */ (0, import_jsx_runtime30.jsxs)(Box_default, { marginBottom: 1, children: [
|
|
42447
|
+
/* @__PURE__ */ (0, import_jsx_runtime30.jsx)(Text, { bold: true, color: "magentaBright", children: "skill-test: " }),
|
|
42448
|
+
/* @__PURE__ */ (0, import_jsx_runtime30.jsx)(Text, { bold: true, color: "cyan", children: skillName }),
|
|
42449
|
+
forwardedArgs ? /* @__PURE__ */ (0, import_jsx_runtime30.jsxs)(Text, { color: "gray", children: [
|
|
42397
42450
|
' "',
|
|
42398
42451
|
forwardedArgs,
|
|
42399
42452
|
'"'
|
|
42400
42453
|
] }) : null
|
|
42401
42454
|
] }),
|
|
42402
|
-
/* @__PURE__ */ (0,
|
|
42403
|
-
/* @__PURE__ */ (0,
|
|
42404
|
-
/* @__PURE__ */ (0,
|
|
42405
|
-
/* @__PURE__ */ (0,
|
|
42406
|
-
/* @__PURE__ */ (0,
|
|
42455
|
+
/* @__PURE__ */ (0, import_jsx_runtime30.jsxs)(Box_default, { flexDirection: "column", children: [
|
|
42456
|
+
/* @__PURE__ */ (0, import_jsx_runtime30.jsxs)(Box_default, { children: [
|
|
42457
|
+
/* @__PURE__ */ (0, import_jsx_runtime30.jsx)(Box_default, { width: 20, children: /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(Text, { color: "gray", children: "result.type" }) }),
|
|
42458
|
+
/* @__PURE__ */ (0, import_jsx_runtime30.jsx)(Text, { color: typeColor, bold: true, children: result.type }),
|
|
42459
|
+
/* @__PURE__ */ (0, import_jsx_runtime30.jsxs)(Text, { color: "gray", children: [
|
|
42407
42460
|
" (",
|
|
42408
42461
|
elapsedMs,
|
|
42409
42462
|
"ms)"
|
|
42410
42463
|
] })
|
|
42411
42464
|
] }),
|
|
42412
|
-
/* @__PURE__ */ (0,
|
|
42413
|
-
/* @__PURE__ */ (0,
|
|
42414
|
-
/* @__PURE__ */ (0,
|
|
42465
|
+
/* @__PURE__ */ (0, import_jsx_runtime30.jsxs)(Box_default, { children: [
|
|
42466
|
+
/* @__PURE__ */ (0, import_jsx_runtime30.jsx)(Box_default, { width: 20, children: /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(Text, { color: "gray", children: "mock msgs appended" }) }),
|
|
42467
|
+
/* @__PURE__ */ (0, import_jsx_runtime30.jsx)(Text, { children: mockMessages })
|
|
42415
42468
|
] })
|
|
42416
42469
|
] }),
|
|
42417
|
-
result.type === "ack" && result.message ? /* @__PURE__ */ (0,
|
|
42418
|
-
/* @__PURE__ */ (0,
|
|
42419
|
-
result.message.split("\n").map((line, i2) => /* @__PURE__ */ (0,
|
|
42470
|
+
result.type === "ack" && result.message ? /* @__PURE__ */ (0, import_jsx_runtime30.jsxs)(Box_default, { marginTop: 1, flexDirection: "column", children: [
|
|
42471
|
+
/* @__PURE__ */ (0, import_jsx_runtime30.jsx)(Text, { color: "gray", children: "ack message:" }),
|
|
42472
|
+
result.message.split("\n").map((line, i2) => /* @__PURE__ */ (0, import_jsx_runtime30.jsxs)(Text, { children: [
|
|
42420
42473
|
" ",
|
|
42421
42474
|
line
|
|
42422
42475
|
] }, i2))
|
|
42423
42476
|
] }) : null,
|
|
42424
|
-
result.type === "error" ? /* @__PURE__ */ (0,
|
|
42477
|
+
result.type === "error" ? /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(Box_default, { marginTop: 1, flexDirection: "column", children: /* @__PURE__ */ (0, import_jsx_runtime30.jsxs)(Text, { color: "red", children: [
|
|
42425
42478
|
"error: ",
|
|
42426
42479
|
result.message
|
|
42427
42480
|
] }) }) : null,
|
|
42428
|
-
result.type === "render" ? /* @__PURE__ */ (0,
|
|
42429
|
-
/* @__PURE__ */ (0,
|
|
42430
|
-
/* @__PURE__ */ (0,
|
|
42481
|
+
result.type === "render" ? /* @__PURE__ */ (0, import_jsx_runtime30.jsxs)(Box_default, { marginTop: 1, flexDirection: "column", children: [
|
|
42482
|
+
/* @__PURE__ */ (0, import_jsx_runtime30.jsx)(Text, { color: "cyan", children: "render element:" }),
|
|
42483
|
+
/* @__PURE__ */ (0, import_jsx_runtime30.jsx)(Box_default, { paddingLeft: 2, borderStyle: "single", borderColor: "gray", children: result.element })
|
|
42431
42484
|
] }) : null,
|
|
42432
|
-
result.type === "clear" ? /* @__PURE__ */ (0,
|
|
42433
|
-
result.type === "exit" ? /* @__PURE__ */ (0,
|
|
42434
|
-
/* @__PURE__ */ (0,
|
|
42435
|
-
/* @__PURE__ */ (0,
|
|
42485
|
+
result.type === "clear" ? /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(Box_default, { marginTop: 1, children: /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(Text, { color: "yellow", children: " (skill would clear the conversation)" }) }) : null,
|
|
42486
|
+
result.type === "exit" ? /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(Box_default, { marginTop: 1, children: /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(Text, { color: "yellow", children: " (skill would exit the CLI)" }) }) : null,
|
|
42487
|
+
/* @__PURE__ */ (0, import_jsx_runtime30.jsxs)(Box_default, { marginTop: 1, flexDirection: "column", children: [
|
|
42488
|
+
/* @__PURE__ */ (0, import_jsx_runtime30.jsxs)(Text, { color: "gray", children: [
|
|
42436
42489
|
"body preview (",
|
|
42437
42490
|
bodyLines.length,
|
|
42438
42491
|
" line",
|
|
42439
42492
|
bodyLines.length !== 1 ? "s" : "",
|
|
42440
42493
|
"):"
|
|
42441
42494
|
] }),
|
|
42442
|
-
/* @__PURE__ */ (0,
|
|
42495
|
+
/* @__PURE__ */ (0, import_jsx_runtime30.jsxs)(
|
|
42443
42496
|
Box_default,
|
|
42444
42497
|
{
|
|
42445
42498
|
flexDirection: "column",
|
|
@@ -42447,8 +42500,8 @@ var DryRunPanel = ({
|
|
|
42447
42500
|
borderStyle: "single",
|
|
42448
42501
|
borderColor: "gray",
|
|
42449
42502
|
children: [
|
|
42450
|
-
previewLines.map((line, i2) => /* @__PURE__ */ (0,
|
|
42451
|
-
overflow > 0 ? /* @__PURE__ */ (0,
|
|
42503
|
+
previewLines.map((line, i2) => /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(Text, { color: "white", children: line.length > 120 ? line.slice(0, 120) + " \u2026" : line || " " }, i2)),
|
|
42504
|
+
overflow > 0 ? /* @__PURE__ */ (0, import_jsx_runtime30.jsxs)(Text, { color: "gray", dimColor: true, children: [
|
|
42452
42505
|
"\u2026 ",
|
|
42453
42506
|
overflow,
|
|
42454
42507
|
" more line",
|
|
@@ -42458,7 +42511,7 @@ var DryRunPanel = ({
|
|
|
42458
42511
|
}
|
|
42459
42512
|
)
|
|
42460
42513
|
] }),
|
|
42461
|
-
/* @__PURE__ */ (0,
|
|
42514
|
+
/* @__PURE__ */ (0, import_jsx_runtime30.jsx)(Box_default, { marginTop: 1, children: /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(Text, { color: "gray", dimColor: true, children: "(mock context \u2014 live conversation unchanged)" }) })
|
|
42462
42515
|
]
|
|
42463
42516
|
}
|
|
42464
42517
|
);
|
|
@@ -42470,7 +42523,7 @@ var skillTestCommand = {
|
|
|
42470
42523
|
run: async (args, ctx) => {
|
|
42471
42524
|
const trimmed = args.trim();
|
|
42472
42525
|
if (!trimmed) {
|
|
42473
|
-
return { type: "render", element: /* @__PURE__ */ (0,
|
|
42526
|
+
return { type: "render", element: /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(SkillListPanel, {}) };
|
|
42474
42527
|
}
|
|
42475
42528
|
const [name, ...rest] = trimmed.split(/\s+/);
|
|
42476
42529
|
if (!name) {
|
|
@@ -42516,7 +42569,7 @@ ${argText}`.trim();
|
|
|
42516
42569
|
const mockMessages = mockCtx.conversation.size();
|
|
42517
42570
|
return {
|
|
42518
42571
|
type: "render",
|
|
42519
|
-
element: /* @__PURE__ */ (0,
|
|
42572
|
+
element: /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(
|
|
42520
42573
|
DryRunPanel,
|
|
42521
42574
|
{
|
|
42522
42575
|
skillName: name,
|
|
@@ -42532,7 +42585,7 @@ ${argText}`.trim();
|
|
|
42532
42585
|
};
|
|
42533
42586
|
|
|
42534
42587
|
// src/commands-palette/builtin/metrics.tsx
|
|
42535
|
-
var
|
|
42588
|
+
var import_jsx_runtime31 = __toESM(require_jsx_runtime(), 1);
|
|
42536
42589
|
function computeMetrics(messages) {
|
|
42537
42590
|
let modelCalls = 0;
|
|
42538
42591
|
let toolCalls = 0;
|
|
@@ -42572,39 +42625,39 @@ var MetricsPanel = ({ ctx }) => {
|
|
|
42572
42625
|
const rows = [
|
|
42573
42626
|
[
|
|
42574
42627
|
"Model calls",
|
|
42575
|
-
/* @__PURE__ */ (0,
|
|
42628
|
+
/* @__PURE__ */ (0, import_jsx_runtime31.jsx)(Text, { children: /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(Text, { color: "magentaBright", children: m.modelCalls }) }, "mc")
|
|
42576
42629
|
],
|
|
42577
42630
|
[
|
|
42578
42631
|
"Tool calls",
|
|
42579
|
-
/* @__PURE__ */ (0,
|
|
42632
|
+
/* @__PURE__ */ (0, import_jsx_runtime31.jsx)(Text, { children: /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(Text, { color: "magentaBright", children: m.toolCalls }) }, "tc")
|
|
42580
42633
|
],
|
|
42581
42634
|
[
|
|
42582
42635
|
"Loop iterations",
|
|
42583
|
-
/* @__PURE__ */ (0,
|
|
42584
|
-
/* @__PURE__ */ (0,
|
|
42585
|
-
/* @__PURE__ */ (0,
|
|
42636
|
+
/* @__PURE__ */ (0, import_jsx_runtime31.jsxs)(Text, { children: [
|
|
42637
|
+
/* @__PURE__ */ (0, import_jsx_runtime31.jsx)(Text, { color: "magentaBright", children: m.loopIterations }),
|
|
42638
|
+
/* @__PURE__ */ (0, import_jsx_runtime31.jsx)(Text, { color: "gray", children: " (1 per model call)" })
|
|
42586
42639
|
] }, "li")
|
|
42587
42640
|
],
|
|
42588
42641
|
[
|
|
42589
42642
|
"Avg latency",
|
|
42590
|
-
/* @__PURE__ */ (0,
|
|
42591
|
-
/* @__PURE__ */ (0,
|
|
42592
|
-
m.avgLatencyMs !== null && /* @__PURE__ */ (0,
|
|
42643
|
+
/* @__PURE__ */ (0, import_jsx_runtime31.jsxs)(Text, { children: [
|
|
42644
|
+
/* @__PURE__ */ (0, import_jsx_runtime31.jsx)(Text, { color: m.avgLatencyMs === null ? "gray" : "cyan", children: fmtLatency(m.avgLatencyMs) }),
|
|
42645
|
+
m.avgLatencyMs !== null && /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(Text, { color: "gray", children: " per turn" })
|
|
42593
42646
|
] }, "lat")
|
|
42594
42647
|
],
|
|
42595
42648
|
[
|
|
42596
42649
|
"Messages",
|
|
42597
|
-
/* @__PURE__ */ (0,
|
|
42598
|
-
/* @__PURE__ */ (0,
|
|
42599
|
-
/* @__PURE__ */ (0,
|
|
42650
|
+
/* @__PURE__ */ (0, import_jsx_runtime31.jsxs)(Text, { children: [
|
|
42651
|
+
/* @__PURE__ */ (0, import_jsx_runtime31.jsx)(Text, { color: "magentaBright", children: ctx.sessionMessages }),
|
|
42652
|
+
/* @__PURE__ */ (0, import_jsx_runtime31.jsx)(Text, { color: "gray", children: " total (incl. tool results)" })
|
|
42600
42653
|
] }, "msgs")
|
|
42601
42654
|
],
|
|
42602
42655
|
[
|
|
42603
42656
|
"Session tokens",
|
|
42604
|
-
/* @__PURE__ */ (0,
|
|
42657
|
+
/* @__PURE__ */ (0, import_jsx_runtime31.jsx)(Text, { children: /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(Text, { color: "magentaBright", children: ctx.sessionTokens.toLocaleString() }) }, "tok")
|
|
42605
42658
|
]
|
|
42606
42659
|
];
|
|
42607
|
-
return /* @__PURE__ */ (0,
|
|
42660
|
+
return /* @__PURE__ */ (0, import_jsx_runtime31.jsxs)(
|
|
42608
42661
|
Box_default,
|
|
42609
42662
|
{
|
|
42610
42663
|
flexDirection: "column",
|
|
@@ -42612,12 +42665,12 @@ var MetricsPanel = ({ ctx }) => {
|
|
|
42612
42665
|
borderColor: "magenta",
|
|
42613
42666
|
paddingX: 1,
|
|
42614
42667
|
children: [
|
|
42615
|
-
/* @__PURE__ */ (0,
|
|
42616
|
-
/* @__PURE__ */ (0,
|
|
42617
|
-
/* @__PURE__ */ (0,
|
|
42668
|
+
/* @__PURE__ */ (0, import_jsx_runtime31.jsx)(Text, { bold: true, color: "magentaBright", children: "Session metrics" }),
|
|
42669
|
+
/* @__PURE__ */ (0, import_jsx_runtime31.jsx)(Box_default, { marginTop: 1, flexDirection: "column", children: rows.map(([label, value]) => /* @__PURE__ */ (0, import_jsx_runtime31.jsxs)(Box_default, { children: [
|
|
42670
|
+
/* @__PURE__ */ (0, import_jsx_runtime31.jsx)(Box_default, { width: 18, children: /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(Text, { color: "gray", children: label }) }),
|
|
42618
42671
|
value
|
|
42619
42672
|
] }, label)) }),
|
|
42620
|
-
/* @__PURE__ */ (0,
|
|
42673
|
+
/* @__PURE__ */ (0, import_jsx_runtime31.jsx)(Box_default, { marginTop: 1, children: /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(Text, { color: "gray", children: "Latency = user-message \u2192 first assistant-turn ts delta." }) })
|
|
42621
42674
|
]
|
|
42622
42675
|
}
|
|
42623
42676
|
);
|
|
@@ -42627,7 +42680,7 @@ var metricsCommand = {
|
|
|
42627
42680
|
description: "Show session metrics: model calls, tool calls, loop iterations, avg latency",
|
|
42628
42681
|
run: (_args, ctx) => ({
|
|
42629
42682
|
type: "render",
|
|
42630
|
-
element: /* @__PURE__ */ (0,
|
|
42683
|
+
element: /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(MetricsPanel, { ctx })
|
|
42631
42684
|
})
|
|
42632
42685
|
};
|
|
42633
42686
|
|
|
@@ -42832,25 +42885,25 @@ var MCPClient = class {
|
|
|
42832
42885
|
};
|
|
42833
42886
|
|
|
42834
42887
|
// src/mcp/index.tsx
|
|
42835
|
-
var
|
|
42888
|
+
var import_jsx_runtime32 = __toESM(require_jsx_runtime(), 1);
|
|
42836
42889
|
var ServerRow = ({ server, scope }) => {
|
|
42837
42890
|
const enabled = server.enabled !== false;
|
|
42838
42891
|
const statusColor = enabled ? "green" : "gray";
|
|
42839
42892
|
const statusText = enabled ? "on " : "off";
|
|
42840
42893
|
const scopeTag2 = scope === "project" ? " [project]" : "";
|
|
42841
42894
|
const authTag = server.authHeader ? " [auth]" : "";
|
|
42842
|
-
return /* @__PURE__ */ (0,
|
|
42843
|
-
/* @__PURE__ */ (0,
|
|
42844
|
-
/* @__PURE__ */ (0,
|
|
42845
|
-
/* @__PURE__ */ (0,
|
|
42846
|
-
/* @__PURE__ */ (0,
|
|
42847
|
-
/* @__PURE__ */ (0,
|
|
42848
|
-
/* @__PURE__ */ (0,
|
|
42895
|
+
return /* @__PURE__ */ (0, import_jsx_runtime32.jsxs)(Box_default, { flexDirection: "column", marginBottom: 0, children: [
|
|
42896
|
+
/* @__PURE__ */ (0, import_jsx_runtime32.jsxs)(Box_default, { children: [
|
|
42897
|
+
/* @__PURE__ */ (0, import_jsx_runtime32.jsx)(Box_default, { width: 3, children: /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(Text, { color: statusColor, children: statusText }) }),
|
|
42898
|
+
/* @__PURE__ */ (0, import_jsx_runtime32.jsx)(Box_default, { width: 18, children: /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(Text, { color: "magentaBright", bold: true, children: server.id }) }),
|
|
42899
|
+
/* @__PURE__ */ (0, import_jsx_runtime32.jsx)(Text, { color: "gray", children: server.url }),
|
|
42900
|
+
/* @__PURE__ */ (0, import_jsx_runtime32.jsx)(Text, { color: "cyan", children: scopeTag2 }),
|
|
42901
|
+
/* @__PURE__ */ (0, import_jsx_runtime32.jsx)(Text, { color: "yellow", children: authTag })
|
|
42849
42902
|
] }),
|
|
42850
|
-
server.label ? /* @__PURE__ */ (0,
|
|
42903
|
+
server.label ? /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(Box_default, { paddingLeft: 21, children: /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(Text, { color: "gray", children: server.label }) }) : null
|
|
42851
42904
|
] });
|
|
42852
42905
|
};
|
|
42853
|
-
var ListPanel = ({ servers }) => /* @__PURE__ */ (0,
|
|
42906
|
+
var ListPanel = ({ servers }) => /* @__PURE__ */ (0, import_jsx_runtime32.jsxs)(
|
|
42854
42907
|
Box_default,
|
|
42855
42908
|
{
|
|
42856
42909
|
flexDirection: "column",
|
|
@@ -42858,35 +42911,35 @@ var ListPanel = ({ servers }) => /* @__PURE__ */ (0, import_jsx_runtime31.jsxs)(
|
|
|
42858
42911
|
borderColor: "magentaBright",
|
|
42859
42912
|
paddingX: 1,
|
|
42860
42913
|
children: [
|
|
42861
|
-
/* @__PURE__ */ (0,
|
|
42914
|
+
/* @__PURE__ */ (0, import_jsx_runtime32.jsxs)(Text, { bold: true, color: "magentaBright", children: [
|
|
42862
42915
|
"MCP servers (",
|
|
42863
42916
|
servers.length,
|
|
42864
42917
|
")"
|
|
42865
42918
|
] }),
|
|
42866
|
-
servers.length === 0 ? /* @__PURE__ */ (0,
|
|
42919
|
+
servers.length === 0 ? /* @__PURE__ */ (0, import_jsx_runtime32.jsxs)(Text, { color: "gray", children: [
|
|
42867
42920
|
"No servers registered. Add one with /mcp add ",
|
|
42868
42921
|
"<id> <url>",
|
|
42869
42922
|
"."
|
|
42870
|
-
] }) : servers.map((s) => /* @__PURE__ */ (0,
|
|
42871
|
-
/* @__PURE__ */ (0,
|
|
42872
|
-
/* @__PURE__ */ (0,
|
|
42873
|
-
/* @__PURE__ */ (0,
|
|
42923
|
+
] }) : servers.map((s) => /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(ServerRow, { server: s }, s.id)),
|
|
42924
|
+
/* @__PURE__ */ (0, import_jsx_runtime32.jsxs)(Box_default, { flexDirection: "column", marginTop: 1, children: [
|
|
42925
|
+
/* @__PURE__ */ (0, import_jsx_runtime32.jsx)(Text, { color: "gray", children: "Manage: /mcp add|remove|enable|disable|auth|tools" }),
|
|
42926
|
+
/* @__PURE__ */ (0, import_jsx_runtime32.jsx)(Text, { color: "gray", children: "Config: ~/.kryven/mcp.json \xB7 project overlay: .kryven/mcp.json" })
|
|
42874
42927
|
] })
|
|
42875
42928
|
]
|
|
42876
42929
|
}
|
|
42877
42930
|
);
|
|
42878
|
-
var ToolsRow = ({ tool, serverId }) => /* @__PURE__ */ (0,
|
|
42879
|
-
/* @__PURE__ */ (0,
|
|
42931
|
+
var ToolsRow = ({ tool, serverId }) => /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(Box_default, { flexDirection: "column", marginBottom: 0, children: /* @__PURE__ */ (0, import_jsx_runtime32.jsxs)(Box_default, { children: [
|
|
42932
|
+
/* @__PURE__ */ (0, import_jsx_runtime32.jsx)(Box_default, { width: 20, children: /* @__PURE__ */ (0, import_jsx_runtime32.jsxs)(Text, { color: "cyan", children: [
|
|
42880
42933
|
"mcp:",
|
|
42881
42934
|
serverId,
|
|
42882
42935
|
".",
|
|
42883
42936
|
tool.name
|
|
42884
42937
|
] }) }),
|
|
42885
|
-
tool.description ? /* @__PURE__ */ (0,
|
|
42938
|
+
tool.description ? /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(Text, { color: "gray", children: tool.description }) : null
|
|
42886
42939
|
] }) });
|
|
42887
42940
|
var ToolsPanel = ({ results }) => {
|
|
42888
42941
|
const total = results.reduce((n2, r) => n2 + r.tools.length, 0);
|
|
42889
|
-
return /* @__PURE__ */ (0,
|
|
42942
|
+
return /* @__PURE__ */ (0, import_jsx_runtime32.jsxs)(
|
|
42890
42943
|
Box_default,
|
|
42891
42944
|
{
|
|
42892
42945
|
flexDirection: "column",
|
|
@@ -42894,7 +42947,7 @@ var ToolsPanel = ({ results }) => {
|
|
|
42894
42947
|
borderColor: "cyan",
|
|
42895
42948
|
paddingX: 1,
|
|
42896
42949
|
children: [
|
|
42897
|
-
/* @__PURE__ */ (0,
|
|
42950
|
+
/* @__PURE__ */ (0, import_jsx_runtime32.jsxs)(Text, { bold: true, color: "cyan", children: [
|
|
42898
42951
|
"MCP tools (",
|
|
42899
42952
|
total,
|
|
42900
42953
|
" across ",
|
|
@@ -42903,15 +42956,15 @@ var ToolsPanel = ({ results }) => {
|
|
|
42903
42956
|
results.length !== 1 ? "s" : "",
|
|
42904
42957
|
")"
|
|
42905
42958
|
] }),
|
|
42906
|
-
results.map((r) => /* @__PURE__ */ (0,
|
|
42907
|
-
/* @__PURE__ */ (0,
|
|
42959
|
+
results.map((r) => /* @__PURE__ */ (0, import_jsx_runtime32.jsxs)(Box_default, { flexDirection: "column", marginTop: 1, children: [
|
|
42960
|
+
/* @__PURE__ */ (0, import_jsx_runtime32.jsxs)(Text, { color: "magentaBright", bold: true, children: [
|
|
42908
42961
|
r.server.id,
|
|
42909
42962
|
r.server.label ? ` \u2014 ${r.server.label}` : ""
|
|
42910
42963
|
] }),
|
|
42911
|
-
r.error ? /* @__PURE__ */ (0,
|
|
42964
|
+
r.error ? /* @__PURE__ */ (0, import_jsx_runtime32.jsxs)(Text, { color: "red", children: [
|
|
42912
42965
|
" Error: ",
|
|
42913
42966
|
r.error
|
|
42914
|
-
] }) : r.tools.length === 0 ? /* @__PURE__ */ (0,
|
|
42967
|
+
] }) : r.tools.length === 0 ? /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(Text, { color: "gray", children: " (no tools discovered)" }) : r.tools.map((t) => /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(ToolsRow, { tool: t, serverId: r.server.id }, t.name))
|
|
42915
42968
|
] }, r.server.id))
|
|
42916
42969
|
]
|
|
42917
42970
|
}
|
|
@@ -42953,7 +43006,7 @@ var mcpCommand = {
|
|
|
42953
43006
|
const servers = await resolveEffectiveServers(ctx.cwd);
|
|
42954
43007
|
return {
|
|
42955
43008
|
type: "render",
|
|
42956
|
-
element: /* @__PURE__ */ (0,
|
|
43009
|
+
element: /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(ListPanel, { servers })
|
|
42957
43010
|
};
|
|
42958
43011
|
}
|
|
42959
43012
|
if (sub === "add") {
|
|
@@ -43043,7 +43096,7 @@ The token is stored as "Bearer <token>" in ~/.kryven/mcp.json.`
|
|
|
43043
43096
|
const results = await discoverToolsForServers(targets);
|
|
43044
43097
|
return {
|
|
43045
43098
|
type: "render",
|
|
43046
|
-
element: /* @__PURE__ */ (0,
|
|
43099
|
+
element: /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(ToolsPanel, { results })
|
|
43047
43100
|
};
|
|
43048
43101
|
}
|
|
43049
43102
|
return {
|
|
@@ -43061,7 +43114,7 @@ The token is stored as "Bearer <token>" in ~/.kryven/mcp.json.`
|
|
|
43061
43114
|
};
|
|
43062
43115
|
|
|
43063
43116
|
// src/tui/EconomicsLine.tsx
|
|
43064
|
-
var
|
|
43117
|
+
var import_jsx_runtime33 = __toESM(require_jsx_runtime(), 1);
|
|
43065
43118
|
function fmtTokens(n2) {
|
|
43066
43119
|
if (n2 < 1e3) return String(n2);
|
|
43067
43120
|
if (n2 < 1e6) return (n2 / 1e3).toFixed(1) + "k";
|
|
@@ -43100,58 +43153,58 @@ var EconomicsLine = ({
|
|
|
43100
43153
|
const credits = creditsFromTokens(displayCharged);
|
|
43101
43154
|
const hasTurnData = stats.turnCount > 0;
|
|
43102
43155
|
if (compact) {
|
|
43103
|
-
return /* @__PURE__ */ (0,
|
|
43104
|
-
/* @__PURE__ */ (0,
|
|
43156
|
+
return /* @__PURE__ */ (0, import_jsx_runtime33.jsxs)(Box_default, { children: [
|
|
43157
|
+
/* @__PURE__ */ (0, import_jsx_runtime33.jsxs)(Text, { color: "magenta", children: [
|
|
43105
43158
|
fmtTokens(displayCharged),
|
|
43106
43159
|
" tok"
|
|
43107
43160
|
] }),
|
|
43108
|
-
hasTurnData && /* @__PURE__ */ (0,
|
|
43109
|
-
/* @__PURE__ */ (0,
|
|
43110
|
-
/* @__PURE__ */ (0,
|
|
43161
|
+
hasTurnData && /* @__PURE__ */ (0, import_jsx_runtime33.jsxs)(import_jsx_runtime33.Fragment, { children: [
|
|
43162
|
+
/* @__PURE__ */ (0, import_jsx_runtime33.jsx)(Text, { color: "gray", children: " \xB7 " }),
|
|
43163
|
+
/* @__PURE__ */ (0, import_jsx_runtime33.jsxs)(Text, { color: "magentaBright", children: [
|
|
43111
43164
|
credits,
|
|
43112
43165
|
" cr"
|
|
43113
43166
|
] })
|
|
43114
43167
|
] }),
|
|
43115
|
-
hasTurnData && stats.tier && /* @__PURE__ */ (0,
|
|
43116
|
-
/* @__PURE__ */ (0,
|
|
43117
|
-
/* @__PURE__ */ (0,
|
|
43168
|
+
hasTurnData && stats.tier && /* @__PURE__ */ (0, import_jsx_runtime33.jsxs)(import_jsx_runtime33.Fragment, { children: [
|
|
43169
|
+
/* @__PURE__ */ (0, import_jsx_runtime33.jsx)(Text, { color: "gray", children: " \xB7 " }),
|
|
43170
|
+
/* @__PURE__ */ (0, import_jsx_runtime33.jsx)(Text, { color: "gray", children: stats.tier })
|
|
43118
43171
|
] })
|
|
43119
43172
|
] });
|
|
43120
43173
|
}
|
|
43121
|
-
return /* @__PURE__ */ (0,
|
|
43122
|
-
/* @__PURE__ */ (0,
|
|
43123
|
-
/* @__PURE__ */ (0,
|
|
43124
|
-
/* @__PURE__ */ (0,
|
|
43125
|
-
/* @__PURE__ */ (0,
|
|
43174
|
+
return /* @__PURE__ */ (0, import_jsx_runtime33.jsxs)(Box_default, { paddingX: 1, borderStyle: "single", borderColor: "gray", flexDirection: "row", flexWrap: "wrap", children: [
|
|
43175
|
+
/* @__PURE__ */ (0, import_jsx_runtime33.jsxs)(Box_default, { marginRight: 2, children: [
|
|
43176
|
+
/* @__PURE__ */ (0, import_jsx_runtime33.jsx)(Text, { color: "gray", children: "session: " }),
|
|
43177
|
+
/* @__PURE__ */ (0, import_jsx_runtime33.jsx)(Text, { color: "magentaBright", bold: true, children: fmtTokens(displayCharged) }),
|
|
43178
|
+
/* @__PURE__ */ (0, import_jsx_runtime33.jsx)(Text, { color: "gray", children: " tok" })
|
|
43126
43179
|
] }),
|
|
43127
|
-
hasTurnData && /* @__PURE__ */ (0,
|
|
43128
|
-
/* @__PURE__ */ (0,
|
|
43129
|
-
/* @__PURE__ */ (0,
|
|
43130
|
-
/* @__PURE__ */ (0,
|
|
43180
|
+
hasTurnData && /* @__PURE__ */ (0, import_jsx_runtime33.jsxs)(import_jsx_runtime33.Fragment, { children: [
|
|
43181
|
+
/* @__PURE__ */ (0, import_jsx_runtime33.jsxs)(Box_default, { marginRight: 2, children: [
|
|
43182
|
+
/* @__PURE__ */ (0, import_jsx_runtime33.jsx)(Text, { color: "gray", children: "in: " }),
|
|
43183
|
+
/* @__PURE__ */ (0, import_jsx_runtime33.jsx)(Text, { color: "cyan", children: fmtTokens(stats.promptTokens) })
|
|
43131
43184
|
] }),
|
|
43132
|
-
/* @__PURE__ */ (0,
|
|
43133
|
-
/* @__PURE__ */ (0,
|
|
43134
|
-
/* @__PURE__ */ (0,
|
|
43185
|
+
/* @__PURE__ */ (0, import_jsx_runtime33.jsxs)(Box_default, { marginRight: 2, children: [
|
|
43186
|
+
/* @__PURE__ */ (0, import_jsx_runtime33.jsx)(Text, { color: "gray", children: "out: " }),
|
|
43187
|
+
/* @__PURE__ */ (0, import_jsx_runtime33.jsx)(Text, { color: "green", children: fmtTokens(stats.completionTokens) })
|
|
43135
43188
|
] }),
|
|
43136
|
-
/* @__PURE__ */ (0,
|
|
43137
|
-
/* @__PURE__ */ (0,
|
|
43138
|
-
/* @__PURE__ */ (0,
|
|
43189
|
+
/* @__PURE__ */ (0, import_jsx_runtime33.jsxs)(Box_default, { marginRight: 2, children: [
|
|
43190
|
+
/* @__PURE__ */ (0, import_jsx_runtime33.jsx)(Text, { color: "gray", children: "turns: " }),
|
|
43191
|
+
/* @__PURE__ */ (0, import_jsx_runtime33.jsx)(Text, { color: "white", children: stats.turnCount })
|
|
43139
43192
|
] }),
|
|
43140
|
-
/* @__PURE__ */ (0,
|
|
43141
|
-
/* @__PURE__ */ (0,
|
|
43142
|
-
/* @__PURE__ */ (0,
|
|
43193
|
+
/* @__PURE__ */ (0, import_jsx_runtime33.jsxs)(Box_default, { marginRight: 2, children: [
|
|
43194
|
+
/* @__PURE__ */ (0, import_jsx_runtime33.jsx)(Text, { color: "gray", children: "credits: " }),
|
|
43195
|
+
/* @__PURE__ */ (0, import_jsx_runtime33.jsx)(Text, { color: "magenta", children: credits })
|
|
43143
43196
|
] })
|
|
43144
43197
|
] }),
|
|
43145
|
-
stats.tier && /* @__PURE__ */ (0,
|
|
43146
|
-
/* @__PURE__ */ (0,
|
|
43147
|
-
/* @__PURE__ */ (0,
|
|
43198
|
+
stats.tier && /* @__PURE__ */ (0, import_jsx_runtime33.jsxs)(Box_default, { children: [
|
|
43199
|
+
/* @__PURE__ */ (0, import_jsx_runtime33.jsx)(Text, { color: "gray", children: "plan: " }),
|
|
43200
|
+
/* @__PURE__ */ (0, import_jsx_runtime33.jsx)(Text, { color: "yellow", children: stats.tier })
|
|
43148
43201
|
] }),
|
|
43149
|
-
!hasTurnData && displayCharged === 0 && /* @__PURE__ */ (0,
|
|
43202
|
+
!hasTurnData && displayCharged === 0 && /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(Text, { color: "gray", children: "no usage recorded yet" })
|
|
43150
43203
|
] });
|
|
43151
43204
|
};
|
|
43152
43205
|
|
|
43153
43206
|
// src/commands-palette/builtin/usage.tsx
|
|
43154
|
-
var
|
|
43207
|
+
var import_jsx_runtime34 = __toESM(require_jsx_runtime(), 1);
|
|
43155
43208
|
function displayName(model) {
|
|
43156
43209
|
const lower = model.toLowerCase();
|
|
43157
43210
|
if (lower.includes("extended")) return "KRY-5.2 Extended";
|
|
@@ -43184,9 +43237,9 @@ var UsagePanel = ({ ctx }) => {
|
|
|
43184
43237
|
const messages = ctx.conversation.all();
|
|
43185
43238
|
const modelBuckets = buildModelBuckets(messages);
|
|
43186
43239
|
const hasBreakdown = modelBuckets.size > 0;
|
|
43187
|
-
return /* @__PURE__ */ (0,
|
|
43188
|
-
/* @__PURE__ */ (0,
|
|
43189
|
-
/* @__PURE__ */ (0,
|
|
43240
|
+
return /* @__PURE__ */ (0, import_jsx_runtime34.jsxs)(Box_default, { flexDirection: "column", children: [
|
|
43241
|
+
/* @__PURE__ */ (0, import_jsx_runtime34.jsx)(Box_default, { paddingX: 1, children: /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(Text, { bold: true, color: "magentaBright", children: "/usage \u2014 session budget & token breakdown" }) }),
|
|
43242
|
+
/* @__PURE__ */ (0, import_jsx_runtime34.jsx)(
|
|
43190
43243
|
EconomicsLine,
|
|
43191
43244
|
{
|
|
43192
43245
|
sessionTokens: ctx.sessionTokens,
|
|
@@ -43194,7 +43247,7 @@ var UsagePanel = ({ ctx }) => {
|
|
|
43194
43247
|
compact: false
|
|
43195
43248
|
}
|
|
43196
43249
|
),
|
|
43197
|
-
hasBreakdown && /* @__PURE__ */ (0,
|
|
43250
|
+
hasBreakdown && /* @__PURE__ */ (0, import_jsx_runtime34.jsxs)(
|
|
43198
43251
|
Box_default,
|
|
43199
43252
|
{
|
|
43200
43253
|
flexDirection: "column",
|
|
@@ -43203,38 +43256,38 @@ var UsagePanel = ({ ctx }) => {
|
|
|
43203
43256
|
paddingX: 1,
|
|
43204
43257
|
marginTop: 1,
|
|
43205
43258
|
children: [
|
|
43206
|
-
/* @__PURE__ */ (0,
|
|
43207
|
-
Array.from(modelBuckets.entries()).map(([tier, bucket]) => /* @__PURE__ */ (0,
|
|
43208
|
-
/* @__PURE__ */ (0,
|
|
43209
|
-
/* @__PURE__ */ (0,
|
|
43210
|
-
/* @__PURE__ */ (0,
|
|
43211
|
-
/* @__PURE__ */ (0,
|
|
43259
|
+
/* @__PURE__ */ (0, import_jsx_runtime34.jsx)(Text, { bold: true, color: "magenta", children: "Per-model breakdown" }),
|
|
43260
|
+
Array.from(modelBuckets.entries()).map(([tier, bucket]) => /* @__PURE__ */ (0, import_jsx_runtime34.jsxs)(Box_default, { flexDirection: "row", flexWrap: "wrap", children: [
|
|
43261
|
+
/* @__PURE__ */ (0, import_jsx_runtime34.jsx)(Box_default, { width: 22, children: /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(Text, { color: "cyan", children: displayName(tier) }) }),
|
|
43262
|
+
/* @__PURE__ */ (0, import_jsx_runtime34.jsxs)(Box_default, { marginRight: 2, children: [
|
|
43263
|
+
/* @__PURE__ */ (0, import_jsx_runtime34.jsx)(Text, { color: "gray", children: "turns: " }),
|
|
43264
|
+
/* @__PURE__ */ (0, import_jsx_runtime34.jsx)(Text, { color: "white", children: bucket.turns })
|
|
43212
43265
|
] }),
|
|
43213
|
-
/* @__PURE__ */ (0,
|
|
43214
|
-
/* @__PURE__ */ (0,
|
|
43215
|
-
/* @__PURE__ */ (0,
|
|
43266
|
+
/* @__PURE__ */ (0, import_jsx_runtime34.jsxs)(Box_default, { marginRight: 2, children: [
|
|
43267
|
+
/* @__PURE__ */ (0, import_jsx_runtime34.jsx)(Text, { color: "gray", children: "in: " }),
|
|
43268
|
+
/* @__PURE__ */ (0, import_jsx_runtime34.jsx)(Text, { color: "cyan", children: fmtTokens2(bucket.promptTokens) })
|
|
43216
43269
|
] }),
|
|
43217
|
-
/* @__PURE__ */ (0,
|
|
43218
|
-
/* @__PURE__ */ (0,
|
|
43219
|
-
/* @__PURE__ */ (0,
|
|
43270
|
+
/* @__PURE__ */ (0, import_jsx_runtime34.jsxs)(Box_default, { marginRight: 2, children: [
|
|
43271
|
+
/* @__PURE__ */ (0, import_jsx_runtime34.jsx)(Text, { color: "gray", children: "out: " }),
|
|
43272
|
+
/* @__PURE__ */ (0, import_jsx_runtime34.jsx)(Text, { color: "green", children: fmtTokens2(bucket.completionTokens) })
|
|
43220
43273
|
] }),
|
|
43221
|
-
/* @__PURE__ */ (0,
|
|
43222
|
-
/* @__PURE__ */ (0,
|
|
43223
|
-
/* @__PURE__ */ (0,
|
|
43274
|
+
/* @__PURE__ */ (0, import_jsx_runtime34.jsxs)(Box_default, { children: [
|
|
43275
|
+
/* @__PURE__ */ (0, import_jsx_runtime34.jsx)(Text, { color: "gray", children: "charged: " }),
|
|
43276
|
+
/* @__PURE__ */ (0, import_jsx_runtime34.jsx)(Text, { color: "magentaBright", children: fmtTokens2(bucket.chargedTokens) })
|
|
43224
43277
|
] })
|
|
43225
43278
|
] }, tier))
|
|
43226
43279
|
]
|
|
43227
43280
|
}
|
|
43228
43281
|
),
|
|
43229
|
-
/* @__PURE__ */ (0,
|
|
43282
|
+
/* @__PURE__ */ (0, import_jsx_runtime34.jsx)(Box_default, { paddingX: 1, marginTop: 1, children: /* @__PURE__ */ (0, import_jsx_runtime34.jsxs)(Text, { color: "gray", children: [
|
|
43230
43283
|
"context: ",
|
|
43231
|
-
/* @__PURE__ */ (0,
|
|
43284
|
+
/* @__PURE__ */ (0, import_jsx_runtime34.jsx)(Text, { color: "white", children: ctx.sessionMessages }),
|
|
43232
43285
|
" msgs \xB7 conversation size: ",
|
|
43233
|
-
/* @__PURE__ */ (0,
|
|
43286
|
+
/* @__PURE__ */ (0, import_jsx_runtime34.jsx)(Text, { color: "white", children: ctx.conversation.size() }),
|
|
43234
43287
|
" \xB7 model: ",
|
|
43235
|
-
/* @__PURE__ */ (0,
|
|
43288
|
+
/* @__PURE__ */ (0, import_jsx_runtime34.jsx)(Text, { color: "cyan", children: displayName(ctx.model) }),
|
|
43236
43289
|
" \xB7 mood: ",
|
|
43237
|
-
/* @__PURE__ */ (0,
|
|
43290
|
+
/* @__PURE__ */ (0, import_jsx_runtime34.jsx)(Text, { color: "yellow", children: ctx.mood })
|
|
43238
43291
|
] }) })
|
|
43239
43292
|
] });
|
|
43240
43293
|
};
|
|
@@ -43243,55 +43296,55 @@ var usageCommand = {
|
|
|
43243
43296
|
description: "Show session token budget, accumulated spend, and per-model breakdown",
|
|
43244
43297
|
run: (_args, ctx) => ({
|
|
43245
43298
|
type: "render",
|
|
43246
|
-
element: /* @__PURE__ */ (0,
|
|
43299
|
+
element: /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(UsagePanel, { ctx })
|
|
43247
43300
|
})
|
|
43248
43301
|
};
|
|
43249
43302
|
|
|
43250
43303
|
// src/commands-palette/builtin/vim.tsx
|
|
43251
43304
|
init_load();
|
|
43252
|
-
var
|
|
43253
|
-
var StatusPanel = ({ enabled }) => /* @__PURE__ */ (0,
|
|
43254
|
-
/* @__PURE__ */ (0,
|
|
43255
|
-
/* @__PURE__ */ (0,
|
|
43305
|
+
var import_jsx_runtime35 = __toESM(require_jsx_runtime(), 1);
|
|
43306
|
+
var StatusPanel = ({ enabled }) => /* @__PURE__ */ (0, import_jsx_runtime35.jsxs)(Box_default, { flexDirection: "column", borderStyle: "round", borderColor: "magenta", paddingX: 1, children: [
|
|
43307
|
+
/* @__PURE__ */ (0, import_jsx_runtime35.jsx)(Text, { bold: true, color: "magentaBright", children: "Vim Mode" }),
|
|
43308
|
+
/* @__PURE__ */ (0, import_jsx_runtime35.jsx)(Box_default, { marginTop: 1, children: /* @__PURE__ */ (0, import_jsx_runtime35.jsxs)(Text, { children: [
|
|
43256
43309
|
"Status:",
|
|
43257
43310
|
" ",
|
|
43258
|
-
/* @__PURE__ */ (0,
|
|
43311
|
+
/* @__PURE__ */ (0, import_jsx_runtime35.jsx)(Text, { bold: true, color: enabled ? "green" : "gray", children: enabled ? "enabled" : "disabled" })
|
|
43259
43312
|
] }) }),
|
|
43260
|
-
/* @__PURE__ */ (0,
|
|
43261
|
-
/* @__PURE__ */ (0,
|
|
43262
|
-
/* @__PURE__ */ (0,
|
|
43313
|
+
/* @__PURE__ */ (0, import_jsx_runtime35.jsxs)(Box_default, { marginTop: 1, flexDirection: "column", children: [
|
|
43314
|
+
/* @__PURE__ */ (0, import_jsx_runtime35.jsx)(Text, { color: "gray", children: "Commands:" }),
|
|
43315
|
+
/* @__PURE__ */ (0, import_jsx_runtime35.jsxs)(Text, { children: [
|
|
43263
43316
|
" ",
|
|
43264
|
-
/* @__PURE__ */ (0,
|
|
43317
|
+
/* @__PURE__ */ (0, import_jsx_runtime35.jsx)(Text, { color: "cyan", children: "/vim on" }),
|
|
43265
43318
|
" ",
|
|
43266
43319
|
" \u2014 enable vim mode (takes effect on next launch)"
|
|
43267
43320
|
] }),
|
|
43268
|
-
/* @__PURE__ */ (0,
|
|
43321
|
+
/* @__PURE__ */ (0, import_jsx_runtime35.jsxs)(Text, { children: [
|
|
43269
43322
|
" ",
|
|
43270
|
-
/* @__PURE__ */ (0,
|
|
43323
|
+
/* @__PURE__ */ (0, import_jsx_runtime35.jsx)(Text, { color: "cyan", children: "/vim off" }),
|
|
43271
43324
|
" ",
|
|
43272
43325
|
" \u2014 disable vim mode"
|
|
43273
43326
|
] }),
|
|
43274
|
-
/* @__PURE__ */ (0,
|
|
43327
|
+
/* @__PURE__ */ (0, import_jsx_runtime35.jsxs)(Text, { children: [
|
|
43275
43328
|
" ",
|
|
43276
|
-
/* @__PURE__ */ (0,
|
|
43329
|
+
/* @__PURE__ */ (0, import_jsx_runtime35.jsx)(Text, { color: "cyan", children: "/vim bindings" }),
|
|
43277
43330
|
" ",
|
|
43278
43331
|
" \u2014 show key binding reference"
|
|
43279
43332
|
] })
|
|
43280
43333
|
] }),
|
|
43281
|
-
!enabled && /* @__PURE__ */ (0,
|
|
43334
|
+
!enabled && /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(Box_default, { marginTop: 1, children: /* @__PURE__ */ (0, import_jsx_runtime35.jsxs)(Text, { color: "gray", children: [
|
|
43282
43335
|
"Tip: run",
|
|
43283
43336
|
" ",
|
|
43284
|
-
/* @__PURE__ */ (0,
|
|
43337
|
+
/* @__PURE__ */ (0, import_jsx_runtime35.jsx)(Text, { color: "cyan", children: "/vim on" }),
|
|
43285
43338
|
" ",
|
|
43286
43339
|
"to enable modal editing in the input line."
|
|
43287
43340
|
] }) }),
|
|
43288
|
-
enabled && /* @__PURE__ */ (0,
|
|
43341
|
+
enabled && /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(Box_default, { marginTop: 1, children: /* @__PURE__ */ (0, import_jsx_runtime35.jsxs)(Text, { color: "gray", children: [
|
|
43289
43342
|
"Active \u2014 press ",
|
|
43290
|
-
/* @__PURE__ */ (0,
|
|
43343
|
+
/* @__PURE__ */ (0, import_jsx_runtime35.jsx)(Text, { color: "magentaBright", children: "Esc" }),
|
|
43291
43344
|
" to enter normal mode, ",
|
|
43292
|
-
/* @__PURE__ */ (0,
|
|
43345
|
+
/* @__PURE__ */ (0, import_jsx_runtime35.jsx)(Text, { color: "magentaBright", children: "i" }),
|
|
43293
43346
|
"/",
|
|
43294
|
-
/* @__PURE__ */ (0,
|
|
43347
|
+
/* @__PURE__ */ (0, import_jsx_runtime35.jsx)(Text, { color: "magentaBright", children: "a" }),
|
|
43295
43348
|
" to insert."
|
|
43296
43349
|
] }) })
|
|
43297
43350
|
] });
|
|
@@ -43319,16 +43372,16 @@ var BINDINGS = [
|
|
|
43319
43372
|
// Submit
|
|
43320
43373
|
["Enter", "Submit prompt (any mode)"]
|
|
43321
43374
|
];
|
|
43322
|
-
var BindingsPanel2 = () => /* @__PURE__ */ (0,
|
|
43323
|
-
/* @__PURE__ */ (0,
|
|
43324
|
-
/* @__PURE__ */ (0,
|
|
43325
|
-
/* @__PURE__ */ (0,
|
|
43326
|
-
/* @__PURE__ */ (0,
|
|
43375
|
+
var BindingsPanel2 = () => /* @__PURE__ */ (0, import_jsx_runtime35.jsxs)(Box_default, { flexDirection: "column", borderStyle: "round", borderColor: "magenta", paddingX: 1, children: [
|
|
43376
|
+
/* @__PURE__ */ (0, import_jsx_runtime35.jsx)(Text, { bold: true, color: "magentaBright", children: "Vim key-binding reference" }),
|
|
43377
|
+
/* @__PURE__ */ (0, import_jsx_runtime35.jsx)(Box_default, { marginTop: 1, flexDirection: "column", children: BINDINGS.map(([key, desc]) => /* @__PURE__ */ (0, import_jsx_runtime35.jsxs)(Box_default, { children: [
|
|
43378
|
+
/* @__PURE__ */ (0, import_jsx_runtime35.jsx)(Box_default, { width: 20, children: /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(Text, { color: "cyan", children: key }) }),
|
|
43379
|
+
/* @__PURE__ */ (0, import_jsx_runtime35.jsx)(Text, { children: desc })
|
|
43327
43380
|
] }, key)) }),
|
|
43328
|
-
/* @__PURE__ */ (0,
|
|
43381
|
+
/* @__PURE__ */ (0, import_jsx_runtime35.jsx)(Box_default, { marginTop: 1, children: /* @__PURE__ */ (0, import_jsx_runtime35.jsxs)(Text, { color: "gray", children: [
|
|
43329
43382
|
"Vim mode must be enabled via",
|
|
43330
43383
|
" ",
|
|
43331
|
-
/* @__PURE__ */ (0,
|
|
43384
|
+
/* @__PURE__ */ (0, import_jsx_runtime35.jsx)(Text, { color: "cyan", children: "/vim on" }),
|
|
43332
43385
|
" ",
|
|
43333
43386
|
"and the CLI restarted for bindings to take effect."
|
|
43334
43387
|
] }) })
|
|
@@ -43342,7 +43395,7 @@ var vimCommand = {
|
|
|
43342
43395
|
if (sub === "bindings") {
|
|
43343
43396
|
return {
|
|
43344
43397
|
type: "render",
|
|
43345
|
-
element: /* @__PURE__ */ (0,
|
|
43398
|
+
element: /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(BindingsPanel2, {})
|
|
43346
43399
|
};
|
|
43347
43400
|
}
|
|
43348
43401
|
if (sub === "on") {
|
|
@@ -43365,7 +43418,7 @@ var vimCommand = {
|
|
|
43365
43418
|
const enabled = cfg.vim === true;
|
|
43366
43419
|
return {
|
|
43367
43420
|
type: "render",
|
|
43368
|
-
element: /* @__PURE__ */ (0,
|
|
43421
|
+
element: /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(StatusPanel, { enabled })
|
|
43369
43422
|
};
|
|
43370
43423
|
}
|
|
43371
43424
|
};
|
|
@@ -43666,7 +43719,7 @@ async function runBgAgent(id) {
|
|
|
43666
43719
|
apiKey: cfg.apiKey,
|
|
43667
43720
|
baseUrl: cfg.apiBaseUrl,
|
|
43668
43721
|
clientType: "ide",
|
|
43669
|
-
userAgent: `kryven-cli-bg/${"0.2.
|
|
43722
|
+
userAgent: `kryven-cli-bg/${"0.2.5"}`
|
|
43670
43723
|
});
|
|
43671
43724
|
const transcriptPath = join25(dir, "transcript.jsonl");
|
|
43672
43725
|
const appendTranscript = async (m) => {
|
|
@@ -43785,7 +43838,7 @@ async function runBgAgent(id) {
|
|
|
43785
43838
|
}
|
|
43786
43839
|
|
|
43787
43840
|
// src/commands-palette/builtin/bg.tsx
|
|
43788
|
-
var
|
|
43841
|
+
var import_jsx_runtime36 = __toESM(require_jsx_runtime(), 1);
|
|
43789
43842
|
function fmtElapsed2(start, end) {
|
|
43790
43843
|
const sec = Math.floor(((end ?? Date.now()) - start) / 1e3);
|
|
43791
43844
|
const m = Math.floor(sec / 60);
|
|
@@ -43798,26 +43851,26 @@ var STATUS_COLOR2 = {
|
|
|
43798
43851
|
killed: "red",
|
|
43799
43852
|
timeout: "yellow"
|
|
43800
43853
|
};
|
|
43801
|
-
var BgListPanel = ({ agents }) => /* @__PURE__ */ (0,
|
|
43802
|
-
/* @__PURE__ */ (0,
|
|
43854
|
+
var BgListPanel = ({ agents }) => /* @__PURE__ */ (0, import_jsx_runtime36.jsxs)(Box_default, { flexDirection: "column", borderStyle: "round", borderColor: "cyan", paddingX: 1, children: [
|
|
43855
|
+
/* @__PURE__ */ (0, import_jsx_runtime36.jsxs)(Text, { bold: true, color: "cyan", children: [
|
|
43803
43856
|
"Background agents (",
|
|
43804
43857
|
agents.length,
|
|
43805
43858
|
")"
|
|
43806
43859
|
] }),
|
|
43807
|
-
agents.length === 0 ? /* @__PURE__ */ (0,
|
|
43860
|
+
agents.length === 0 ? /* @__PURE__ */ (0, import_jsx_runtime36.jsxs)(Text, { color: "gray", children: [
|
|
43808
43861
|
"None. Start one with /bg start ",
|
|
43809
43862
|
"<prompt>",
|
|
43810
43863
|
"."
|
|
43811
|
-
] }) : agents.map((a2) => /* @__PURE__ */ (0,
|
|
43812
|
-
/* @__PURE__ */ (0,
|
|
43864
|
+
] }) : agents.map((a2) => /* @__PURE__ */ (0, import_jsx_runtime36.jsxs)(Box_default, { children: [
|
|
43865
|
+
/* @__PURE__ */ (0, import_jsx_runtime36.jsx)(Box_default, { width: 11, children: /* @__PURE__ */ (0, import_jsx_runtime36.jsxs)(Text, { color: "cyan", children: [
|
|
43813
43866
|
a2.id.slice(0, 8),
|
|
43814
43867
|
"\u2026"
|
|
43815
43868
|
] }) }),
|
|
43816
|
-
/* @__PURE__ */ (0,
|
|
43817
|
-
/* @__PURE__ */ (0,
|
|
43818
|
-
/* @__PURE__ */ (0,
|
|
43869
|
+
/* @__PURE__ */ (0, import_jsx_runtime36.jsx)(Box_default, { width: 11, children: /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(Text, { color: STATUS_COLOR2[a2.status] ?? "white", children: a2.status }) }),
|
|
43870
|
+
/* @__PURE__ */ (0, import_jsx_runtime36.jsx)(Box_default, { width: 8, children: /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(Text, { color: "gray", children: fmtElapsed2(a2.startedAt, a2.finishedAt) }) }),
|
|
43871
|
+
/* @__PURE__ */ (0, import_jsx_runtime36.jsx)(Text, { color: "gray", wrap: "truncate-end", children: a2.lastLine || "" })
|
|
43819
43872
|
] }, a2.id)),
|
|
43820
|
-
/* @__PURE__ */ (0,
|
|
43873
|
+
/* @__PURE__ */ (0, import_jsx_runtime36.jsx)(Box_default, { marginTop: 1, children: /* @__PURE__ */ (0, import_jsx_runtime36.jsxs)(Text, { color: "gray", children: [
|
|
43821
43874
|
"/bg start ",
|
|
43822
43875
|
"<prompt>",
|
|
43823
43876
|
" \xB7 /bg logs ",
|
|
@@ -43876,27 +43929,27 @@ var bgCommand = {
|
|
|
43876
43929
|
};
|
|
43877
43930
|
}
|
|
43878
43931
|
const agents = await listBgAgents();
|
|
43879
|
-
return { type: "render", element: /* @__PURE__ */ (0,
|
|
43932
|
+
return { type: "render", element: /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(BgListPanel, { agents }) };
|
|
43880
43933
|
}
|
|
43881
43934
|
};
|
|
43882
43935
|
|
|
43883
43936
|
// src/commands-palette/builtin/mode.tsx
|
|
43884
43937
|
init_modes();
|
|
43885
|
-
var
|
|
43938
|
+
var import_jsx_runtime37 = __toESM(require_jsx_runtime(), 1);
|
|
43886
43939
|
var ORDER = ["plan", "default", "acceptEdits", "bypass", "deny"];
|
|
43887
|
-
var ModePanel = ({ current }) => /* @__PURE__ */ (0,
|
|
43888
|
-
/* @__PURE__ */ (0,
|
|
43940
|
+
var ModePanel = ({ current }) => /* @__PURE__ */ (0, import_jsx_runtime37.jsxs)(Box_default, { flexDirection: "column", borderStyle: "round", borderColor: "cyan", paddingX: 1, children: [
|
|
43941
|
+
/* @__PURE__ */ (0, import_jsx_runtime37.jsx)(Text, { bold: true, color: "cyan", children: "Permission mode" }),
|
|
43889
43942
|
ORDER.map((m) => {
|
|
43890
43943
|
const active = m === current;
|
|
43891
|
-
return /* @__PURE__ */ (0,
|
|
43892
|
-
/* @__PURE__ */ (0,
|
|
43944
|
+
return /* @__PURE__ */ (0, import_jsx_runtime37.jsxs)(Box_default, { children: [
|
|
43945
|
+
/* @__PURE__ */ (0, import_jsx_runtime37.jsx)(Box_default, { width: 14, children: /* @__PURE__ */ (0, import_jsx_runtime37.jsxs)(Text, { color: active ? "greenBright" : "cyan", bold: active, children: [
|
|
43893
43946
|
active ? "\u25B8 " : " ",
|
|
43894
43947
|
m
|
|
43895
43948
|
] }) }),
|
|
43896
|
-
/* @__PURE__ */ (0,
|
|
43949
|
+
/* @__PURE__ */ (0, import_jsx_runtime37.jsx)(Text, { color: "gray", children: MODE_DESCRIPTIONS[m] })
|
|
43897
43950
|
] }, m);
|
|
43898
43951
|
}),
|
|
43899
|
-
/* @__PURE__ */ (0,
|
|
43952
|
+
/* @__PURE__ */ (0, import_jsx_runtime37.jsx)(Box_default, { marginTop: 1, children: /* @__PURE__ */ (0, import_jsx_runtime37.jsxs)(Text, { color: "gray", children: [
|
|
43900
43953
|
"Switch: /mode ",
|
|
43901
43954
|
"<name>",
|
|
43902
43955
|
" \xB7 cycle with Shift+Tab \xB7 enable bypass with /mode bypass --confirm"
|
|
@@ -43913,7 +43966,7 @@ var modeCommand = {
|
|
|
43913
43966
|
const parts = (args ?? "").trim().split(/\s+/).filter(Boolean);
|
|
43914
43967
|
const sub = (parts[0] ?? "").toLowerCase();
|
|
43915
43968
|
if (!sub) {
|
|
43916
|
-
return { type: "render", element: /* @__PURE__ */ (0,
|
|
43969
|
+
return { type: "render", element: /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(ModePanel, { current: getPermissionMode() }) };
|
|
43917
43970
|
}
|
|
43918
43971
|
if (sub === "next") {
|
|
43919
43972
|
return { type: "ack", message: `Permission mode: ${cyclePermissionMode()}` };
|
|
@@ -44644,7 +44697,7 @@ async function checkForUpdate(current, timeoutMs = 2500) {
|
|
|
44644
44697
|
}
|
|
44645
44698
|
|
|
44646
44699
|
// src/tui/REPL.tsx
|
|
44647
|
-
var
|
|
44700
|
+
var import_jsx_runtime38 = __toESM(require_jsx_runtime(), 1);
|
|
44648
44701
|
import fs4 from "node:fs";
|
|
44649
44702
|
import path8 from "node:path";
|
|
44650
44703
|
function detectReflectCommand(cwd2) {
|
|
@@ -44662,13 +44715,6 @@ function detectReflectCommand(cwd2) {
|
|
|
44662
44715
|
}
|
|
44663
44716
|
return null;
|
|
44664
44717
|
}
|
|
44665
|
-
var KRYVEN_PIXEL_WORDMARK = [
|
|
44666
|
-
"## ## ##### ## ## ## ## ##### ## ##",
|
|
44667
|
-
"## ## ## ## #### ## ## ## ### ##",
|
|
44668
|
-
"#### ##### ## ## ## ##### #### ##",
|
|
44669
|
-
"## ## ## ## ## ## ## ## ## ####",
|
|
44670
|
-
"## ## ## ## ## ### ##### ## ###"
|
|
44671
|
-
];
|
|
44672
44718
|
function shortArgs(args, max = 80) {
|
|
44673
44719
|
const s = typeof args === "string" ? args : JSON.stringify(args);
|
|
44674
44720
|
return s.length > max ? s.slice(0, max - 1) + "\u2026" : s;
|
|
@@ -44689,16 +44735,16 @@ var REPL = ({
|
|
|
44689
44735
|
seedPrompt
|
|
44690
44736
|
}) => {
|
|
44691
44737
|
const app = use_app_default();
|
|
44692
|
-
const clientRef = (0,
|
|
44693
|
-
const [isGuest, setIsGuest] = (0,
|
|
44694
|
-
const conversationRef = (0,
|
|
44695
|
-
const sessionRef = (0,
|
|
44696
|
-
const remoteSessionRef = (0,
|
|
44697
|
-
const abortRef = (0,
|
|
44698
|
-
const permissionResolveRef = (0,
|
|
44699
|
-
const readPathsRef = (0,
|
|
44700
|
-
const toolMetaRef = (0,
|
|
44701
|
-
(0,
|
|
44738
|
+
const clientRef = (0, import_react28.useRef)(client);
|
|
44739
|
+
const [isGuest, setIsGuest] = (0, import_react28.useState)(initialIsGuest);
|
|
44740
|
+
const conversationRef = (0, import_react28.useRef)(new Conversation());
|
|
44741
|
+
const sessionRef = (0, import_react28.useRef)(new SessionStore(resumeSessionId));
|
|
44742
|
+
const remoteSessionRef = (0, import_react28.useRef)(null);
|
|
44743
|
+
const abortRef = (0, import_react28.useRef)(null);
|
|
44744
|
+
const permissionResolveRef = (0, import_react28.useRef)(null);
|
|
44745
|
+
const readPathsRef = (0, import_react28.useRef)(/* @__PURE__ */ new Set());
|
|
44746
|
+
const toolMetaRef = (0, import_react28.useRef)(/* @__PURE__ */ new Map());
|
|
44747
|
+
(0, import_react28.useEffect)(() => {
|
|
44702
44748
|
if (isGuest) return;
|
|
44703
44749
|
const cfg = resolveConfig();
|
|
44704
44750
|
if (cfg.apiKey && cfg.telemetry !== false) {
|
|
@@ -44716,29 +44762,42 @@ var REPL = ({
|
|
|
44716
44762
|
);
|
|
44717
44763
|
};
|
|
44718
44764
|
}, []);
|
|
44719
|
-
const [input, setInput] = (0,
|
|
44720
|
-
const [streaming, setStreaming] = (0,
|
|
44721
|
-
const [busy, setBusy] = (0,
|
|
44722
|
-
const [model, setModel] = (0,
|
|
44723
|
-
const [mood, setMood] = (0,
|
|
44724
|
-
const [git, setGit] = (0,
|
|
44725
|
-
const [, forceRender] = (0,
|
|
44726
|
-
const [overlay, setOverlay] = (0,
|
|
44727
|
-
const [notes, setNotes] = (0,
|
|
44728
|
-
const [sessionTokens, setSessionTokens] = (0,
|
|
44729
|
-
const [toolEntries, setToolEntries] = (0,
|
|
44730
|
-
const [permissionReq, setPermissionReq] = (0,
|
|
44731
|
-
const [modelPicker, setModelPicker] = (0,
|
|
44732
|
-
const [staticGen, setStaticGen] = (0,
|
|
44733
|
-
const prevCommittedCountRef = (0,
|
|
44734
|
-
const cfgRef = (0,
|
|
44735
|
-
const vimEnabledRef = (0,
|
|
44736
|
-
const vimRef = (0,
|
|
44737
|
-
const [vimTick, setVimTick] = (0,
|
|
44738
|
-
const themeMgrRef = (0,
|
|
44739
|
-
const keyMgrRef = (0,
|
|
44740
|
-
const
|
|
44741
|
-
|
|
44765
|
+
const [input, setInput] = (0, import_react28.useState)("");
|
|
44766
|
+
const [streaming, setStreaming] = (0, import_react28.useState)(null);
|
|
44767
|
+
const [busy, setBusy] = (0, import_react28.useState)(false);
|
|
44768
|
+
const [model, setModel] = (0, import_react28.useState)(initialModel);
|
|
44769
|
+
const [mood, setMood] = (0, import_react28.useState)(initialMood);
|
|
44770
|
+
const [git, setGit] = (0, import_react28.useState)({ isRepo: false });
|
|
44771
|
+
const [, forceRender] = (0, import_react28.useState)(0);
|
|
44772
|
+
const [overlay, setOverlay] = (0, import_react28.useState)(null);
|
|
44773
|
+
const [notes, setNotes] = (0, import_react28.useState)([]);
|
|
44774
|
+
const [sessionTokens, setSessionTokens] = (0, import_react28.useState)(0);
|
|
44775
|
+
const [toolEntries, setToolEntries] = (0, import_react28.useState)([]);
|
|
44776
|
+
const [permissionReq, setPermissionReq] = (0, import_react28.useState)(null);
|
|
44777
|
+
const [modelPicker, setModelPicker] = (0, import_react28.useState)(null);
|
|
44778
|
+
const [staticGen, setStaticGen] = (0, import_react28.useState)(0);
|
|
44779
|
+
const prevCommittedCountRef = (0, import_react28.useRef)(0);
|
|
44780
|
+
const cfgRef = (0, import_react28.useRef)(resolveConfig());
|
|
44781
|
+
const vimEnabledRef = (0, import_react28.useRef)(cfgRef.current.vim === true);
|
|
44782
|
+
const vimRef = (0, import_react28.useRef)(initialVim());
|
|
44783
|
+
const [vimTick, setVimTick] = (0, import_react28.useState)(0);
|
|
44784
|
+
const themeMgrRef = (0, import_react28.useRef)(null);
|
|
44785
|
+
const keyMgrRef = (0, import_react28.useRef)(null);
|
|
44786
|
+
const initialTheme = (() => {
|
|
44787
|
+
const name = _themeOverride || cfgRef.current.theme || "default";
|
|
44788
|
+
const c3 = (BUILTIN_THEMES.find((b) => b.name === name) ?? BUILTIN_THEMES.find((b) => b.name === "default"))?.colors;
|
|
44789
|
+
return {
|
|
44790
|
+
fg: c3?.fg ?? "#F5EFE6",
|
|
44791
|
+
muted: c3?.muted ?? "#736560",
|
|
44792
|
+
warn: c3?.warn ?? "#F59E0B",
|
|
44793
|
+
accent: c3?.accent ?? "#8B5CF6",
|
|
44794
|
+
info: c3?.info ?? "#7EA8C4",
|
|
44795
|
+
border: c3?.border ?? "#3F3F46"
|
|
44796
|
+
};
|
|
44797
|
+
})();
|
|
44798
|
+
const [accentColor, setAccentColor] = (0, import_react28.useState)(initialTheme.accent);
|
|
44799
|
+
const [theme, setTheme] = (0, import_react28.useState)(initialTheme);
|
|
44800
|
+
(0, import_react28.useEffect)(() => {
|
|
44742
44801
|
let cancelled = false;
|
|
44743
44802
|
(async () => {
|
|
44744
44803
|
try {
|
|
@@ -44746,10 +44805,22 @@ var REPL = ({
|
|
|
44746
44805
|
await tm.loadAll();
|
|
44747
44806
|
const name = _themeOverride || cfgRef.current.theme || "default";
|
|
44748
44807
|
tm.setActive(name);
|
|
44808
|
+
const applyColors = (c3) => {
|
|
44809
|
+
if (!c3) return;
|
|
44810
|
+
if (c3.accent) setAccentColor(c3.accent);
|
|
44811
|
+
setTheme((p) => ({
|
|
44812
|
+
fg: c3.fg ?? p.fg,
|
|
44813
|
+
muted: c3.muted ?? p.muted,
|
|
44814
|
+
warn: c3.warn ?? p.warn,
|
|
44815
|
+
accent: c3.accent ?? p.accent,
|
|
44816
|
+
info: c3.info ?? p.info,
|
|
44817
|
+
border: c3.border ?? p.border
|
|
44818
|
+
}));
|
|
44819
|
+
};
|
|
44749
44820
|
const t = tm.current();
|
|
44750
|
-
if (!cancelled
|
|
44751
|
-
tm.on("change", (
|
|
44752
|
-
|
|
44821
|
+
if (!cancelled) applyColors(t?.colors);
|
|
44822
|
+
tm.on("change", (theme2) => {
|
|
44823
|
+
applyColors(theme2?.colors);
|
|
44753
44824
|
});
|
|
44754
44825
|
tm.watchForChanges();
|
|
44755
44826
|
themeMgrRef.current = tm;
|
|
@@ -44771,15 +44842,15 @@ var REPL = ({
|
|
|
44771
44842
|
keyMgrRef.current?.stopWatching?.();
|
|
44772
44843
|
};
|
|
44773
44844
|
}, []);
|
|
44774
|
-
const toolsEnabled = (0,
|
|
44775
|
-
(0,
|
|
44776
|
-
void checkForUpdate("0.2.
|
|
44845
|
+
const toolsEnabled = (0, import_react28.useMemo)(() => listTools().length > 0, []);
|
|
44846
|
+
(0, import_react28.useEffect)(() => {
|
|
44847
|
+
void checkForUpdate("0.2.5").then((info) => {
|
|
44777
44848
|
if (info?.updateAvailable) {
|
|
44778
44849
|
setNotes((p) => [
|
|
44779
44850
|
...p,
|
|
44780
44851
|
{
|
|
44781
44852
|
kind: "system",
|
|
44782
|
-
text: `Update available: ${"0.2.
|
|
44853
|
+
text: `Update available: ${"0.2.5"} \u2192 ${info.latest}. Run \`kryven update\` to update.`
|
|
44783
44854
|
}
|
|
44784
44855
|
]);
|
|
44785
44856
|
}
|
|
@@ -44805,7 +44876,7 @@ var REPL = ({
|
|
|
44805
44876
|
}
|
|
44806
44877
|
})();
|
|
44807
44878
|
}, []);
|
|
44808
|
-
const completion = (0,
|
|
44879
|
+
const completion = (0, import_react28.useMemo)(() => {
|
|
44809
44880
|
if (busy || permissionReq || overlay || !input) return null;
|
|
44810
44881
|
try {
|
|
44811
44882
|
return getCompletions(input, input.length, cwd2);
|
|
@@ -44897,7 +44968,7 @@ var REPL = ({
|
|
|
44897
44968
|
if (out.consumed) setVimTick((n2) => n2 + 1);
|
|
44898
44969
|
}
|
|
44899
44970
|
});
|
|
44900
|
-
const slashCtx = (0,
|
|
44971
|
+
const slashCtx = (0, import_react28.useMemo)(
|
|
44901
44972
|
() => ({
|
|
44902
44973
|
conversation: conversationRef.current,
|
|
44903
44974
|
model,
|
|
@@ -44919,7 +44990,7 @@ var REPL = ({
|
|
|
44919
44990
|
apiKey: key,
|
|
44920
44991
|
baseUrl: cfg.apiBaseUrl,
|
|
44921
44992
|
clientType: "ide",
|
|
44922
|
-
userAgent: `kryven-cli/${"0.2.
|
|
44993
|
+
userAgent: `kryven-cli/${"0.2.5"}`
|
|
44923
44994
|
});
|
|
44924
44995
|
try {
|
|
44925
44996
|
await candidate.ping();
|
|
@@ -45284,6 +45355,7 @@ var REPL = ({
|
|
|
45284
45355
|
}
|
|
45285
45356
|
};
|
|
45286
45357
|
const convSize = conversationRef.current.size();
|
|
45358
|
+
const isHome = convSize === 0 && streaming == null;
|
|
45287
45359
|
const status = {
|
|
45288
45360
|
model,
|
|
45289
45361
|
mood,
|
|
@@ -45295,19 +45367,19 @@ var REPL = ({
|
|
|
45295
45367
|
costUsd: sessionCostUsd(conversationRef.current.all(), model),
|
|
45296
45368
|
mode: getPermissionMode()
|
|
45297
45369
|
};
|
|
45298
|
-
const staticItems = (0,
|
|
45370
|
+
const staticItems = (0, import_react28.useMemo)(() => {
|
|
45299
45371
|
const gen = `g${staticGen}`;
|
|
45300
45372
|
const items = [
|
|
45301
45373
|
{
|
|
45302
45374
|
id: `${gen}-header`,
|
|
45303
|
-
node: /* @__PURE__ */ (0,
|
|
45304
|
-
|
|
45305
|
-
/* @__PURE__ */ (0,
|
|
45375
|
+
node: /* @__PURE__ */ (0, import_jsx_runtime38.jsxs)(Box_default, { flexDirection: "column", marginBottom: 1, children: [
|
|
45376
|
+
/* @__PURE__ */ (0, import_jsx_runtime38.jsx)(Wordmark, { muted: theme.muted, fg: theme.fg }),
|
|
45377
|
+
/* @__PURE__ */ (0, import_jsx_runtime38.jsx)(Box_default, { marginTop: 1, children: /* @__PURE__ */ (0, import_jsx_runtime38.jsxs)(Text, { color: theme.muted, children: [
|
|
45306
45378
|
"Kryven CLI ",
|
|
45307
|
-
"0.2.
|
|
45308
|
-
toolsEnabled ? " \xB7 tools
|
|
45309
|
-
|
|
45310
|
-
|
|
45379
|
+
"0.2.5",
|
|
45380
|
+
toolsEnabled ? " \xB7 tools" : "",
|
|
45381
|
+
" \xB7 Powered by KRY-5.2 Extended"
|
|
45382
|
+
] }) })
|
|
45311
45383
|
] })
|
|
45312
45384
|
}
|
|
45313
45385
|
];
|
|
@@ -45326,10 +45398,10 @@ var REPL = ({
|
|
|
45326
45398
|
for (let i2 = 0; i2 < all.length; i2++) {
|
|
45327
45399
|
const m = all[i2];
|
|
45328
45400
|
if (m.role === "user") {
|
|
45329
|
-
items.push({ id: `${gen}-m${i2}`, node: /* @__PURE__ */ (0,
|
|
45401
|
+
items.push({ id: `${gen}-m${i2}`, node: /* @__PURE__ */ (0, import_jsx_runtime38.jsx)(MessageList, { message: m }) });
|
|
45330
45402
|
} else if (m.role === "assistant") {
|
|
45331
45403
|
if (typeof m.content === "string" && m.content.trim().length > 0) {
|
|
45332
|
-
items.push({ id: `${gen}-m${i2}`, node: /* @__PURE__ */ (0,
|
|
45404
|
+
items.push({ id: `${gen}-m${i2}`, node: /* @__PURE__ */ (0, import_jsx_runtime38.jsx)(MessageList, { message: m }) });
|
|
45333
45405
|
}
|
|
45334
45406
|
} else if (m.role === "tool") {
|
|
45335
45407
|
const meta = m.tool_call_id ? toolMetaRef.current.get(m.tool_call_id) : void 0;
|
|
@@ -45341,63 +45413,63 @@ var REPL = ({
|
|
|
45341
45413
|
status: "ok",
|
|
45342
45414
|
output: typeof m.content === "string" ? m.content : ""
|
|
45343
45415
|
};
|
|
45344
|
-
items.push({ id: `${gen}-t${i2}`, node: /* @__PURE__ */ (0,
|
|
45416
|
+
items.push({ id: `${gen}-t${i2}`, node: /* @__PURE__ */ (0, import_jsx_runtime38.jsx)(ToolCall, { ...entry }) });
|
|
45345
45417
|
}
|
|
45346
45418
|
}
|
|
45347
45419
|
return items;
|
|
45348
45420
|
}, [convSize, staticGen, toolsEnabled]);
|
|
45349
45421
|
const committedCount = staticItems.length;
|
|
45350
|
-
(0,
|
|
45422
|
+
(0, import_react28.useEffect)(() => {
|
|
45351
45423
|
if (committedCount < prevCommittedCountRef.current) {
|
|
45352
45424
|
setStaticGen((g) => g + 1);
|
|
45353
45425
|
}
|
|
45354
45426
|
prevCommittedCountRef.current = committedCount;
|
|
45355
45427
|
}, [committedCount]);
|
|
45356
|
-
return /* @__PURE__ */ (0,
|
|
45357
|
-
/* @__PURE__ */ (0,
|
|
45358
|
-
streaming != null && /* @__PURE__ */ (0,
|
|
45359
|
-
/* @__PURE__ */ (0,
|
|
45360
|
-
/* @__PURE__ */ (0,
|
|
45428
|
+
return /* @__PURE__ */ (0, import_jsx_runtime38.jsxs)(Box_default, { flexDirection: "column", children: [
|
|
45429
|
+
/* @__PURE__ */ (0, import_jsx_runtime38.jsx)(Static, { items: staticItems, children: (item) => /* @__PURE__ */ (0, import_jsx_runtime38.jsx)(Box_default, { flexDirection: "column", children: item.node }, item.id) }, staticGen),
|
|
45430
|
+
streaming != null && /* @__PURE__ */ (0, import_jsx_runtime38.jsxs)(Box_default, { flexDirection: "column", marginBottom: 1, children: [
|
|
45431
|
+
/* @__PURE__ */ (0, import_jsx_runtime38.jsx)(Text, { bold: true, color: "green", children: "kryven" }),
|
|
45432
|
+
/* @__PURE__ */ (0, import_jsx_runtime38.jsx)(Box_default, { paddingLeft: 2, flexDirection: "column", children: /* @__PURE__ */ (0, import_jsx_runtime38.jsx)(MarkdownStream, { streamingText: streaming, done: !busy }) })
|
|
45361
45433
|
] }),
|
|
45362
|
-
/* @__PURE__ */ (0,
|
|
45363
|
-
modelPicker && /* @__PURE__ */ (0,
|
|
45364
|
-
permissionReq && /* @__PURE__ */ (0,
|
|
45365
|
-
/* @__PURE__ */ (0,
|
|
45366
|
-
/* @__PURE__ */ (0,
|
|
45434
|
+
/* @__PURE__ */ (0, import_jsx_runtime38.jsx)(ToolCallList, { entries: toolEntries, paused: Boolean(permissionReq) }),
|
|
45435
|
+
modelPicker && /* @__PURE__ */ (0, import_jsx_runtime38.jsx)(ModelPicker, { models: MODELS, selected: modelPicker.sel, current: model }),
|
|
45436
|
+
permissionReq && /* @__PURE__ */ (0, import_jsx_runtime38.jsxs)(Box_default, { flexDirection: "column", marginBottom: 1, borderStyle: "round", borderColor: "yellow", paddingX: 1, children: [
|
|
45437
|
+
/* @__PURE__ */ (0, import_jsx_runtime38.jsx)(Text, { bold: true, children: "Permission required" }),
|
|
45438
|
+
/* @__PURE__ */ (0, import_jsx_runtime38.jsxs)(Text, { children: [
|
|
45367
45439
|
"Tool: ",
|
|
45368
|
-
/* @__PURE__ */ (0,
|
|
45440
|
+
/* @__PURE__ */ (0, import_jsx_runtime38.jsx)(Text, { color: "cyan", children: permissionReq.toolName }),
|
|
45369
45441
|
" ",
|
|
45370
|
-
/* @__PURE__ */ (0,
|
|
45442
|
+
/* @__PURE__ */ (0, import_jsx_runtime38.jsxs)(Text, { color: riskColor(permissionReq.risk), children: [
|
|
45371
45443
|
"[",
|
|
45372
45444
|
permissionReq.risk,
|
|
45373
45445
|
"]"
|
|
45374
45446
|
] })
|
|
45375
45447
|
] }),
|
|
45376
|
-
/* @__PURE__ */ (0,
|
|
45377
|
-
/* @__PURE__ */ (0,
|
|
45378
|
-
/* @__PURE__ */ (0,
|
|
45448
|
+
/* @__PURE__ */ (0, import_jsx_runtime38.jsx)(Text, { color: "gray", children: permissionReq.argsPreview }),
|
|
45449
|
+
/* @__PURE__ */ (0, import_jsx_runtime38.jsxs)(Text, { children: [
|
|
45450
|
+
/* @__PURE__ */ (0, import_jsx_runtime38.jsx)(Text, { color: "green", children: "[Y]" }),
|
|
45379
45451
|
" allow once \xB7",
|
|
45380
45452
|
" ",
|
|
45381
|
-
/* @__PURE__ */ (0,
|
|
45453
|
+
/* @__PURE__ */ (0, import_jsx_runtime38.jsx)(Text, { color: "green", children: "[A]" }),
|
|
45382
45454
|
" always (this command) \xB7",
|
|
45383
45455
|
" ",
|
|
45384
|
-
/* @__PURE__ */ (0,
|
|
45456
|
+
/* @__PURE__ */ (0, import_jsx_runtime38.jsx)(Text, { color: "green", children: "[Shift+A]" }),
|
|
45385
45457
|
" always (this tool) \xB7",
|
|
45386
45458
|
" ",
|
|
45387
|
-
/* @__PURE__ */ (0,
|
|
45459
|
+
/* @__PURE__ */ (0, import_jsx_runtime38.jsx)(Text, { color: "red", children: "[N]" }),
|
|
45388
45460
|
" deny"
|
|
45389
45461
|
] })
|
|
45390
45462
|
] }),
|
|
45391
|
-
notes.length > 0 && /* @__PURE__ */ (0,
|
|
45463
|
+
notes.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime38.jsx)(Box_default, { flexDirection: "column", marginBottom: 1, children: notes.slice(-3).map((n2, i2) => /* @__PURE__ */ (0, import_jsx_runtime38.jsxs)(Text, { color: n2.kind === "error" ? "red" : "gray", children: [
|
|
45392
45464
|
n2.kind === "error" ? "\u2717 " : "\xB7 ",
|
|
45393
45465
|
n2.text
|
|
45394
45466
|
] }, i2)) }),
|
|
45395
|
-
overlay && /* @__PURE__ */ (0,
|
|
45467
|
+
overlay && /* @__PURE__ */ (0, import_jsx_runtime38.jsxs)(Box_default, { marginBottom: 1, flexDirection: "column", children: [
|
|
45396
45468
|
overlay,
|
|
45397
|
-
/* @__PURE__ */ (0,
|
|
45469
|
+
/* @__PURE__ */ (0, import_jsx_runtime38.jsx)(Text, { color: "gray", children: "(press Enter or Esc to dismiss)" })
|
|
45398
45470
|
] }),
|
|
45399
|
-
completion && completion.items.length > 0 && /* @__PURE__ */ (0,
|
|
45400
|
-
/* @__PURE__ */ (0,
|
|
45471
|
+
completion && completion.items.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime38.jsx)(CompletionMenu, { items: completion.items, selected: 0 }),
|
|
45472
|
+
/* @__PURE__ */ (0, import_jsx_runtime38.jsx)(
|
|
45401
45473
|
PromptInput,
|
|
45402
45474
|
{
|
|
45403
45475
|
value: input,
|
|
@@ -45407,12 +45479,38 @@ var REPL = ({
|
|
|
45407
45479
|
placeholder: busy ? "" : void 0,
|
|
45408
45480
|
vimMode: vimEnabledRef.current ? vimRef.current.mode : null,
|
|
45409
45481
|
vimCmdline: vimEnabledRef.current ? vimRef.current.cmdline : null,
|
|
45410
|
-
accentColor
|
|
45482
|
+
accentColor,
|
|
45483
|
+
model,
|
|
45484
|
+
mood,
|
|
45485
|
+
themeColors: theme
|
|
45411
45486
|
},
|
|
45412
45487
|
`pi-${vimTick}`
|
|
45413
45488
|
),
|
|
45414
|
-
/* @__PURE__ */ (0,
|
|
45415
|
-
|
|
45489
|
+
isHome ? /* @__PURE__ */ (0, import_jsx_runtime38.jsxs)(Box_default, { flexDirection: "column", marginTop: 1, children: [
|
|
45490
|
+
/* @__PURE__ */ (0, import_jsx_runtime38.jsxs)(Box_default, { flexDirection: "row", gap: 2, justifyContent: "flex-end", children: [
|
|
45491
|
+
/* @__PURE__ */ (0, import_jsx_runtime38.jsxs)(Text, { children: [
|
|
45492
|
+
/* @__PURE__ */ (0, import_jsx_runtime38.jsx)(Text, { color: theme.fg, children: "/model" }),
|
|
45493
|
+
/* @__PURE__ */ (0, import_jsx_runtime38.jsx)(Text, { color: theme.muted, children: " models" })
|
|
45494
|
+
] }),
|
|
45495
|
+
/* @__PURE__ */ (0, import_jsx_runtime38.jsxs)(Text, { children: [
|
|
45496
|
+
/* @__PURE__ */ (0, import_jsx_runtime38.jsx)(Text, { color: theme.fg, children: "/help" }),
|
|
45497
|
+
/* @__PURE__ */ (0, import_jsx_runtime38.jsx)(Text, { color: theme.muted, children: " commands" })
|
|
45498
|
+
] }),
|
|
45499
|
+
/* @__PURE__ */ (0, import_jsx_runtime38.jsxs)(Text, { children: [
|
|
45500
|
+
/* @__PURE__ */ (0, import_jsx_runtime38.jsx)(Text, { color: theme.fg, children: "shift+tab" }),
|
|
45501
|
+
/* @__PURE__ */ (0, import_jsx_runtime38.jsx)(Text, { color: theme.muted, children: " mode" })
|
|
45502
|
+
] })
|
|
45503
|
+
] }),
|
|
45504
|
+
/* @__PURE__ */ (0, import_jsx_runtime38.jsxs)(Box_default, { marginTop: 1, flexDirection: "row", children: [
|
|
45505
|
+
/* @__PURE__ */ (0, import_jsx_runtime38.jsx)(Text, { color: theme.warn, children: "\u25CF Tip " }),
|
|
45506
|
+
/* @__PURE__ */ (0, import_jsx_runtime38.jsx)(Text, { color: theme.muted, children: "Run " }),
|
|
45507
|
+
/* @__PURE__ */ (0, import_jsx_runtime38.jsx)(Text, { color: theme.fg, children: isGuest ? "/login" : "/model" }),
|
|
45508
|
+
/* @__PURE__ */ (0, import_jsx_runtime38.jsx)(Text, { color: theme.muted, children: isGuest ? " to unlock unlimited chat and tools." : " to switch models, or /help for all commands." })
|
|
45509
|
+
] })
|
|
45510
|
+
] }) : /* @__PURE__ */ (0, import_jsx_runtime38.jsxs)(import_jsx_runtime38.Fragment, { children: [
|
|
45511
|
+
/* @__PURE__ */ (0, import_jsx_runtime38.jsx)(Box_default, { marginTop: 1, children: busy && !permissionReq && /* @__PURE__ */ (0, import_jsx_runtime38.jsx)(Spinner2, { label: "thinking\u2026 (Ctrl+C to cancel)" }) }),
|
|
45512
|
+
/* @__PURE__ */ (0, import_jsx_runtime38.jsx)(Box_default, { marginTop: 1, children: /* @__PURE__ */ (0, import_jsx_runtime38.jsx)(StatusBar, { status }) })
|
|
45513
|
+
] })
|
|
45416
45514
|
] });
|
|
45417
45515
|
};
|
|
45418
45516
|
|
|
@@ -45677,13 +45775,14 @@ async function bootstrapMCP(opts = {}) {
|
|
|
45677
45775
|
init_store();
|
|
45678
45776
|
|
|
45679
45777
|
// src/tui/SetupWizard.tsx
|
|
45680
|
-
var
|
|
45778
|
+
var import_react29 = __toESM(require_react(), 1);
|
|
45681
45779
|
init_client();
|
|
45682
45780
|
init_crypto();
|
|
45683
45781
|
init_errors();
|
|
45684
45782
|
init_load();
|
|
45685
|
-
var
|
|
45783
|
+
var import_jsx_runtime39 = __toESM(require_jsx_runtime(), 1);
|
|
45686
45784
|
import { dirname as dirname16 } from "node:path";
|
|
45785
|
+
import { spawn as spawn8 } from "node:child_process";
|
|
45687
45786
|
var OPTIONS = [
|
|
45688
45787
|
{
|
|
45689
45788
|
id: "guest",
|
|
@@ -45700,10 +45799,10 @@ var SetupWizard = ({
|
|
|
45700
45799
|
baseUrl,
|
|
45701
45800
|
onDone
|
|
45702
45801
|
}) => {
|
|
45703
|
-
const [step, setStep] = (0,
|
|
45704
|
-
const [sel, setSel] = (0,
|
|
45705
|
-
const [keyVal, setKeyVal] = (0,
|
|
45706
|
-
const [error, setError] = (0,
|
|
45802
|
+
const [step, setStep] = (0, import_react29.useState)("choose");
|
|
45803
|
+
const [sel, setSel] = (0, import_react29.useState)(0);
|
|
45804
|
+
const [keyVal, setKeyVal] = (0, import_react29.useState)("");
|
|
45805
|
+
const [error, setError] = (0, import_react29.useState)(null);
|
|
45707
45806
|
use_input_default((input, key) => {
|
|
45708
45807
|
if (key.ctrl && input === "c") {
|
|
45709
45808
|
onDone({ mode: "cancel" });
|
|
@@ -45743,7 +45842,7 @@ var SetupWizard = ({
|
|
|
45743
45842
|
apiKey: k,
|
|
45744
45843
|
baseUrl,
|
|
45745
45844
|
clientType: "ide",
|
|
45746
|
-
userAgent: `kryven-cli/${"0.2.
|
|
45845
|
+
userAgent: `kryven-cli/${"0.2.5"}`
|
|
45747
45846
|
}).ping();
|
|
45748
45847
|
onDone({ mode: "key", key: k });
|
|
45749
45848
|
} catch (err) {
|
|
@@ -45752,8 +45851,8 @@ var SetupWizard = ({
|
|
|
45752
45851
|
}
|
|
45753
45852
|
})();
|
|
45754
45853
|
};
|
|
45755
|
-
return /* @__PURE__ */ (0,
|
|
45756
|
-
/* @__PURE__ */ (0,
|
|
45854
|
+
return /* @__PURE__ */ (0, import_jsx_runtime39.jsxs)(Box_default, { flexDirection: "column", children: [
|
|
45855
|
+
/* @__PURE__ */ (0, import_jsx_runtime39.jsxs)(
|
|
45757
45856
|
Box_default,
|
|
45758
45857
|
{
|
|
45759
45858
|
flexDirection: "column",
|
|
@@ -45762,18 +45861,18 @@ var SetupWizard = ({
|
|
|
45762
45861
|
paddingX: 2,
|
|
45763
45862
|
marginBottom: 1,
|
|
45764
45863
|
children: [
|
|
45765
|
-
/* @__PURE__ */ (0,
|
|
45766
|
-
/* @__PURE__ */ (0,
|
|
45864
|
+
/* @__PURE__ */ (0, import_jsx_runtime39.jsx)(Text, { bold: true, color: "magentaBright", children: "\u2726 Kryven CLI Setup Wizard" }),
|
|
45865
|
+
/* @__PURE__ */ (0, import_jsx_runtime39.jsx)(Text, { color: "gray", children: "Let's configure your Kryven CLI. Press Ctrl+C any time to exit." })
|
|
45767
45866
|
]
|
|
45768
45867
|
}
|
|
45769
45868
|
),
|
|
45770
|
-
step === "choose" && /* @__PURE__ */ (0,
|
|
45771
|
-
/* @__PURE__ */ (0,
|
|
45772
|
-
/* @__PURE__ */ (0,
|
|
45773
|
-
/* @__PURE__ */ (0,
|
|
45869
|
+
step === "choose" && /* @__PURE__ */ (0, import_jsx_runtime39.jsxs)(Box_default, { flexDirection: "column", paddingX: 1, children: [
|
|
45870
|
+
/* @__PURE__ */ (0, import_jsx_runtime39.jsx)(Text, { color: "white", children: "How would you like to start?" }),
|
|
45871
|
+
/* @__PURE__ */ (0, import_jsx_runtime39.jsx)(Text, { color: "gray", children: "Use \u2191/\u2193 (or 1-2), Enter to confirm." }),
|
|
45872
|
+
/* @__PURE__ */ (0, import_jsx_runtime39.jsx)(Box_default, { marginTop: 1, flexDirection: "column", children: OPTIONS.map((o2, i2) => {
|
|
45774
45873
|
const on6 = i2 === sel;
|
|
45775
|
-
return /* @__PURE__ */ (0,
|
|
45776
|
-
/* @__PURE__ */ (0,
|
|
45874
|
+
return /* @__PURE__ */ (0, import_jsx_runtime39.jsxs)(Box_default, { flexDirection: "column", marginBottom: 1, children: [
|
|
45875
|
+
/* @__PURE__ */ (0, import_jsx_runtime39.jsxs)(Text, { color: on6 ? "greenBright" : "white", bold: on6, children: [
|
|
45777
45876
|
on6 ? "(\u25CF)" : "(\u25CB)",
|
|
45778
45877
|
" ",
|
|
45779
45878
|
i2 + 1,
|
|
@@ -45781,20 +45880,20 @@ var SetupWizard = ({
|
|
|
45781
45880
|
o2.title,
|
|
45782
45881
|
o2.id === "guest" ? " (recommended)" : ""
|
|
45783
45882
|
] }),
|
|
45784
|
-
/* @__PURE__ */ (0,
|
|
45883
|
+
/* @__PURE__ */ (0, import_jsx_runtime39.jsxs)(Text, { color: "gray", children: [
|
|
45785
45884
|
" ",
|
|
45786
45885
|
o2.desc
|
|
45787
45886
|
] })
|
|
45788
45887
|
] }, o2.id);
|
|
45789
45888
|
}) }),
|
|
45790
|
-
error && /* @__PURE__ */ (0,
|
|
45889
|
+
error && /* @__PURE__ */ (0, import_jsx_runtime39.jsx)(Text, { color: "red", children: error })
|
|
45791
45890
|
] }),
|
|
45792
|
-
step === "enter-key" && /* @__PURE__ */ (0,
|
|
45793
|
-
/* @__PURE__ */ (0,
|
|
45794
|
-
/* @__PURE__ */ (0,
|
|
45795
|
-
/* @__PURE__ */ (0,
|
|
45796
|
-
/* @__PURE__ */ (0,
|
|
45797
|
-
/* @__PURE__ */ (0,
|
|
45891
|
+
step === "enter-key" && /* @__PURE__ */ (0, import_jsx_runtime39.jsxs)(Box_default, { flexDirection: "column", paddingX: 1, children: [
|
|
45892
|
+
/* @__PURE__ */ (0, import_jsx_runtime39.jsx)(Text, { children: "Paste your Kryven API key:" }),
|
|
45893
|
+
/* @__PURE__ */ (0, import_jsx_runtime39.jsx)(Text, { color: "gray", children: "Get one at https://kryven.cc/api-dashboard" }),
|
|
45894
|
+
/* @__PURE__ */ (0, import_jsx_runtime39.jsxs)(Box_default, { marginTop: 1, borderStyle: "round", borderColor: "cyan", paddingX: 1, children: [
|
|
45895
|
+
/* @__PURE__ */ (0, import_jsx_runtime39.jsx)(Text, { color: "cyan", children: "kry> " }),
|
|
45896
|
+
/* @__PURE__ */ (0, import_jsx_runtime39.jsx)(
|
|
45798
45897
|
build_default,
|
|
45799
45898
|
{
|
|
45800
45899
|
value: keyVal,
|
|
@@ -45805,16 +45904,28 @@ var SetupWizard = ({
|
|
|
45805
45904
|
}
|
|
45806
45905
|
)
|
|
45807
45906
|
] }),
|
|
45808
|
-
/* @__PURE__ */ (0,
|
|
45809
|
-
error && /* @__PURE__ */ (0,
|
|
45907
|
+
/* @__PURE__ */ (0, import_jsx_runtime39.jsx)(Text, { color: "gray", children: "Enter to validate \xB7 Esc to go back" }),
|
|
45908
|
+
error && /* @__PURE__ */ (0, import_jsx_runtime39.jsx)(Text, { color: "red", children: error })
|
|
45810
45909
|
] }),
|
|
45811
|
-
step === "validating" && /* @__PURE__ */ (0,
|
|
45910
|
+
step === "validating" && /* @__PURE__ */ (0, import_jsx_runtime39.jsx)(Box_default, { paddingX: 1, children: /* @__PURE__ */ (0, import_jsx_runtime39.jsx)(Text, { color: "yellow", children: "Validating key against /v1/models\u2026" }) })
|
|
45812
45911
|
] });
|
|
45813
45912
|
};
|
|
45913
|
+
function openBrowser(url) {
|
|
45914
|
+
try {
|
|
45915
|
+
if (process.platform === "win32") {
|
|
45916
|
+
spawn8("cmd", ["/c", "start", "", url], { detached: true, stdio: "ignore" }).unref();
|
|
45917
|
+
} else if (process.platform === "darwin") {
|
|
45918
|
+
spawn8("open", [url], { detached: true, stdio: "ignore" }).unref();
|
|
45919
|
+
} else {
|
|
45920
|
+
spawn8("xdg-open", [url], { detached: true, stdio: "ignore" }).unref();
|
|
45921
|
+
}
|
|
45922
|
+
} catch {
|
|
45923
|
+
}
|
|
45924
|
+
}
|
|
45814
45925
|
function runSetupWizard(baseUrl) {
|
|
45815
45926
|
return new Promise((resolve7) => {
|
|
45816
45927
|
const instance = render_default(
|
|
45817
|
-
/* @__PURE__ */ (0,
|
|
45928
|
+
/* @__PURE__ */ (0, import_jsx_runtime39.jsx)(
|
|
45818
45929
|
SetupWizard,
|
|
45819
45930
|
{
|
|
45820
45931
|
baseUrl,
|
|
@@ -45846,11 +45957,11 @@ async function maybeRunFirstRunSetup(opts) {
|
|
|
45846
45957
|
console.log(source_default.green("\n[OK] API key validated and saved. You're all set.\n"));
|
|
45847
45958
|
} else {
|
|
45848
45959
|
saveUserConfig({ ...cur, setupComplete: true });
|
|
45849
|
-
|
|
45850
|
-
|
|
45851
|
-
|
|
45852
|
-
|
|
45853
|
-
);
|
|
45960
|
+
const plansUrl = `${cfg.apiBaseUrl.replace(/\/$/, "")}/cli`;
|
|
45961
|
+
openBrowser(plansUrl);
|
|
45962
|
+
console.log(source_default.cyan("\n-> Starting in guest mode (3 free prompts)."));
|
|
45963
|
+
console.log(source_default.gray(` Opened our plans in your browser: ${plansUrl}`));
|
|
45964
|
+
console.log(source_default.gray(" Run /login (or `kryven login`) anytime to sign in.\n"));
|
|
45854
45965
|
}
|
|
45855
45966
|
}
|
|
45856
45967
|
|
|
@@ -45865,7 +45976,7 @@ async function chatCommand(opts = {}) {
|
|
|
45865
45976
|
client = new GuestKryvenClient({
|
|
45866
45977
|
baseUrl: cfg.apiBaseUrl,
|
|
45867
45978
|
shareFingerprint: cfg.shareFingerprint !== false,
|
|
45868
|
-
userAgent: `kryven-cli/${"0.2.
|
|
45979
|
+
userAgent: `kryven-cli/${"0.2.5"}`
|
|
45869
45980
|
});
|
|
45870
45981
|
console.log(source_default.cyan("Guest mode \u2014 3 free prompts. Run `kryven login` for unlimited chat."));
|
|
45871
45982
|
} else {
|
|
@@ -45873,7 +45984,7 @@ async function chatCommand(opts = {}) {
|
|
|
45873
45984
|
apiKey: cfg.apiKey,
|
|
45874
45985
|
baseUrl: cfg.apiBaseUrl,
|
|
45875
45986
|
clientType: "ide",
|
|
45876
|
-
userAgent: `kryven-cli/${"0.2.
|
|
45987
|
+
userAgent: `kryven-cli/${"0.2.5"}`
|
|
45877
45988
|
});
|
|
45878
45989
|
}
|
|
45879
45990
|
let resumeMessages;
|
|
@@ -45940,7 +46051,7 @@ async function chatCommand(opts = {}) {
|
|
|
45940
46051
|
logger.warn("config save (touch) failed", String(err));
|
|
45941
46052
|
}
|
|
45942
46053
|
const { waitUntilExit } = render_default(
|
|
45943
|
-
|
|
46054
|
+
import_react30.default.createElement(REPL, {
|
|
45944
46055
|
client,
|
|
45945
46056
|
initialModel: model,
|
|
45946
46057
|
initialMood: mood,
|
|
@@ -45961,7 +46072,7 @@ async function chatCommand(opts = {}) {
|
|
|
45961
46072
|
init_execa();
|
|
45962
46073
|
|
|
45963
46074
|
// src/shims/version.ts
|
|
45964
|
-
var KRYVEN_VERSION = "0.2.
|
|
46075
|
+
var KRYVEN_VERSION = "0.2.5";
|
|
45965
46076
|
|
|
45966
46077
|
// src/commands/update.ts
|
|
45967
46078
|
var PACKAGE2 = "@kryvenaiofficial/kryven";
|
|
@@ -45994,7 +46105,7 @@ import { writeFile as writeFile11, mkdir as mkdir13 } from "node:fs/promises";
|
|
|
45994
46105
|
import { existsSync as existsSync23 } from "node:fs";
|
|
45995
46106
|
import { join as join32 } from "node:path";
|
|
45996
46107
|
import { homedir as homedir12 } from "node:os";
|
|
45997
|
-
import { spawn as
|
|
46108
|
+
import { spawn as spawn9 } from "node:child_process";
|
|
45998
46109
|
var SCOPE_LABEL3 = {
|
|
45999
46110
|
"project-kryven": "project (.kryven)",
|
|
46000
46111
|
"project-claude": "project (.claude)",
|
|
@@ -46104,7 +46215,7 @@ async function skillsCreate(name) {
|
|
|
46104
46215
|
const editor = process.env.EDITOR || process.env.VISUAL || "vi";
|
|
46105
46216
|
console.log(source_default.dim(`Opening in ${editor}\u2026`));
|
|
46106
46217
|
await new Promise((resolveP) => {
|
|
46107
|
-
const child =
|
|
46218
|
+
const child = spawn9(editor, [file], { stdio: "inherit" });
|
|
46108
46219
|
child.on("close", () => resolveP());
|
|
46109
46220
|
child.on("error", () => resolveP());
|
|
46110
46221
|
});
|
|
@@ -46142,7 +46253,7 @@ async function skillsUpdate(name) {
|
|
|
46142
46253
|
continue;
|
|
46143
46254
|
}
|
|
46144
46255
|
const r = await new Promise((resolveP) => {
|
|
46145
|
-
const child =
|
|
46256
|
+
const child = spawn9("git", ["-C", dir, "pull", "--ff-only"], { stdio: ["ignore", "pipe", "pipe"] });
|
|
46146
46257
|
const chunks = [];
|
|
46147
46258
|
child.stdout.on("data", (d) => chunks.push(d));
|
|
46148
46259
|
child.stderr.on("data", (d) => chunks.push(d));
|
|
@@ -46342,7 +46453,7 @@ async function main(argv2) {
|
|
|
46342
46453
|
var argv = process.argv.slice(2);
|
|
46343
46454
|
var first = argv[0];
|
|
46344
46455
|
if (first === "--version" || first === "-v" || first === "-V") {
|
|
46345
|
-
const v = "0.2.
|
|
46456
|
+
const v = "0.2.5";
|
|
46346
46457
|
process.stdout.write(v + "\n");
|
|
46347
46458
|
process.exit(0);
|
|
46348
46459
|
}
|