@metaphi-ai/hum 0.1.21 → 0.1.23

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.
Files changed (2) hide show
  1. package/dist/cli.mjs +10 -11
  2. 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: "pick the model \u2014 enter makes it the default, s for this session only; /model <name> switches here" },
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.21" : hello.version || "0.0.0").then((line) => {
84319
+ updateNotice(true ? "0.1.23" : 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 = (isDefault) => {
84386
+ const pick = () => {
84387
84387
  setPicker(null);
84388
- if (it.current && !isDefault) return;
84388
+ if (it.current) return;
84389
84389
  modelRef.current = it.name;
84390
- engine2.send({ cmd: "model", name: it.name, default: isDefault });
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(true);
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: `Your pick becomes the default for new sessions.${picker.via ? ` Served via ${picker.via}.` : ""}${picker.byo.length ? ` Your own keys: ${picker.byo.join(", ")} \u2014 /model <provider>/<model> uses one.` : ""}` }),
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 ") + (m.default ? (m.note || price ? " \xB7 " : "") + "default" : "");
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 set as default \xB7 s to use this session only \xB7 Esc to cancel" })
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.21" : "0.0.0"}
85138
+ process.stdout.write(`hum ${true ? "0.1.23" : "0.0.0"}
85140
85139
  `);
85141
85140
  process.exit(0);
85142
85141
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@metaphi-ai/hum",
3
- "version": "0.1.21",
3
+ "version": "0.1.23",
4
4
  "description": "Hum (हम): a self-improving coding agent for your terminal.",
5
5
  "license": "UNLICENSED",
6
6
  "type": "module",