@cortexkit/opencode-magic-context 0.15.4 → 0.15.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/README.md +1 -1
- package/dist/cli/diagnostics.d.ts.map +1 -1
- package/dist/cli.js +13 -4
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -353,7 +353,7 @@ On startup, Magic Context checks for common configuration problems — OpenCode'
|
|
|
353
353
|
A companion desktop app for browsing and managing Magic Context state outside of OpenCode.
|
|
354
354
|
|
|
355
355
|
<p align="center">
|
|
356
|
-
<a href="https://github.com/cortexkit/opencode-magic-context/releases/tag/dashboard-v0.3.
|
|
356
|
+
<a href="https://github.com/cortexkit/opencode-magic-context/releases/tag/dashboard-v0.3.4"><strong>⬇️ Download for macOS · Windows · Linux</strong></a></p>
|
|
357
357
|
|
|
358
358
|
**Features:**
|
|
359
359
|
- **Memory Browser** — search, filter, and edit project memories with category and project filtering
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"diagnostics.d.ts","sourceRoot":"","sources":["../../src/cli/diagnostics.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"diagnostics.d.ts","sourceRoot":"","sources":["../../src/cli/diagnostics.ts"],"names":[],"mappings":"AAgBA,OAAO,EAAE,KAAK,WAAW,EAAqB,MAAM,gBAAgB,CAAC;AAMrE,MAAM,WAAW,gBAAgB;IAC7B,SAAS,EAAE,MAAM,CAAC;IAClB,QAAQ,EAAE,MAAM,CAAC;IACjB,IAAI,EAAE,MAAM,CAAC;IACb,WAAW,EAAE,MAAM,CAAC;IACpB,aAAa,EAAE,MAAM,CAAC;IACtB,iBAAiB,EAAE,OAAO,CAAC;IAC3B,eAAe,EAAE,MAAM,GAAG,IAAI,CAAC;IAC/B,WAAW,EAAE,WAAW,CAAC;IACzB,uBAAuB,EAAE,OAAO,CAAC;IACjC,kBAAkB,EAAE,OAAO,CAAC;IAC5B,kBAAkB,EAAE;QAChB,MAAM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AAI,CAAC;IAC/B,kDAAkD;IAClD,mBAAmB,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IAC5C,2CAA2C;IAC3C,oBAAoB,EAAE,MAAM,CAAC;IAC7B,kGAAkG;IAClG,eAAe,EAAE,MAAM,CAAC;IACxB,sDAAsD;IACtD,mBAAmB,EAAE,MAAM,CAAC;CAC/B;AAED,MAAM,WAAW,uBAAuB;IACpC,SAAS,EAAE,MAAM,CAAC;IAClB,YAAY,EAAE,MAAM,CAAC;IACrB,sEAAsE;IACtE,SAAS,EAAE,MAAM,CAAC;IAClB,+DAA+D;IAC/D,aAAa,EAAE,MAAM,CAAC;CACzB;AAwRD,wBAAsB,kBAAkB,IAAI,OAAO,CAAC,gBAAgB,CAAC,CAgDpE;AASD,wBAAgB,yBAAyB,CAAC,MAAM,EAAE,gBAAgB,GAAG,MAAM,CA8E1E"}
|
package/dist/cli.js
CHANGED
|
@@ -8676,7 +8676,6 @@ function detectConfigPaths() {
|
|
|
8676
8676
|
|
|
8677
8677
|
// src/cli/diagnostics.ts
|
|
8678
8678
|
var import_comment_json2 = __toESM(require_src2(), 1);
|
|
8679
|
-
import { Database } from "bun:sqlite";
|
|
8680
8679
|
import { existsSync as existsSync6, readdirSync, readFileSync as readFileSync4, statSync } from "node:fs";
|
|
8681
8680
|
import { createRequire as createRequire2 } from "node:module";
|
|
8682
8681
|
import { homedir as homedir5, tmpdir as tmpdir2, userInfo } from "node:os";
|
|
@@ -8966,13 +8965,23 @@ function collectHistorianDumps() {
|
|
|
8966
8965
|
return { dir, count: 0, recent: [] };
|
|
8967
8966
|
}
|
|
8968
8967
|
}
|
|
8969
|
-
function collectHistorianFailures(storageDirPath) {
|
|
8968
|
+
async function collectHistorianFailures(storageDirPath) {
|
|
8970
8969
|
const contextDbPath = join8(storageDirPath, "context.db");
|
|
8971
8970
|
if (!existsSync6(contextDbPath))
|
|
8972
8971
|
return [];
|
|
8972
|
+
if (typeof globalThis.Bun === "undefined") {
|
|
8973
|
+
return [];
|
|
8974
|
+
}
|
|
8975
|
+
let DatabaseClass;
|
|
8976
|
+
try {
|
|
8977
|
+
const mod = await new Function("p", "return import(p)")("bun:sqlite");
|
|
8978
|
+
DatabaseClass = mod.Database;
|
|
8979
|
+
} catch {
|
|
8980
|
+
return [];
|
|
8981
|
+
}
|
|
8973
8982
|
let db = null;
|
|
8974
8983
|
try {
|
|
8975
|
-
db = new
|
|
8984
|
+
db = new DatabaseClass(contextDbPath, { readonly: true });
|
|
8976
8985
|
const rows = db.prepare("SELECT session_id, historian_failure_count, historian_last_error, historian_last_failure_at FROM session_meta WHERE historian_failure_count > 0 ORDER BY historian_last_failure_at DESC LIMIT 10").all();
|
|
8977
8986
|
return rows.map((row) => {
|
|
8978
8987
|
const sessionId = typeof row.session_id === "string" ? row.session_id : "<unknown>";
|
|
@@ -9033,7 +9042,7 @@ async function collectDiagnostics() {
|
|
|
9033
9042
|
sizeKb: Math.round(logFileSize / 1024)
|
|
9034
9043
|
},
|
|
9035
9044
|
historianDumps: collectHistorianDumps(),
|
|
9036
|
-
historianFailures: collectHistorianFailures(storageDirPath)
|
|
9045
|
+
historianFailures: await collectHistorianFailures(storageDirPath)
|
|
9037
9046
|
};
|
|
9038
9047
|
}
|
|
9039
9048
|
function formatBytes(bytes) {
|
package/package.json
CHANGED