glassbox 0.7.8 → 0.7.9
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/cli.js +48 -5
- package/dist/client/app.global.js +12 -8
- package/dist/client/styles.css +1 -1
- package/package.json +1 -1
package/dist/cli.js
CHANGED
|
@@ -3025,6 +3025,7 @@ init_queries();
|
|
|
3025
3025
|
import { execFileSync, spawnSync as spawnSync7 } from "child_process";
|
|
3026
3026
|
import { existsSync as existsSync5, mkdirSync as mkdirSync4, readFileSync as readFileSync7, writeFileSync as writeFileSync4 } from "fs";
|
|
3027
3027
|
import { Hono as Hono4 } from "hono";
|
|
3028
|
+
import { homedir as homedir3 } from "os";
|
|
3028
3029
|
import { join as join6, resolve as resolve3 } from "path";
|
|
3029
3030
|
|
|
3030
3031
|
// src/export/generate.ts
|
|
@@ -4328,6 +4329,46 @@ apiRoutes.get("/image/:fileId/:side", async (c) => {
|
|
|
4328
4329
|
headers: { "Content-Type": contentType, "Cache-Control": "no-cache" }
|
|
4329
4330
|
});
|
|
4330
4331
|
});
|
|
4332
|
+
function readGlobalConfig() {
|
|
4333
|
+
const configPath = join6(homedir3(), ".glassbox", "config.json");
|
|
4334
|
+
try {
|
|
4335
|
+
if (existsSync5(configPath)) {
|
|
4336
|
+
return JSON.parse(readFileSync7(configPath, "utf-8"));
|
|
4337
|
+
}
|
|
4338
|
+
} catch {
|
|
4339
|
+
}
|
|
4340
|
+
return {};
|
|
4341
|
+
}
|
|
4342
|
+
function writeGlobalConfig(config) {
|
|
4343
|
+
const configDir = join6(homedir3(), ".glassbox");
|
|
4344
|
+
mkdirSync4(configDir, { recursive: true });
|
|
4345
|
+
writeFileSync4(join6(configDir, "config.json"), JSON.stringify(config, null, 2), "utf-8");
|
|
4346
|
+
}
|
|
4347
|
+
apiRoutes.get("/share-prompt/state", (c) => {
|
|
4348
|
+
const config = readGlobalConfig();
|
|
4349
|
+
const sp = config.sharePrompt;
|
|
4350
|
+
const dismissedAt = sp !== void 0 && typeof sp.dismissedAt === "number" ? sp.dismissedAt : null;
|
|
4351
|
+
const totalOpenMs = sp !== void 0 && typeof sp.totalOpenMs === "number" ? sp.totalOpenMs : 0;
|
|
4352
|
+
return c.json({ dismissedAt, totalOpenMs });
|
|
4353
|
+
});
|
|
4354
|
+
apiRoutes.post("/share-prompt/dismiss", (c) => {
|
|
4355
|
+
const config = readGlobalConfig();
|
|
4356
|
+
if (config.sharePrompt === void 0) config.sharePrompt = {};
|
|
4357
|
+
const sp = config.sharePrompt;
|
|
4358
|
+
sp.dismissedAt = Date.now();
|
|
4359
|
+
writeGlobalConfig(config);
|
|
4360
|
+
return c.json({ ok: true });
|
|
4361
|
+
});
|
|
4362
|
+
apiRoutes.post("/share-prompt/tick", async (c) => {
|
|
4363
|
+
const body = await c.req.json();
|
|
4364
|
+
const config = readGlobalConfig();
|
|
4365
|
+
if (config.sharePrompt === void 0) config.sharePrompt = {};
|
|
4366
|
+
const sp = config.sharePrompt;
|
|
4367
|
+
const current = typeof sp.totalOpenMs === "number" ? sp.totalOpenMs : 0;
|
|
4368
|
+
sp.totalOpenMs = current + (body.sessionMs > 0 ? body.sessionMs : 0);
|
|
4369
|
+
writeGlobalConfig(config);
|
|
4370
|
+
return c.json({ totalOpenMs: sp.totalOpenMs });
|
|
4371
|
+
});
|
|
4331
4372
|
|
|
4332
4373
|
// src/routes/pages.tsx
|
|
4333
4374
|
import { readFileSync as readFileSync9 } from "fs";
|
|
@@ -5579,9 +5620,9 @@ function themeToInlineStyle(colors) {
|
|
|
5579
5620
|
|
|
5580
5621
|
// src/themes/config.ts
|
|
5581
5622
|
import { existsSync as existsSync6, mkdirSync as mkdirSync5, readdirSync, readFileSync as readFileSync8, unlinkSync as unlinkSync2, writeFileSync as writeFileSync5 } from "fs";
|
|
5582
|
-
import { homedir as
|
|
5623
|
+
import { homedir as homedir4 } from "os";
|
|
5583
5624
|
import { join as join7 } from "path";
|
|
5584
|
-
var CONFIG_DIR2 = join7(
|
|
5625
|
+
var CONFIG_DIR2 = join7(homedir4(), ".glassbox");
|
|
5585
5626
|
var CONFIG_PATH2 = join7(CONFIG_DIR2, "config.json");
|
|
5586
5627
|
var THEMES_DIR = join7(CONFIG_DIR2, "themes");
|
|
5587
5628
|
function readConfigFile2() {
|
|
@@ -5782,6 +5823,7 @@ pageRoutes.get("/", async (c) => {
|
|
|
5782
5823
|
] }),
|
|
5783
5824
|
/* @__PURE__ */ jsx("div", { className: "file-filter", children: /* @__PURE__ */ jsx("input", { type: "text", className: "file-filter-input", id: "file-filter", placeholder: "Filter files..." }) }),
|
|
5784
5825
|
/* @__PURE__ */ jsx(FileList, { files, annotationCounts, staleCounts: {} }),
|
|
5826
|
+
/* @__PURE__ */ jsx("div", { className: "sidebar-share", id: "sidebar-share" }),
|
|
5785
5827
|
/* @__PURE__ */ jsx("div", { className: "sidebar-footer", children: [
|
|
5786
5828
|
/* @__PURE__ */ jsx("button", { className: "btn btn-primary btn-complete", id: "complete-review", children: "Complete Review" }),
|
|
5787
5829
|
/* @__PURE__ */ jsx("a", { href: "/history", className: "btn btn-sm btn-link", children: "Review History" })
|
|
@@ -5970,6 +6012,7 @@ pageRoutes.get("/review/:reviewId", async (c) => {
|
|
|
5970
6012
|
] }),
|
|
5971
6013
|
/* @__PURE__ */ jsx("div", { className: "file-filter", children: /* @__PURE__ */ jsx("input", { type: "text", className: "file-filter-input", id: "file-filter", placeholder: "Filter files..." }) }),
|
|
5972
6014
|
/* @__PURE__ */ jsx(FileList, { files, annotationCounts, staleCounts: {} }),
|
|
6015
|
+
/* @__PURE__ */ jsx("div", { className: "sidebar-share", id: "sidebar-share" }),
|
|
5973
6016
|
/* @__PURE__ */ jsx("div", { className: "sidebar-footer", children: [
|
|
5974
6017
|
review.status === "completed" ? /* @__PURE__ */ jsx("button", { className: "btn btn-primary", id: "reopen-review", children: "Reopen Review" }) : /* @__PURE__ */ jsx("button", { className: "btn btn-primary btn-complete", id: "complete-review", children: "Complete Review" }),
|
|
5975
6018
|
/* @__PURE__ */ jsx("a", { href: "/history", className: "btn btn-sm btn-link", children: "Review History" }),
|
|
@@ -6361,10 +6404,10 @@ function ensureSkills() {
|
|
|
6361
6404
|
// src/update-check.ts
|
|
6362
6405
|
import { existsSync as existsSync9, mkdirSync as mkdirSync7, readFileSync as readFileSync12, writeFileSync as writeFileSync7 } from "fs";
|
|
6363
6406
|
import { get } from "https";
|
|
6364
|
-
import { homedir as
|
|
6407
|
+
import { homedir as homedir5 } from "os";
|
|
6365
6408
|
import { dirname as dirname2, join as join10 } from "path";
|
|
6366
6409
|
import { fileURLToPath as fileURLToPath2 } from "url";
|
|
6367
|
-
var DATA_DIR = join10(
|
|
6410
|
+
var DATA_DIR = join10(homedir5(), ".glassbox");
|
|
6368
6411
|
var CHECK_FILE = join10(DATA_DIR, "last-update-check");
|
|
6369
6412
|
var PACKAGE_NAME = "glassbox";
|
|
6370
6413
|
function getCurrentVersion() {
|
|
@@ -6613,7 +6656,7 @@ async function main() {
|
|
|
6613
6656
|
console.log("AI service test mode enabled \u2014 using mock AI responses");
|
|
6614
6657
|
}
|
|
6615
6658
|
if (debug) {
|
|
6616
|
-
console.log(`[debug] Build timestamp: ${"2026-04-
|
|
6659
|
+
console.log(`[debug] Build timestamp: ${"2026-04-07T23:55:50.436Z"}`);
|
|
6617
6660
|
}
|
|
6618
6661
|
if (projectDir !== null) {
|
|
6619
6662
|
process.chdir(projectDir);
|