codeshark-cli 0.1.4 → 0.1.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/config.js +3 -0
- package/dist/repl.js +1 -8
- package/package.json +1 -1
package/dist/config.js
CHANGED
|
@@ -36,6 +36,9 @@ export function loadConfig() {
|
|
|
36
36
|
delete cfg[key];
|
|
37
37
|
if (cfg.provider && !["gateway", "openrouter", "nvidia", "gemini", "ollama", "unorouter"].includes(cfg.provider))
|
|
38
38
|
delete cfg.provider;
|
|
39
|
+
// Self-heal: drop a saved model that a provider retired so the current default applies.
|
|
40
|
+
if (cfg.model && isRetiredModel(cfg.model))
|
|
41
|
+
delete cfg.model;
|
|
39
42
|
return cfg;
|
|
40
43
|
}
|
|
41
44
|
catch {
|
package/dist/repl.js
CHANGED
|
@@ -5,7 +5,7 @@ import { runAgent } from "./agent.js";
|
|
|
5
5
|
import { ProviderError, errorMessage } from "./provider/types.js";
|
|
6
6
|
import { runSetup } from "./setup.js";
|
|
7
7
|
import { loadConfig, modelLabel, saveConfig } from "./config.js";
|
|
8
|
-
import { DEFAULT_MODEL_ID, MODELS,
|
|
8
|
+
import { DEFAULT_MODEL_ID, MODELS, findModel } from "./models.js";
|
|
9
9
|
import { launchKeysPage } from "./keysPage.js";
|
|
10
10
|
import { defaultSystemPrompt } from "./system.js";
|
|
11
11
|
import { modelAvailability, modelAvailabilityReason } from "./modelAvailability.js";
|
|
@@ -52,13 +52,6 @@ export function printModelInfo() {
|
|
|
52
52
|
const note = status === "unavailable" ? `Unavailable${modelAvailabilityReason(m.id) ? ` — ${modelAvailabilityReason(m.id)}` : ""}` : m.notes;
|
|
53
53
|
console.log(` ${marker} ${m.label.padEnd(28)} ${dim(m.context.padEnd(5))} ${status === "unavailable" ? hex("#f87171", note) : note}`);
|
|
54
54
|
}
|
|
55
|
-
for (const m of RETIRED_MODELS) {
|
|
56
|
-
console.log(` ${hex("#f87171", "✗")} ${m.label.padEnd(28)} ${dim(m.context.padEnd(5))} ${hex("#f87171", "Unavailable — removed by provider")}`);
|
|
57
|
-
}
|
|
58
|
-
const cfgModel = loadConfig().model;
|
|
59
|
-
if (cfgModel && isRetiredModel(cfgModel)) {
|
|
60
|
-
console.log(hex("#f87171", ` ✗ Saved model "${cfgModel}" is unavailable. Using ${findModel(DEFAULT_MODEL_ID)?.label ?? DEFAULT_MODEL_ID}.`));
|
|
61
|
-
}
|
|
62
55
|
console.log("");
|
|
63
56
|
console.log(dim(" Switch with: /model <name>"));
|
|
64
57
|
console.log(dim(" Names: gpt, deepseek, minimax, glm, gemini-3.6, sarvam, gpt-oss, nemotron"));
|