@metaphi-ai/hum 0.1.21 → 0.1.22
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 +10 -11
- package/package.json +1 -1
package/dist/cli.mjs
CHANGED
|
@@ -83898,7 +83898,7 @@ var tail = (s, n) => {
|
|
|
83898
83898
|
var COMMANDS = [
|
|
83899
83899
|
{ name: "/resume", desc: "pick a past session to continue (this machine or any other)" },
|
|
83900
83900
|
{ name: "/compact", desc: "summarise and restart the context now" },
|
|
83901
|
-
{ name: "/model", desc: "
|
|
83901
|
+
{ name: "/model", desc: "switch between the models you can use; /model <name> switches straight away" },
|
|
83902
83902
|
{ name: "/cost", desc: "tokens and cost so far" },
|
|
83903
83903
|
{ name: "/approve", desc: "approvals on|off \u2014 whether every change and command waits for you first (leaving the sandbox always asks)" },
|
|
83904
83904
|
{ name: "/continue", desc: "after a pause: let the agent carry on" },
|
|
@@ -84316,7 +84316,7 @@ function App2({ engine: engine2, task, resume, images = [] }) {
|
|
|
84316
84316
|
(0, import_react24.useEffect)(() => {
|
|
84317
84317
|
if (!hello) return void 0;
|
|
84318
84318
|
let live = true;
|
|
84319
|
-
updateNotice(true ? "0.1.
|
|
84319
|
+
updateNotice(true ? "0.1.22" : hello.version || "0.0.0").then((line) => {
|
|
84320
84320
|
if (live && line) append({ kind: "info", text: line });
|
|
84321
84321
|
}).catch(() => {
|
|
84322
84322
|
});
|
|
@@ -84383,17 +84383,16 @@ function App2({ engine: engine2, task, resume, images = [] }) {
|
|
|
84383
84383
|
}
|
|
84384
84384
|
if (picker && picker.kind === "model") {
|
|
84385
84385
|
const it = picker.items[picker.index];
|
|
84386
|
-
const pick = (
|
|
84386
|
+
const pick = () => {
|
|
84387
84387
|
setPicker(null);
|
|
84388
|
-
if (it.current
|
|
84388
|
+
if (it.current) return;
|
|
84389
84389
|
modelRef.current = it.name;
|
|
84390
|
-
engine2.send({ cmd: "model", name: it.name
|
|
84390
|
+
engine2.send({ cmd: "model", name: it.name });
|
|
84391
84391
|
};
|
|
84392
84392
|
if (key.upArrow) setPicker((p) => ({ ...p, index: (p.index + p.items.length - 1) % p.items.length }));
|
|
84393
84393
|
else if (key.downArrow || key.tab) setPicker((p) => ({ ...p, index: (p.index + 1) % p.items.length }));
|
|
84394
84394
|
else if (key.escape) setPicker(null);
|
|
84395
|
-
else if (key.return) pick(
|
|
84396
|
-
else if (input === "s") pick(false);
|
|
84395
|
+
else if (key.return) pick();
|
|
84397
84396
|
else if (/^[1-9]$/.test(input) && Number(input) <= picker.items.length) setPicker((p) => ({ ...p, index: Number(input) - 1 }));
|
|
84398
84397
|
return;
|
|
84399
84398
|
}
|
|
@@ -84758,13 +84757,13 @@ function App2({ engine: engine2, task, resume, images = [] }) {
|
|
|
84758
84757
|
] }),
|
|
84759
84758
|
picker && picker.kind === "model" && /* @__PURE__ */ (0, import_jsx_runtime2.jsxs)(Box_default, { flexDirection: "column", paddingX: 1, marginTop: 1, children: [
|
|
84760
84759
|
/* @__PURE__ */ (0, import_jsx_runtime2.jsx)(Text, { color: ACCENT, bold: true, children: "Select model" }),
|
|
84761
|
-
/* @__PURE__ */ (0, import_jsx_runtime2.jsx)(Text, { dimColor: true, children: `
|
|
84760
|
+
/* @__PURE__ */ (0, import_jsx_runtime2.jsx)(Text, { dimColor: true, children: `Switch between open source models. Served via Metaphi AI.${picker.byo.length ? ` Your own keys: ${picker.byo.join(", ")} \u2014 /model <provider>/<model> uses one.` : ""}` }),
|
|
84762
84761
|
/* @__PURE__ */ (0, import_jsx_runtime2.jsx)(Text, { children: " " }),
|
|
84763
84762
|
(() => {
|
|
84764
84763
|
const nameW = Math.max(...picker.items.map((m) => m.name.length + (m.current ? 2 : 0)));
|
|
84765
84764
|
return picker.items.map((m, i) => {
|
|
84766
84765
|
const price = m.price_per_m && m.price_per_m.length === 2 && (m.price_per_m[0] || m.price_per_m[1]) ? `$${m.price_per_m[0]}/$${m.price_per_m[1]} per M` : "";
|
|
84767
|
-
const about = [m.note, price].filter(Boolean).join(" \xB7 ")
|
|
84766
|
+
const about = [m.note, price].filter(Boolean).join(" \xB7 ");
|
|
84768
84767
|
const label = `${i + 1}. ${m.name}${m.current ? " \u2713" : ""}`.padEnd(nameW + 4);
|
|
84769
84768
|
return /* @__PURE__ */ (0, import_jsx_runtime2.jsxs)(Box_default, { children: [
|
|
84770
84769
|
/* @__PURE__ */ (0, import_jsx_runtime2.jsx)(Text, { color: ACCENT, children: i === picker.index ? "\u276F " : " " }),
|
|
@@ -84777,7 +84776,7 @@ function App2({ engine: engine2, task, resume, images = [] }) {
|
|
|
84777
84776
|
});
|
|
84778
84777
|
})(),
|
|
84779
84778
|
/* @__PURE__ */ (0, import_jsx_runtime2.jsx)(Text, { children: " " }),
|
|
84780
|
-
/* @__PURE__ */ (0, import_jsx_runtime2.jsx)(Text, { dimColor: true, children: "Enter to
|
|
84779
|
+
/* @__PURE__ */ (0, import_jsx_runtime2.jsx)(Text, { dimColor: true, children: "Enter to switch \xB7 Esc to cancel" })
|
|
84781
84780
|
] }),
|
|
84782
84781
|
picker && picker.kind === "session" && (() => {
|
|
84783
84782
|
const { rows, scope } = sessionRows(picker, hello?.cwd);
|
|
@@ -85136,7 +85135,7 @@ import { spawnSync as spawnSync3 } from "node:child_process";
|
|
|
85136
85135
|
var ENGINE_COMMANDS = /* @__PURE__ */ new Set(["run", "login", "logout", "whoami", "model", "key", "sessions", "show", "sync", "skill", "ps", "stop", "hooks", "engine"]);
|
|
85137
85136
|
var argv0 = process.argv.slice(2);
|
|
85138
85137
|
if (argv0[0] === "--version" || argv0[0] === "-V") {
|
|
85139
|
-
process.stdout.write(`hum ${true ? "0.1.
|
|
85138
|
+
process.stdout.write(`hum ${true ? "0.1.22" : "0.0.0"}
|
|
85140
85139
|
`);
|
|
85141
85140
|
process.exit(0);
|
|
85142
85141
|
}
|