latentcode 0.1.0-alpha.11 → 0.1.0-alpha.12
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/latentcode.mjs +37 -26
- package/package.json +1 -1
package/dist/latentcode.mjs
CHANGED
|
@@ -34892,8 +34892,9 @@ function saveConfig(data) {
|
|
|
34892
34892
|
}
|
|
34893
34893
|
return next;
|
|
34894
34894
|
}
|
|
34895
|
+
var serverOverride = "";
|
|
34895
34896
|
function resolveServer(cfg = loadConfig()) {
|
|
34896
|
-
return (process.env.LATENTCODE_ADS_SERVER || cfg.server || process.env.ADS_SERVER || DEFAULT_SERVER).replace(/\/+$/, "");
|
|
34897
|
+
return (process.env.LATENTCODE_ADS_SERVER || serverOverride || cfg.server || process.env.ADS_SERVER || DEFAULT_SERVER).replace(/\/+$/, "");
|
|
34897
34898
|
}
|
|
34898
34899
|
function resolveWallet(cfg = loadConfig()) {
|
|
34899
34900
|
const w = cfg.wallet || process.env.ADS_WALLET || "";
|
|
@@ -35359,6 +35360,7 @@ var AdController = class {
|
|
|
35359
35360
|
rotateMs: opts.rotateMs ?? ROTATE_MS,
|
|
35360
35361
|
holdMs: opts.holdMs ?? HOLD_MS,
|
|
35361
35362
|
activeMs: opts.activeMs ?? ACTIVE_MS,
|
|
35363
|
+
visible: opts.visible ?? (() => true),
|
|
35362
35364
|
classify: opts.classify ?? ((p, cwd2) => classifyPrompt(p, cwd2))
|
|
35363
35365
|
};
|
|
35364
35366
|
opts.focus.onChange(() => this.emit());
|
|
@@ -35423,7 +35425,7 @@ var AdController = class {
|
|
|
35423
35425
|
this.emit();
|
|
35424
35426
|
}
|
|
35425
35427
|
attentive(now) {
|
|
35426
|
-
return this.o.focus.focused && (this.working || now - this.lastActivity < this.o.activeMs);
|
|
35428
|
+
return this.o.visible() && this.o.focus.focused && (this.working || now - this.lastActivity < this.o.activeMs);
|
|
35427
35429
|
}
|
|
35428
35430
|
/** An un-billed ad that may still be shown and billed. */
|
|
35429
35431
|
holding() {
|
|
@@ -35779,19 +35781,26 @@ function credits(balanceUsd, bonus) {
|
|
|
35779
35781
|
|
|
35780
35782
|
// src/ui/theme.ts
|
|
35781
35783
|
var C = {
|
|
35782
|
-
|
|
35783
|
-
|
|
35784
|
-
|
|
35785
|
-
|
|
35786
|
-
|
|
35787
|
-
|
|
35788
|
-
|
|
35789
|
-
|
|
35790
|
-
|
|
35791
|
-
|
|
35792
|
-
|
|
35793
|
-
|
|
35794
|
-
|
|
35784
|
+
/** Structure: frames, spinner, headings, LATENT in the wordmark (dashboard --accent). */
|
|
35785
|
+
accent: "#63A9FF",
|
|
35786
|
+
/** Ember accent: CODE in the wordmark, CTAs, the selected row (--ember-500). */
|
|
35787
|
+
accent2: "#FF8A3D",
|
|
35788
|
+
text: "#E2EDFF",
|
|
35789
|
+
muted: "#A3B5D3",
|
|
35790
|
+
faint: "#6E82A6",
|
|
35791
|
+
border: "#2C4673",
|
|
35792
|
+
/** --live */
|
|
35793
|
+
ok: "#4EE59A",
|
|
35794
|
+
/** --warn */
|
|
35795
|
+
warn: "#FFC56B",
|
|
35796
|
+
/** --danger */
|
|
35797
|
+
err: "#FF7A85",
|
|
35798
|
+
/** Money coming in and progress are ember (--ember-300). */
|
|
35799
|
+
earn: "#FFB270",
|
|
35800
|
+
add: "#4EE59A",
|
|
35801
|
+
del: "#FF7A85",
|
|
35802
|
+
/** --glow */
|
|
35803
|
+
code: "#8CC4FF"
|
|
35795
35804
|
};
|
|
35796
35805
|
var G = {
|
|
35797
35806
|
prompt: "\u276F",
|
|
@@ -36083,7 +36092,7 @@ async function boot(args, focus, report) {
|
|
|
36083
36092
|
enabled: () => loadConfig().sync !== false,
|
|
36084
36093
|
lastHash: fileHashStore(),
|
|
36085
36094
|
collect: async () => buildSyncState({
|
|
36086
|
-
appVersion: true ? "0.1.0-alpha.
|
|
36095
|
+
appVersion: true ? "0.1.0-alpha.12" : "",
|
|
36087
36096
|
engineVersion,
|
|
36088
36097
|
model: await engine.defaultModel().then((m) => m ? `${m.providerID}/${m.id}` : session.key),
|
|
36089
36098
|
catalog: await engine.catalog(),
|
|
@@ -36345,18 +36354,11 @@ function reduce(state, ev, now = Date.now()) {
|
|
|
36345
36354
|
}
|
|
36346
36355
|
}
|
|
36347
36356
|
|
|
36348
|
-
// src/
|
|
36349
|
-
var import_jsx_runtime = __toESM(require_jsx_runtime(), 1);
|
|
36350
|
-
var fmtTok = (n) => n >= 1e3 ? `${(n / 1e3).toFixed(1)}k` : String(n);
|
|
36351
|
-
var fmtUsd2 = (n) => `$${n.toFixed(n !== 0 && Math.abs(n) < 0.01 ? 4 : 2)}`;
|
|
36352
|
-
var fmtCredits = (n) => `${n.toFixed(n !== 0 && Math.abs(n) < 0.01 ? 4 : 3)} cr`;
|
|
36353
|
-
function Rule({ width }) {
|
|
36354
|
-
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(Text, { color: C.border, children: "\u2500".repeat(Math.max(0, width)) });
|
|
36355
|
-
}
|
|
36357
|
+
// src/ads/verdict.ts
|
|
36356
36358
|
function verdictLabel(v) {
|
|
36357
36359
|
switch (v) {
|
|
36358
36360
|
case "tracked":
|
|
36359
|
-
return { text:
|
|
36361
|
+
return { text: "\u2713 view counted", tone: "ok" };
|
|
36360
36362
|
case "unearned":
|
|
36361
36363
|
return { text: "view not paid on this device", tone: "warn" };
|
|
36362
36364
|
case "skipped":
|
|
@@ -36367,6 +36369,15 @@ function verdictLabel(v) {
|
|
|
36367
36369
|
return { text: "counting view\u2026", tone: "faint" };
|
|
36368
36370
|
}
|
|
36369
36371
|
}
|
|
36372
|
+
|
|
36373
|
+
// src/ui/StatusPanel.tsx
|
|
36374
|
+
var import_jsx_runtime = __toESM(require_jsx_runtime(), 1);
|
|
36375
|
+
var fmtTok = (n) => n >= 1e3 ? `${(n / 1e3).toFixed(1)}k` : String(n);
|
|
36376
|
+
var fmtUsd2 = (n) => `$${n.toFixed(n !== 0 && Math.abs(n) < 0.01 ? 4 : 2)}`;
|
|
36377
|
+
var fmtCredits = (n) => `${n.toFixed(n !== 0 && Math.abs(n) < 0.01 ? 4 : 3)} cr`;
|
|
36378
|
+
function Rule({ width }) {
|
|
36379
|
+
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(Text, { color: C.border, children: "\u2500".repeat(Math.max(0, width)) });
|
|
36380
|
+
}
|
|
36370
36381
|
function Progress({ ms, of, billed, verdict }) {
|
|
36371
36382
|
if (billed) {
|
|
36372
36383
|
const l = verdictLabel(verdict);
|
|
@@ -39756,7 +39767,7 @@ ${HELP}`);
|
|
|
39756
39767
|
|
|
39757
39768
|
// src/index.tsx
|
|
39758
39769
|
var import_jsx_runtime11 = __toESM(require_jsx_runtime(), 1);
|
|
39759
|
-
var VERSION = "0.1.0-alpha.
|
|
39770
|
+
var VERSION = "0.1.0-alpha.12";
|
|
39760
39771
|
var usage = () => `${logo()}
|
|
39761
39772
|
${a.dim(`v${VERSION} \xB7 terminal coding agent. Bring your own model access; earn while it works.`)}
|
|
39762
39773
|
|
package/package.json
CHANGED