@enigmax/dashboard 0.1.58 → 0.1.59
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/assets/index.html +18 -3
- package/package.json +1 -1
package/assets/index.html
CHANGED
|
@@ -3351,14 +3351,16 @@ export {
|
|
|
3351
3351
|
}
|
|
3352
3352
|
if (!v.enabled) {
|
|
3353
3353
|
$("recallBody").innerHTML = '<div class="panel"><div class="set-cat-h">Session memory is off</div>'
|
|
3354
|
-
+ '<div class="set-hint" style="padding:8px 0">Build a searchable memory of your coding sessions from your own transcripts
|
|
3355
|
-
+ '<
|
|
3354
|
+
+ '<div class="set-hint" style="padding:8px 0">Build a searchable memory of your coding sessions from your own transcripts.</div>'
|
|
3355
|
+
+ '<div style="display:flex;align-items:center;gap:10px;flex-wrap:wrap"><button type="button" class="toggle" data-recall-on="1">Enable recall</button>'
|
|
3356
|
+
+ '<span class="set-hint">or run <code>enigma config recall on</code></span></div></div>';
|
|
3356
3357
|
$("recallSearch").style.display = "none"; $("recallList").innerHTML = ""; return;
|
|
3357
3358
|
}
|
|
3358
3359
|
const s = v.stats || {};
|
|
3359
3360
|
const types = Object.entries(s.byType || {}).map(([t, n]) => '<span class="tag">' + esc(t) + " " + n + "</span>").join(" ");
|
|
3360
3361
|
const last = v.lastSync ? "last sync " + new Date(v.lastSync).toLocaleString() : "not synced yet";
|
|
3361
|
-
$("recallBody").innerHTML = '<div class="panel"><div class="set-cat-h">Stored memory</div>'
|
|
3362
|
+
$("recallBody").innerHTML = '<div class="panel"><div style="display:flex;justify-content:space-between;align-items:center;gap:10px"><div class="set-cat-h" style="margin:0">Stored memory</div>'
|
|
3363
|
+
+ '<button type="button" class="toggle on" data-recall-on="0" title="Turn session memory off">Disable</button></div>'
|
|
3362
3364
|
+ '<div class="set-hint" style="padding:6px 0">' + (s.observations || 0) + " observations · " + (s.sessions || 0) + " sessions · "
|
|
3363
3365
|
+ (s.projects || 0) + " projects · " + Math.round((s.dbBytes || 0) / 1024) + " KB · " + esc(last) + "</div>"
|
|
3364
3366
|
+ (types ? '<div style="padding-top:6px">' + types + "</div>" : "") + "</div>";
|
|
@@ -3430,9 +3432,22 @@ export {
|
|
|
3430
3432
|
setNote("recallNote", out.ok ? (op === "sync" ? "Synced." : "Cleared.") : (out.error || "Action failed."), out.ok ? "ok" : "err");
|
|
3431
3433
|
} catch { setNote("recallNote", "Could not reach the server.", "err"); }
|
|
3432
3434
|
}
|
|
3435
|
+
async function setRecallEnabled(on) {
|
|
3436
|
+
setNote("recallNote", on ? "Enabling recall..." : "Disabling recall...");
|
|
3437
|
+
try {
|
|
3438
|
+
const out = await (await fetch("/api/settings", { method: "POST", headers: { "Content-Type": "application/json" }, body: JSON.stringify({ key: "recall", value: on }) })).json();
|
|
3439
|
+
if (!out.ok) { setNote("recallNote", "Could not change recall: " + (out.error || "error"), "err"); return; }
|
|
3440
|
+
setNote("recallNote", out.restartNote || (on ? "Recall enabled." : "Recall disabled."), "ok");
|
|
3441
|
+
loadRecall();
|
|
3442
|
+
} catch { setNote("recallNote", "Could not reach the server.", "err"); }
|
|
3443
|
+
}
|
|
3433
3444
|
function wireRecall() {
|
|
3434
3445
|
$("recallSync").addEventListener("click", () => recallAction("sync"));
|
|
3435
3446
|
$("recallClear").addEventListener("click", () => recallAction("clear", "Delete all stored session memory? This cannot be undone."));
|
|
3447
|
+
$("recallBody").addEventListener("click", (e) => {
|
|
3448
|
+
const t = e.target.closest("[data-recall-on]");
|
|
3449
|
+
if (t) setRecallEnabled(t.dataset.recallOn === "1");
|
|
3450
|
+
});
|
|
3436
3451
|
let t; const deb = () => { clearTimeout(t); t = setTimeout(loadRecall, 250); };
|
|
3437
3452
|
$("recallQ").addEventListener("input", deb);
|
|
3438
3453
|
$("recallType").addEventListener("change", loadRecall);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@enigmax/dashboard",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.59",
|
|
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": [
|