darkfoo-code 0.2.2 → 0.2.3

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/main.js +18 -8
  2. package/package.json +1 -1
package/dist/main.js CHANGED
@@ -2517,7 +2517,7 @@ function Banner({ model, cwd, providerName, providerOnline }) {
2517
2517
  ] }),
2518
2518
  /* @__PURE__ */ jsxs2(Box2, { marginTop: 1, marginLeft: 2, children: [
2519
2519
  /* @__PURE__ */ jsx3(Text2, { color: theme.dim ?? "#7e8ea6", children: "model " }),
2520
- /* @__PURE__ */ jsx3(Text2, { color: theme.cyan ?? "#5eead4", bold: true, children: model })
2520
+ model ? /* @__PURE__ */ jsx3(Text2, { color: theme.cyan ?? "#5eead4", bold: true, children: model }) : /* @__PURE__ */ jsx3(Text2, { color: theme.dim ?? "#7e8ea6", children: "--" })
2521
2521
  ] }),
2522
2522
  /* @__PURE__ */ jsxs2(Box2, { marginLeft: 2, children: [
2523
2523
  /* @__PURE__ */ jsx3(Text2, { color: theme.dim ?? "#7e8ea6", children: "via " }),
@@ -2715,7 +2715,7 @@ function StatusLine({ model, messageCount, tokenEstimate, isStreaming }) {
2715
2715
  "\u2500".repeat(2),
2716
2716
  " "
2717
2717
  ] }),
2718
- /* @__PURE__ */ jsx6(Text5, { color: theme.cyan, bold: true, children: model.split(":")[0] }),
2718
+ /* @__PURE__ */ jsx6(Text5, { color: theme.cyan, bold: true, children: model ? model.split(":")[0] : "--" }),
2719
2719
  /* @__PURE__ */ jsx6(Text5, { color: theme.dim, children: " \u2502 " }),
2720
2720
  /* @__PURE__ */ jsxs5(Text5, { color: theme.dim, children: [
2721
2721
  messageCount,
@@ -3947,9 +3947,15 @@ function REPL({ initialPrompt }) {
3947
3947
  const provider = getProvider();
3948
3948
  provider.healthCheck().then((ok) => {
3949
3949
  setProviderOnline(ok);
3950
- if (!ok) return;
3950
+ if (!ok) {
3951
+ setModel("");
3952
+ return;
3953
+ }
3951
3954
  provider.listModels().then((models) => {
3952
- if (models.length === 0) return;
3955
+ if (models.length === 0) {
3956
+ setModel("");
3957
+ return;
3958
+ }
3953
3959
  const requested = model.toLowerCase();
3954
3960
  const match = models.find((m) => m.name.toLowerCase() === requested);
3955
3961
  if (match) {
@@ -3960,10 +3966,14 @@ function REPL({ initialPrompt }) {
3960
3966
  if (preferred) {
3961
3967
  setModel(preferred.name);
3962
3968
  setCommandOutput(`Model "${model}" not found. Using ${preferred.name} instead.`);
3969
+ } else {
3970
+ setModel("");
3963
3971
  }
3964
- }).catch(() => {
3965
- });
3966
- }).catch(() => setProviderOnline(false));
3972
+ }).catch(() => setModel(""));
3973
+ }).catch(() => {
3974
+ setProviderOnline(false);
3975
+ setModel("");
3976
+ });
3967
3977
  }, []);
3968
3978
  const commandContext = {
3969
3979
  messages,
@@ -4234,7 +4244,7 @@ program.name("darkfoo").description("Darkfoo Code \u2014 local AI coding assista
4234
4244
  }
4235
4245
  }
4236
4246
  const { getProvider: getProvider2 } = await Promise.resolve().then(() => (init_providers(), providers_exports));
4237
- let resolvedModel = model;
4247
+ let resolvedModel = "";
4238
4248
  try {
4239
4249
  const models = await getProvider2().listModels();
4240
4250
  if (models.length > 0) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "darkfoo-code",
3
- "version": "0.2.2",
3
+ "version": "0.2.3",
4
4
  "description": "Darkfoo Code — local AI coding assistant powered by Ollama, vLLM, llama.cpp, and other LLM providers",
5
5
  "type": "module",
6
6
  "license": "MIT",