@dosu/cli 0.53.0-beta.2 → 0.53.0-beta.3
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/bin/dosu.js +34 -8
- package/package.json +1 -1
package/bin/dosu.js
CHANGED
|
@@ -5006,7 +5006,7 @@ function isNpxInvocation(channel = INSTALL_CHANNEL, env = process.env) {
|
|
|
5006
5006
|
function getVersionString() {
|
|
5007
5007
|
return `v${VERSION}`;
|
|
5008
5008
|
}
|
|
5009
|
-
var VERSION = "0.53.0-beta.
|
|
5009
|
+
var VERSION = "0.53.0-beta.3", INSTALL_CHANNEL = "npm";
|
|
5010
5010
|
|
|
5011
5011
|
// src/debug/logger.ts
|
|
5012
5012
|
import {
|
|
@@ -5328,10 +5328,22 @@ function visibleWidth(text) {
|
|
|
5328
5328
|
return text.replace(ANSI_PATTERN2, "").length;
|
|
5329
5329
|
}
|
|
5330
5330
|
function tabStrip(labels, active2, width, { spread = true } = {}) {
|
|
5331
|
+
if (!spread) {
|
|
5332
|
+
const cellW = Math.max(...labels.map(([, label]) => label.length)) + 2 * TAB_CELL_PAD;
|
|
5333
|
+
let row2 = "";
|
|
5334
|
+
let rule2 = "";
|
|
5335
|
+
for (const [id, label] of labels) {
|
|
5336
|
+
const left = Math.floor((cellW - label.length) / 2);
|
|
5337
|
+
const cell = " ".repeat(left) + label + " ".repeat(cellW - label.length - left);
|
|
5338
|
+
row2 += id === active2 ? brand(import_picocolors9.default.bold(cell)) : import_picocolors9.default.dim(cell);
|
|
5339
|
+
rule2 += id === active2 ? brand("━".repeat(cellW)) : import_picocolors9.default.dim("─".repeat(cellW));
|
|
5340
|
+
}
|
|
5341
|
+
return [row2, rule2];
|
|
5342
|
+
}
|
|
5331
5343
|
const GAP_MIN = 3;
|
|
5332
5344
|
const totalLen = labels.reduce((sum, [, label]) => sum + label.length, 0);
|
|
5333
5345
|
const slots = Math.max(1, labels.length - 1);
|
|
5334
|
-
const spare =
|
|
5346
|
+
const spare = Math.max(GAP_MIN * slots, width - totalLen);
|
|
5335
5347
|
const baseGap = Math.floor(spare / slots);
|
|
5336
5348
|
const bonus = spare % slots;
|
|
5337
5349
|
let row = "";
|
|
@@ -5353,8 +5365,7 @@ function tabStrip(labels, active2, width, { spread = true } = {}) {
|
|
|
5353
5365
|
}
|
|
5354
5366
|
col += label.length;
|
|
5355
5367
|
});
|
|
5356
|
-
const
|
|
5357
|
-
const tail = Math.max(0, ruleEnd - activeStart - activeLen);
|
|
5368
|
+
const tail = Math.max(0, width - activeStart - activeLen);
|
|
5358
5369
|
const rule = import_picocolors9.default.dim("─".repeat(activeStart)) + brand("━".repeat(activeLen)) + import_picocolors9.default.dim("─".repeat(tail));
|
|
5359
5370
|
return [row, rule];
|
|
5360
5371
|
}
|
|
@@ -5414,7 +5425,7 @@ function installCenteredLayout(stream = process.stdout) {
|
|
|
5414
5425
|
active = false;
|
|
5415
5426
|
};
|
|
5416
5427
|
}
|
|
5417
|
-
var import_picocolors9, ESC2, CONTENT_WIDTH = 64, TOKEN_PATTERN, COLUMN_RESET_FINALS, active = false, ANSI_PATTERN2;
|
|
5428
|
+
var import_picocolors9, ESC2, CONTENT_WIDTH = 64, TOKEN_PATTERN, COLUMN_RESET_FINALS, active = false, ANSI_PATTERN2, TAB_CELL_PAD = 2;
|
|
5418
5429
|
var init_layout = __esm(() => {
|
|
5419
5430
|
init_styles();
|
|
5420
5431
|
import_picocolors9 = __toESM(require_picocolors(), 1);
|
|
@@ -8422,6 +8433,8 @@ function loadSyncState(configDir = getConfigDir()) {
|
|
|
8422
8433
|
})) : [];
|
|
8423
8434
|
const rawRefusal = raw.last_refusal;
|
|
8424
8435
|
const lastRefusal = rawRefusal && typeof rawRefusal.at === "string" && typeof rawRefusal.outcome === "string" && typeof rawRefusal.message === "string" ? { at: rawRefusal.at, outcome: rawRefusal.outcome, message: rawRefusal.message } : undefined;
|
|
8436
|
+
const rawRun = raw.run;
|
|
8437
|
+
const run2 = rawRun && typeof rawRun.pid === "number" && typeof rawRun.started_at === "string" && typeof rawRun.baseline_mined === "number" && rawRun.baseline_mined >= 0 ? { pid: rawRun.pid, started_at: rawRun.started_at, baseline_mined: rawRun.baseline_mined } : undefined;
|
|
8425
8438
|
return {
|
|
8426
8439
|
schema_version: STATE_SCHEMA_VERSION,
|
|
8427
8440
|
watermark: typeof raw.watermark === "string" ? raw.watermark : null,
|
|
@@ -8432,6 +8445,7 @@ function loadSyncState(configDir = getConfigDir()) {
|
|
|
8432
8445
|
total_notes: typeof raw.total_notes === "number" && raw.total_notes >= 0 ? raw.total_notes : 0,
|
|
8433
8446
|
total_learning_tokens: typeof raw.total_learning_tokens === "number" && raw.total_learning_tokens >= 0 ? raw.total_learning_tokens : 0,
|
|
8434
8447
|
...lastRefusal ? { last_refusal: lastRefusal } : {},
|
|
8448
|
+
...run2 ? { run: run2 } : {},
|
|
8435
8449
|
...Array.isArray(raw.project_filter) ? {
|
|
8436
8450
|
project_filter: raw.project_filter.filter((p2) => typeof p2 === "string")
|
|
8437
8451
|
} : {}
|
|
@@ -9107,6 +9121,13 @@ async function runKnowledgeSync(options = {}) {
|
|
|
9107
9121
|
return { status: "skipped-lock", ...base };
|
|
9108
9122
|
}
|
|
9109
9123
|
try {
|
|
9124
|
+
if (state.run?.pid !== process.pid) {
|
|
9125
|
+
state.run = {
|
|
9126
|
+
pid: process.pid,
|
|
9127
|
+
started_at: now().toISOString(),
|
|
9128
|
+
baseline_mined: state.total_mined ?? 0
|
|
9129
|
+
};
|
|
9130
|
+
}
|
|
9110
9131
|
const worthMining = deps.worthMining ?? isWorthMining;
|
|
9111
9132
|
const examined = [];
|
|
9112
9133
|
const batch = [];
|
|
@@ -71951,7 +71972,7 @@ var init_settings = __esm(() => {
|
|
|
71951
71972
|
});
|
|
71952
71973
|
|
|
71953
71974
|
// src/telemetry/debug-id.ts
|
|
71954
|
-
var BUNDLE_DEBUG_ID_PLACEHOLDER = "
|
|
71975
|
+
var BUNDLE_DEBUG_ID_PLACEHOLDER = "49488d75-f9b7-7b0e-6475-6e2164756e21";
|
|
71955
71976
|
|
|
71956
71977
|
// src/telemetry/telemetry.ts
|
|
71957
71978
|
import { randomUUID as randomUUID4 } from "node:crypto";
|
|
@@ -74140,7 +74161,12 @@ function runActivityView(io2 = {}) {
|
|
|
74140
74161
|
const draw = () => {
|
|
74141
74162
|
status = getStatus();
|
|
74142
74163
|
if (status.running) {
|
|
74143
|
-
|
|
74164
|
+
const run2 = status.state.run;
|
|
74165
|
+
if (run2 && run2.pid === status.pid) {
|
|
74166
|
+
minedBeforeRun = run2.baseline_mined;
|
|
74167
|
+
} else {
|
|
74168
|
+
minedBeforeRun ??= status.state.total_mined ?? 0;
|
|
74169
|
+
}
|
|
74144
74170
|
} else {
|
|
74145
74171
|
minedBeforeRun = null;
|
|
74146
74172
|
}
|
|
@@ -82724,4 +82750,4 @@ execute().catch((err) => {
|
|
|
82724
82750
|
process.exit(1);
|
|
82725
82751
|
});
|
|
82726
82752
|
|
|
82727
|
-
//# debugId=
|
|
82753
|
+
//# debugId=49488d75-f9b7-7b0e-6475-6e2164756e21
|