@enigmax/dashboard 0.1.99 → 0.1.100

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/assets/index.html +14 -5
  2. package/package.json +1 -1
package/assets/index.html CHANGED
@@ -4489,7 +4489,7 @@ export {
4489
4489
  ],
4490
4490
  };
4491
4491
  const GATE_MODEL_CUSTOM = "__custom__";
4492
- let gateSavedModel = "";
4492
+ let gateSavedModel = "", gateModelAgent = "";
4493
4493
 
4494
4494
  /**
4495
4495
  * Rebuilds the model dropdown for `agent` and selects `model` (empty = the agent default).
@@ -4499,7 +4499,10 @@ export {
4499
4499
  */
4500
4500
  function renderGateModel(agent, model) {
4501
4501
  const sel = $("gateModelSel"), inp = $("gateModel");
4502
- const opts = [["", "auto (agent default)"]].concat(GATE_MODELS[agent] || [], [[GATE_MODEL_CUSTOM, "Custom model id..."]]);
4502
+ gateModelAgent = agent || "";
4503
+ // Naming the agent in the default option is the whole point of it: clearing the model
4504
+ // drops the `--model` flag, so the step runs on whatever that agent picks for itself.
4505
+ const opts = [["", "auto (" + (agent || "agent") + " default)"]].concat(GATE_MODELS[agent] || [], [[GATE_MODEL_CUSTOM, "Custom model id..."]]);
4503
4506
  sel.innerHTML = opts.map(([v, label]) => '<option value="' + esc(v) + '">' + esc(label) + "</option>").join("");
4504
4507
  const listed = opts.some(([v]) => v === model && v !== GATE_MODEL_CUSTOM);
4505
4508
  sel.value = listed ? model : GATE_MODEL_CUSTOM;
@@ -4515,8 +4518,16 @@ export {
4515
4518
  $("gateModelSave").style.display = custom ? "" : "none";
4516
4519
  // Select + field + Save is wider than one settings column; the row takes the full width.
4517
4520
  $("gateModelRow").classList.toggle("wide", custom);
4521
+ syncGateModelHint();
4518
4522
  syncGateModelSave();
4519
4523
  }
4524
+ /** The hint has to follow the selection: on auto, nothing is passed to the agent at all. */
4525
+ function syncGateModelHint() {
4526
+ const agent = gateModelAgent || "the agent";
4527
+ $("gateModelHint").textContent = $("gateModelSel").value === ""
4528
+ ? "auto: " + agent + " runs on its own default model"
4529
+ : "passed to " + agent + " on every step; a smaller model cuts run time and tokens";
4530
+ }
4520
4531
  /** No-op rule: nothing to save while the typed id still equals the stored one. */
4521
4532
  function syncGateModelSave() {
4522
4533
  const btn = $("gateModelSave"), dirty = $("gateModel").value.trim() !== gateSavedModel;
@@ -4540,9 +4551,7 @@ export {
4540
4551
  ? "auto: first agent found on PATH - currently " + s.agentResolved
4541
4552
  : "which coding agent the pipeline drives";
4542
4553
  $("gateModelRow").style.display = s.modelSupported ? "" : "none";
4543
- renderGateModel(s.agentResolved || s.agent, s.model || "");
4544
- $("gateModelHint").textContent = "passed to " + s.agentResolved
4545
- + " on every step; a smaller model is the one change that cuts both run time and tokens";
4554
+ renderGateModel(s.agentResolved || s.agent, s.model || ""); // also writes the hint
4546
4555
  $("gateCiTimeout").value = s.ciTimeout || "";
4547
4556
  $("gateLogLevel").value = s.logLevel;
4548
4557
  syncDD($("gateLogLevel"));
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@enigmax/dashboard",
3
- "version": "0.1.99",
3
+ "version": "0.1.100",
4
4
  "description": "Local browser dashboard UI for enigma: the static page and chart assets enigma serves on its loopback dashboard (savings, real tool usage, in-browser settings). Installed on demand by enigma-cli; not a runtime dependency.",
5
5
  "type": "module",
6
6
  "files": [