zen-code 2.5.0 → 3.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/FileSystemConfigStore-Bog5vylu.mjs +47 -0
- package/dist/FileSystemPluginStore-ChortK7z.mjs +64 -0
- package/dist/FileSystemSkillStore-yvEvcRxB.mjs +94 -0
- package/dist/{app-D7EFi2lc.mjs → app-DBEp0HbC.mjs} +4433 -3744
- package/dist/{checkpoint-1sAx_j1E-2KEgQSbn.mjs → checkpoint-1sAx_j1E-BlqgvrDY.mjs} +2 -2
- package/dist/{checkpoint-DxiUsHMy-CvsyiZdv.mjs → checkpoint-DxiUsHMy-BWVXO0Oa.mjs} +2 -2
- package/dist/{MultiSelect-DrVbSEyF.mjs → get_allowed_models-I8bki8ev.mjs} +38 -39
- package/dist/{graph-aTwGGPhX.mjs → graphBuilder-BttmR-dZ.mjs} +5024 -4669
- package/dist/{id-D-r9rdKn.mjs → id-C3QYmEcI.mjs} +1 -1
- package/dist/{index-D25iqtGU.mjs → index-BmxiURq0.mjs} +3 -3
- package/dist/index-P-c4tqBO.mjs +194 -0
- package/dist/nonInteractive.mjs +31 -26
- package/dist/{queue-D6tEGCGs-Bv6hdJDG.mjs → queue-D6tEGCGs-BLJPuWhS.mjs} +1 -1
- package/dist/{shallow-B61ANZTA.mjs → shallow-Cn-uyrVQ.mjs} +3 -3
- package/dist/tasks-BemLKkuC.mjs +112 -0
- package/dist/zen-code.mjs +1 -1
- package/dist/zen-init.mjs +43 -43
- package/package.json +5 -2
- package/dist/index-DpsJ-2by.mjs +0 -23
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { K as T } from "./kysely-Bchvsze0.mjs";
|
|
2
2
|
import { F as r } from "./sql-CJsUpKEQ.mjs";
|
|
3
|
-
import { B as f, T as l, c as y, m } from "./app-
|
|
4
|
-
import "./
|
|
3
|
+
import { B as f, T as l, c as y, m } from "./app-DBEp0HbC.mjs";
|
|
4
|
+
import "./graphBuilder-BttmR-dZ.mjs";
|
|
5
5
|
const g = ["source", "step", "parents"];
|
|
6
6
|
const E = g;
|
|
7
7
|
class w extends f {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { T as l, B as N, W as k, m as y } from "./app-
|
|
2
|
-
import "./
|
|
1
|
+
import { T as l, B as N, W as k, m as y } from "./app-DBEp0HbC.mjs";
|
|
2
|
+
import "./graphBuilder-BttmR-dZ.mjs";
|
|
3
3
|
import w from "pg";
|
|
4
4
|
const S = (h) => [
|
|
5
5
|
"checkpoints",
|
|
@@ -173,26 +173,6 @@ function er({ type: n = "dots" }) {
|
|
|
173
173
|
};
|
|
174
174
|
}, [t]), y.createElement(D, null, t.frames[r]);
|
|
175
175
|
}
|
|
176
|
-
const Un = async () => {
|
|
177
|
-
if (!process.env.ANTHROPIC_API_KEY) return [];
|
|
178
|
-
let n = [];
|
|
179
|
-
for await (const r of new re().beta.models.list())
|
|
180
|
-
n.push({
|
|
181
|
-
id: r.id,
|
|
182
|
-
name: r.display_name,
|
|
183
|
-
provider: "anthropic"
|
|
184
|
-
});
|
|
185
|
-
return n;
|
|
186
|
-
}, Wn = async () => process.env.OPENAI_API_KEY ? new ne().models.list().then(
|
|
187
|
-
(n) => n.data.map((r) => ({
|
|
188
|
-
id: r.id,
|
|
189
|
-
name: r.id,
|
|
190
|
-
provider: "openai"
|
|
191
|
-
})).sort((r, c) => r.id.localeCompare(c.id))
|
|
192
|
-
) : [], nr = async () => Promise.all([
|
|
193
|
-
Un().catch((n) => (console.log(n), [])),
|
|
194
|
-
Wn().catch((n) => (console.log(n), []))
|
|
195
|
-
]).then((n) => n.flat());
|
|
196
176
|
function $(n) {
|
|
197
177
|
if (n.length === 0)
|
|
198
178
|
return [""];
|
|
@@ -207,7 +187,7 @@ function B(n) {
|
|
|
207
187
|
return n.join(`
|
|
208
188
|
`);
|
|
209
189
|
}
|
|
210
|
-
function
|
|
190
|
+
function Un(n, r, c) {
|
|
211
191
|
const t = Math.max(0, r), s = Math.min(n, t + c);
|
|
212
192
|
return { start: t, end: s };
|
|
213
193
|
}
|
|
@@ -247,7 +227,7 @@ function U(n, r, c) {
|
|
|
247
227
|
return s;
|
|
248
228
|
}
|
|
249
229
|
}
|
|
250
|
-
const
|
|
230
|
+
const Wn = m.memo(function({
|
|
251
231
|
content: r,
|
|
252
232
|
lineNumber: c,
|
|
253
233
|
showCursor: t,
|
|
@@ -265,7 +245,7 @@ const Kn = m.memo(function({
|
|
|
265
245
|
}, [r, t, s, u]);
|
|
266
246
|
return /* @__PURE__ */ b.jsx(D, { children: h });
|
|
267
247
|
});
|
|
268
|
-
function
|
|
248
|
+
function nr({
|
|
269
249
|
id: n,
|
|
270
250
|
placeholder: r = "",
|
|
271
251
|
autoFocus: c = !0,
|
|
@@ -305,7 +285,7 @@ function rr({
|
|
|
305
285
|
}), x.current = s);
|
|
306
286
|
}, [s]);
|
|
307
287
|
const E = m.useMemo(() => p || Math.min(10, e.lines.length), [p, e.lines.length]), { start: P, end: H } = m.useMemo(
|
|
308
|
-
() =>
|
|
288
|
+
() => Un(e.lines.length, e.firstVisibleLine, E),
|
|
309
289
|
[e.lines.length, e.firstVisibleLine, E]
|
|
310
290
|
), A = m.useCallback(
|
|
311
291
|
(_, l) => {
|
|
@@ -519,7 +499,7 @@ function rr({
|
|
|
519
499
|
}), d(M);
|
|
520
500
|
}
|
|
521
501
|
} else {
|
|
522
|
-
const o = e.lines[e.cursorLine], f = o.slice(0, e.cursorColumn) + _ + o
|
|
502
|
+
const o = e.lines[e.cursorLine], f = o.slice(0, e.cursorColumn) + _ + (o?.slice(e.cursorColumn) || ""), i = [...e.lines];
|
|
523
503
|
i[e.cursorLine] = f, g({
|
|
524
504
|
...e,
|
|
525
505
|
lines: i,
|
|
@@ -532,7 +512,7 @@ function rr({
|
|
|
532
512
|
return e.lines.length === 0 || e.lines.every((_) => _.length === 0) ? !w || !t ? /* @__PURE__ */ b.jsx(D, { children: T.grey(r) }) : /* @__PURE__ */ b.jsx(D, { children: T.inverse(r[0] || " ") + T.grey(r.slice(1)) }) : /* @__PURE__ */ b.jsx(O, { flexDirection: "column", children: V.map((_, l) => {
|
|
533
513
|
const o = P + l;
|
|
534
514
|
return /* @__PURE__ */ b.jsx(
|
|
535
|
-
|
|
515
|
+
Wn,
|
|
536
516
|
{
|
|
537
517
|
content: _,
|
|
538
518
|
lineNumber: o,
|
|
@@ -544,10 +524,10 @@ function rr({
|
|
|
544
524
|
);
|
|
545
525
|
}) });
|
|
546
526
|
}
|
|
547
|
-
const
|
|
527
|
+
const $n = (n, r, c) => {
|
|
548
528
|
const t = parseInt(n.slice(1, 3), 16), s = parseInt(n.slice(3, 5), 16), u = parseInt(n.slice(5, 7), 16), h = parseInt(r.slice(1, 3), 16), I = parseInt(r.slice(3, 5), 16), a = parseInt(r.slice(5, 7), 16), p = Math.round(t + c * (h - t)), v = Math.round(s + c * (I - s)), w = Math.round(u + c * (a - u));
|
|
549
529
|
return `#${((1 << 24) + (p << 16) + (v << 8) + w).toString(16).slice(1).toUpperCase()}`;
|
|
550
|
-
},
|
|
530
|
+
}, rr = ({
|
|
551
531
|
text: n,
|
|
552
532
|
highlightColor: r = "#00FFFF",
|
|
553
533
|
// Cyan
|
|
@@ -569,18 +549,18 @@ const zn = (n, r, c) => {
|
|
|
569
549
|
let x = c, e = !1;
|
|
570
550
|
if (j < s) {
|
|
571
551
|
const g = Math.cos(j / s * (Math.PI / 2)), E = Math.pow(g, 2);
|
|
572
|
-
x =
|
|
552
|
+
x = $n(c, r, E), e = j < 1;
|
|
573
553
|
}
|
|
574
554
|
return /* @__PURE__ */ b.jsx(D, { color: x, bold: e, children: p }, v);
|
|
575
555
|
}) });
|
|
576
|
-
},
|
|
556
|
+
}, Kn = ({ option: n, isSelected: r, isHighlighted: c, isFocused: t, isComponentDisabled: s }) => {
|
|
577
557
|
const u = !t || s;
|
|
578
558
|
let h = "white";
|
|
579
559
|
return n.disabled ? h = "gray" : r ? h = t ? "green" : "gray" : c && t ? h = "cyan" : u && (h = "gray"), /* @__PURE__ */ b.jsx(O, { children: /* @__PURE__ */ b.jsxs(D, { color: h, children: [
|
|
580
560
|
r ? "◉ " : "○ ",
|
|
581
561
|
n.label
|
|
582
562
|
] }) });
|
|
583
|
-
},
|
|
563
|
+
}, zn = ({ isSelected: n }) => /* @__PURE__ */ b.jsx(D, { color: n ? "green" : "gray", children: n ? "◉" : "○" }), Yn = ({ values: n }) => /* @__PURE__ */ b.jsx(b.Fragment, {}), sr = ({
|
|
584
564
|
options: n,
|
|
585
565
|
values: r,
|
|
586
566
|
defaultValues: c = [],
|
|
@@ -588,9 +568,9 @@ const zn = (n, r, c) => {
|
|
|
588
568
|
onSubmit: s,
|
|
589
569
|
disabled: u = !1,
|
|
590
570
|
highlightText: h,
|
|
591
|
-
itemComponent: I =
|
|
592
|
-
indicatorComponent: a =
|
|
593
|
-
statusComponent: p =
|
|
571
|
+
itemComponent: I = Kn,
|
|
572
|
+
indicatorComponent: a = zn,
|
|
573
|
+
statusComponent: p = Yn,
|
|
594
574
|
autoFocus: v = !0,
|
|
595
575
|
singleSelect: w = !1
|
|
596
576
|
}) => {
|
|
@@ -640,13 +620,32 @@ const zn = (n, r, c) => {
|
|
|
640
620
|
) }, d.value);
|
|
641
621
|
}) })
|
|
642
622
|
] });
|
|
643
|
-
}
|
|
623
|
+
}, Qn = async () => {
|
|
624
|
+
if (!process.env.ANTHROPIC_API_KEY) return [];
|
|
625
|
+
let n = [];
|
|
626
|
+
for await (const r of new re().beta.models.list())
|
|
627
|
+
n.push({
|
|
628
|
+
id: r.id,
|
|
629
|
+
name: r.display_name,
|
|
630
|
+
provider: "anthropic"
|
|
631
|
+
});
|
|
632
|
+
return n;
|
|
633
|
+
}, Zn = async () => process.env.OPENAI_API_KEY ? new ne().models.list().then(
|
|
634
|
+
(n) => n.data.map((r) => ({
|
|
635
|
+
id: r.id,
|
|
636
|
+
name: r.id,
|
|
637
|
+
provider: "openai"
|
|
638
|
+
})).sort((r, c) => r.id.localeCompare(c.id))
|
|
639
|
+
) : [], tr = async () => Promise.all([
|
|
640
|
+
Qn().catch((n) => (console.log(n), [])),
|
|
641
|
+
Zn().catch((n) => (console.log(n), []))
|
|
642
|
+
]).then((n) => n.flat());
|
|
644
643
|
export {
|
|
645
|
-
|
|
646
|
-
|
|
647
|
-
|
|
644
|
+
sr as M,
|
|
645
|
+
rr as S,
|
|
646
|
+
nr as a,
|
|
648
647
|
er as b,
|
|
649
648
|
Q as c,
|
|
650
|
-
|
|
649
|
+
tr as g,
|
|
651
650
|
se as u
|
|
652
651
|
};
|