@dosu/cli 0.53.0-beta.1 → 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 +132 -72
- 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 {
|
|
@@ -5144,7 +5144,7 @@ var init_logger = __esm(() => {
|
|
|
5144
5144
|
});
|
|
5145
5145
|
|
|
5146
5146
|
// src/client/contract.ts
|
|
5147
|
-
var CLI_CONTRACT_HASH = "
|
|
5147
|
+
var CLI_CONTRACT_HASH = "1d4be4b6214f";
|
|
5148
5148
|
|
|
5149
5149
|
// src/client/trpc.ts
|
|
5150
5150
|
var exports_trpc = {};
|
|
@@ -5327,6 +5327,48 @@ function breadcrumb(segments, width = contentWidth()) {
|
|
|
5327
5327
|
function visibleWidth(text) {
|
|
5328
5328
|
return text.replace(ANSI_PATTERN2, "").length;
|
|
5329
5329
|
}
|
|
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
|
+
}
|
|
5343
|
+
const GAP_MIN = 3;
|
|
5344
|
+
const totalLen = labels.reduce((sum, [, label]) => sum + label.length, 0);
|
|
5345
|
+
const slots = Math.max(1, labels.length - 1);
|
|
5346
|
+
const spare = Math.max(GAP_MIN * slots, width - totalLen);
|
|
5347
|
+
const baseGap = Math.floor(spare / slots);
|
|
5348
|
+
const bonus = spare % slots;
|
|
5349
|
+
let row = "";
|
|
5350
|
+
let col = 0;
|
|
5351
|
+
let activeStart = 0;
|
|
5352
|
+
let activeLen = 0;
|
|
5353
|
+
labels.forEach(([id, label], i2) => {
|
|
5354
|
+
if (i2 > 0) {
|
|
5355
|
+
const gap = baseGap + (i2 <= bonus ? 1 : 0);
|
|
5356
|
+
row += " ".repeat(gap);
|
|
5357
|
+
col += gap;
|
|
5358
|
+
}
|
|
5359
|
+
if (id === active2) {
|
|
5360
|
+
activeStart = col;
|
|
5361
|
+
activeLen = label.length;
|
|
5362
|
+
row += brand(import_picocolors9.default.bold(label));
|
|
5363
|
+
} else {
|
|
5364
|
+
row += import_picocolors9.default.dim(label);
|
|
5365
|
+
}
|
|
5366
|
+
col += label.length;
|
|
5367
|
+
});
|
|
5368
|
+
const tail = Math.max(0, width - activeStart - activeLen);
|
|
5369
|
+
const rule = import_picocolors9.default.dim("─".repeat(activeStart)) + brand("━".repeat(activeLen)) + import_picocolors9.default.dim("─".repeat(tail));
|
|
5370
|
+
return [row, rule];
|
|
5371
|
+
}
|
|
5330
5372
|
function centerBlock(lines, width) {
|
|
5331
5373
|
const blockWidth = Math.max(...lines.map(visibleWidth));
|
|
5332
5374
|
const pad = " ".repeat(Math.max(0, Math.floor((width - blockWidth) / 2)));
|
|
@@ -5383,8 +5425,9 @@ function installCenteredLayout(stream = process.stdout) {
|
|
|
5383
5425
|
active = false;
|
|
5384
5426
|
};
|
|
5385
5427
|
}
|
|
5386
|
-
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;
|
|
5387
5429
|
var init_layout = __esm(() => {
|
|
5430
|
+
init_styles();
|
|
5388
5431
|
import_picocolors9 = __toESM(require_picocolors(), 1);
|
|
5389
5432
|
ESC2 = String.fromCharCode(27);
|
|
5390
5433
|
TOKEN_PATTERN = new RegExp(`(\r
|
|
@@ -8390,6 +8433,8 @@ function loadSyncState(configDir = getConfigDir()) {
|
|
|
8390
8433
|
})) : [];
|
|
8391
8434
|
const rawRefusal = raw.last_refusal;
|
|
8392
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;
|
|
8393
8438
|
return {
|
|
8394
8439
|
schema_version: STATE_SCHEMA_VERSION,
|
|
8395
8440
|
watermark: typeof raw.watermark === "string" ? raw.watermark : null,
|
|
@@ -8400,6 +8445,7 @@ function loadSyncState(configDir = getConfigDir()) {
|
|
|
8400
8445
|
total_notes: typeof raw.total_notes === "number" && raw.total_notes >= 0 ? raw.total_notes : 0,
|
|
8401
8446
|
total_learning_tokens: typeof raw.total_learning_tokens === "number" && raw.total_learning_tokens >= 0 ? raw.total_learning_tokens : 0,
|
|
8402
8447
|
...lastRefusal ? { last_refusal: lastRefusal } : {},
|
|
8448
|
+
...run2 ? { run: run2 } : {},
|
|
8403
8449
|
...Array.isArray(raw.project_filter) ? {
|
|
8404
8450
|
project_filter: raw.project_filter.filter((p2) => typeof p2 === "string")
|
|
8405
8451
|
} : {}
|
|
@@ -9075,6 +9121,13 @@ async function runKnowledgeSync(options = {}) {
|
|
|
9075
9121
|
return { status: "skipped-lock", ...base };
|
|
9076
9122
|
}
|
|
9077
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
|
+
}
|
|
9078
9131
|
const worthMining = deps.worthMining ?? isWorthMining;
|
|
9079
9132
|
const examined = [];
|
|
9080
9133
|
const batch = [];
|
|
@@ -71919,7 +71972,7 @@ var init_settings = __esm(() => {
|
|
|
71919
71972
|
});
|
|
71920
71973
|
|
|
71921
71974
|
// src/telemetry/debug-id.ts
|
|
71922
|
-
var BUNDLE_DEBUG_ID_PLACEHOLDER = "
|
|
71975
|
+
var BUNDLE_DEBUG_ID_PLACEHOLDER = "49488d75-f9b7-7b0e-6475-6e2164756e21";
|
|
71923
71976
|
|
|
71924
71977
|
// src/telemetry/telemetry.ts
|
|
71925
71978
|
import { randomUUID as randomUUID4 } from "node:crypto";
|
|
@@ -73966,40 +74019,12 @@ function progressLine(done, ready, width, notes = 0) {
|
|
|
73966
74019
|
return `${bar} ${done}/${total} mined · ${pct}%${suffix}`;
|
|
73967
74020
|
}
|
|
73968
74021
|
function tabBar(tab, queuedCount, openCount, minedCount, width) {
|
|
73969
|
-
|
|
74022
|
+
return tabStrip([
|
|
73970
74023
|
["activity", "Activity"],
|
|
73971
74024
|
["mined", `Mined (${minedCount})`],
|
|
73972
74025
|
["queued", `Queued (${queuedCount})`],
|
|
73973
74026
|
["open", `Open (${openCount})`]
|
|
73974
|
-
];
|
|
73975
|
-
const GAP_MIN = 3;
|
|
73976
|
-
const totalLen = labels.reduce((sum, [, label]) => sum + label.length, 0);
|
|
73977
|
-
const slots = labels.length - 1;
|
|
73978
|
-
const spare = Math.max(GAP_MIN * slots, width - totalLen);
|
|
73979
|
-
const baseGap = Math.floor(spare / slots);
|
|
73980
|
-
const bonus = spare % slots;
|
|
73981
|
-
let row = "";
|
|
73982
|
-
let col = 0;
|
|
73983
|
-
let activeStart = 0;
|
|
73984
|
-
let activeLen = 0;
|
|
73985
|
-
labels.forEach(([id2, label], i5) => {
|
|
73986
|
-
if (i5 > 0) {
|
|
73987
|
-
const gap = baseGap + (i5 <= bonus ? 1 : 0);
|
|
73988
|
-
row += " ".repeat(gap);
|
|
73989
|
-
col += gap;
|
|
73990
|
-
}
|
|
73991
|
-
if (id2 === tab) {
|
|
73992
|
-
activeStart = col;
|
|
73993
|
-
activeLen = label.length;
|
|
73994
|
-
row += brand(import_picocolors30.default.bold(label));
|
|
73995
|
-
} else {
|
|
73996
|
-
row += import_picocolors30.default.dim(label);
|
|
73997
|
-
}
|
|
73998
|
-
col += label.length;
|
|
73999
|
-
});
|
|
74000
|
-
const tail = Math.max(0, width - activeStart - activeLen);
|
|
74001
|
-
const rule2 = import_picocolors30.default.dim("─".repeat(activeStart)) + brand("━".repeat(activeLen)) + import_picocolors30.default.dim("─".repeat(tail));
|
|
74002
|
-
return [row, rule2];
|
|
74027
|
+
], tab, width);
|
|
74003
74028
|
}
|
|
74004
74029
|
function activityWidth(columns) {
|
|
74005
74030
|
return Math.max(20, columns - 2 * layoutMargin(columns) - 1);
|
|
@@ -74136,7 +74161,12 @@ function runActivityView(io2 = {}) {
|
|
|
74136
74161
|
const draw = () => {
|
|
74137
74162
|
status = getStatus();
|
|
74138
74163
|
if (status.running) {
|
|
74139
|
-
|
|
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
|
+
}
|
|
74140
74170
|
} else {
|
|
74141
74171
|
minedBeforeRun = null;
|
|
74142
74172
|
}
|
|
@@ -75883,12 +75913,21 @@ var init_flow2 = __esm(() => {
|
|
|
75883
75913
|
function reduceAnalyticsViewKey(key) {
|
|
75884
75914
|
if (key === "q" || key === ESC8 || key === CTRL_C5)
|
|
75885
75915
|
return "back";
|
|
75916
|
+
if (key === "\t" || key === KEY_RIGHT4)
|
|
75917
|
+
return "tab";
|
|
75918
|
+
if (key === KEY_LEFT4)
|
|
75919
|
+
return "tab-back";
|
|
75886
75920
|
if (key === KEY_UP5 || key === "k")
|
|
75887
75921
|
return "up";
|
|
75888
75922
|
if (key === KEY_DOWN5 || key === "j")
|
|
75889
75923
|
return "down";
|
|
75890
75924
|
return "none";
|
|
75891
75925
|
}
|
|
75926
|
+
function cycleAnalyticsTab(tab, delta = 1) {
|
|
75927
|
+
const index = ANALYTICS_VIEW_TABS.indexOf(tab);
|
|
75928
|
+
const next = (index + delta + ANALYTICS_VIEW_TABS.length) % ANALYTICS_VIEW_TABS.length;
|
|
75929
|
+
return ANALYTICS_VIEW_TABS[next];
|
|
75930
|
+
}
|
|
75892
75931
|
function clip2(text, max) {
|
|
75893
75932
|
return text.length <= max ? text : `${text.slice(0, max - 1)}…`;
|
|
75894
75933
|
}
|
|
@@ -75925,32 +75964,30 @@ function loadPageStatsFromConfig() {
|
|
|
75925
75964
|
return Promise.resolve(null);
|
|
75926
75965
|
}
|
|
75927
75966
|
}
|
|
75928
|
-
function
|
|
75967
|
+
function overviewRows(state) {
|
|
75929
75968
|
const minedTotal = state.total_mined ?? 0;
|
|
75930
75969
|
const notes = state.total_notes ?? 0;
|
|
75931
75970
|
const tokens = state.total_learning_tokens ?? 0;
|
|
75932
|
-
|
|
75933
|
-
|
|
75934
|
-
|
|
75935
|
-
|
|
75936
|
-
|
|
75937
|
-
|
|
75938
|
-
|
|
75939
|
-
|
|
75940
|
-
|
|
75941
|
-
|
|
75942
|
-
|
|
75943
|
-
|
|
75944
|
-
|
|
75945
|
-
rows.push("", "Mined by project (recent history)");
|
|
75946
|
-
const top = [...byProject.entries()].sort((a9, b2) => b2[1] - a9[1]).slice(0, 8);
|
|
75947
|
-
for (const [project, count] of top) {
|
|
75948
|
-
rows.push(`${label(clip2(project, 24))}${count}`);
|
|
75949
|
-
}
|
|
75950
|
-
}
|
|
75971
|
+
if (minedTotal === 0 && notes === 0)
|
|
75972
|
+
return [];
|
|
75973
|
+
const rows = [`${label("Sessions mined")}${minedTotal}`, `${label("Suggested pages")}${notes}`];
|
|
75974
|
+
if (tokens > 0) {
|
|
75975
|
+
rows.push(`${label("Investigation distilled")}${formatTokenCount(tokens)} tokens`);
|
|
75976
|
+
}
|
|
75977
|
+
return rows;
|
|
75978
|
+
}
|
|
75979
|
+
function projectRows(state) {
|
|
75980
|
+
const byProject = new Map;
|
|
75981
|
+
for (const record2 of state.mined_sessions ?? []) {
|
|
75982
|
+
const key = record2.project ?? "(unknown)";
|
|
75983
|
+
byProject.set(key, (byProject.get(key) ?? 0) + 1);
|
|
75951
75984
|
}
|
|
75985
|
+
return [...byProject.entries()].sort((a9, b2) => b2[1] - a9[1]).map(([project, count]) => `${label(clip2(project, 24))}${count}`);
|
|
75986
|
+
}
|
|
75987
|
+
function pageRows(pageStats) {
|
|
75988
|
+
const rows = [];
|
|
75952
75989
|
if (pageStats && pageStats.topCited.length > 0) {
|
|
75953
|
-
rows.push(
|
|
75990
|
+
rows.push(`Top cited pages (${TOP_CITED_DAYS}d)`);
|
|
75954
75991
|
for (const row of pageStats.topCited) {
|
|
75955
75992
|
rows.push(`${label(clip2(row.title, 24))}${row.citation_count}`);
|
|
75956
75993
|
}
|
|
@@ -75971,22 +76008,35 @@ function windowReport(lines, scroll, height = ANALYTICS_VIEW_LINES) {
|
|
|
75971
76008
|
below: Math.max(0, lines.length - clamped - height)
|
|
75972
76009
|
};
|
|
75973
76010
|
}
|
|
75974
|
-
function
|
|
75975
|
-
|
|
76011
|
+
function analyticsTabRows(tab, state, pageStats) {
|
|
76012
|
+
if (tab === "overview")
|
|
76013
|
+
return overviewRows(state);
|
|
76014
|
+
if (tab === "projects")
|
|
76015
|
+
return projectRows(state);
|
|
76016
|
+
return pageRows(pageStats);
|
|
76017
|
+
}
|
|
76018
|
+
function renderAnalyticsFrame(state, tab, scroll, pageStats = null, pagesPending = false, width = contentWidth()) {
|
|
76019
|
+
const rows = analyticsTabRows(tab, state, pageStats);
|
|
75976
76020
|
const { visible, above, below } = windowReport(rows, scroll);
|
|
75977
|
-
const
|
|
76021
|
+
const empty = tab === "overview" ? "No analytics yet. They appear after the first mining run." : tab === "projects" ? "No per-project history yet. It fills in as sessions are mined." : pagesPending ? "Loading page analytics..." : "No page analytics yet.";
|
|
76022
|
+
const listRows = visible.length > 0 ? visible.map((row) => import_picocolors32.default.dim(row)) : [import_picocolors32.default.dim(empty)];
|
|
75978
76023
|
const scrollParts = [];
|
|
75979
76024
|
if (above > 0)
|
|
75980
76025
|
scrollParts.push(`↑ ${above} earlier`);
|
|
75981
76026
|
if (below > 0)
|
|
75982
76027
|
scrollParts.push(`↓ ${below} more`);
|
|
75983
76028
|
const lines = [
|
|
75984
|
-
breadcrumb(["Home", "Analytics"]),
|
|
76029
|
+
breadcrumb(["Home", "Analytics"], width),
|
|
75985
76030
|
"",
|
|
76031
|
+
...tabStrip([
|
|
76032
|
+
["overview", "Overview"],
|
|
76033
|
+
["projects", "Projects"],
|
|
76034
|
+
["pages", "Pages"]
|
|
76035
|
+
], tab, width, { spread: false }),
|
|
75986
76036
|
...listRows,
|
|
75987
76037
|
...scrollParts.length > 0 ? [import_picocolors32.default.dim(scrollParts.join(" · "))] : [],
|
|
75988
76038
|
"",
|
|
75989
|
-
import_picocolors32.default.dim("↑↓ scroll · esc back")
|
|
76039
|
+
import_picocolors32.default.dim("tab switch · ↑↓ scroll · esc back")
|
|
75990
76040
|
];
|
|
75991
76041
|
return lines.join(`
|
|
75992
76042
|
`);
|
|
@@ -75999,14 +76049,17 @@ function runAnalyticsView(io2 = {}) {
|
|
|
75999
76049
|
const getStatus = io2.getStatus ?? (() => getSyncStatus({ readLog: () => "" }));
|
|
76000
76050
|
const loadPageStats = io2.loadPageStats ?? loadPageStatsFromConfig;
|
|
76001
76051
|
const pollMs = io2.pollMs ?? ANALYTICS_VIEW_POLL_MS;
|
|
76052
|
+
let tab = "overview";
|
|
76002
76053
|
let scroll = 0;
|
|
76003
76054
|
let status = getStatus();
|
|
76004
76055
|
let pageStats = null;
|
|
76056
|
+
let pagesPending = true;
|
|
76005
76057
|
let closed = false;
|
|
76006
76058
|
let lastFrame = null;
|
|
76007
76059
|
const draw = () => {
|
|
76008
76060
|
status = getStatus();
|
|
76009
|
-
const
|
|
76061
|
+
const width = Math.min(contentWidth(output2.columns ?? 80), (output2.columns ?? 80) - 1);
|
|
76062
|
+
const frame = renderAnalyticsFrame(status.state, tab, scroll, pageStats, pagesPending, width);
|
|
76010
76063
|
if (frame === lastFrame)
|
|
76011
76064
|
return;
|
|
76012
76065
|
lastFrame = frame;
|
|
@@ -76027,9 +76080,10 @@ ${CLEAR_BELOW2}`);
|
|
|
76027
76080
|
output2.write(HIDE_CURSOR4);
|
|
76028
76081
|
draw();
|
|
76029
76082
|
loadPageStats().then((stats) => {
|
|
76030
|
-
if (closed
|
|
76083
|
+
if (closed)
|
|
76031
76084
|
return;
|
|
76032
76085
|
pageStats = stats;
|
|
76086
|
+
pagesPending = false;
|
|
76033
76087
|
draw();
|
|
76034
76088
|
});
|
|
76035
76089
|
return new Promise((resolve6) => {
|
|
@@ -76056,13 +76110,17 @@ ${CLEAR_BELOW2}`);
|
|
|
76056
76110
|
finish();
|
|
76057
76111
|
return;
|
|
76058
76112
|
}
|
|
76059
|
-
if (action === "
|
|
76113
|
+
if (action === "tab" || action === "tab-back") {
|
|
76114
|
+
tab = cycleAnalyticsTab(tab, action === "tab" ? 1 : -1);
|
|
76115
|
+
scroll = 0;
|
|
76116
|
+
draw();
|
|
76117
|
+
} else if (action === "up") {
|
|
76060
76118
|
if (scroll > 0) {
|
|
76061
76119
|
scroll -= 1;
|
|
76062
76120
|
draw();
|
|
76063
76121
|
}
|
|
76064
76122
|
} else if (action === "down") {
|
|
76065
|
-
const maxScroll = Math.max(0,
|
|
76123
|
+
const maxScroll = Math.max(0, analyticsTabRows(tab, status.state, pageStats).length - ANALYTICS_VIEW_LINES);
|
|
76066
76124
|
if (scroll < maxScroll) {
|
|
76067
76125
|
scroll += 1;
|
|
76068
76126
|
draw();
|
|
@@ -76073,7 +76131,7 @@ ${CLEAR_BELOW2}`);
|
|
|
76073
76131
|
input2.on("data", onData);
|
|
76074
76132
|
});
|
|
76075
76133
|
}
|
|
76076
|
-
var import_picocolors32, ESC8, HIDE_CURSOR4, SHOW_CURSOR4, CTRL_C5, KEY_UP5, KEY_DOWN5, CURSOR_HOME2, CLEAR_BELOW2, CLEAR_EOL2, ANALYTICS_VIEW_POLL_MS = 1000, ANALYTICS_VIEW_LINES = 12, TOP_PAGES_LIMIT = 5, TOP_CITED_DAYS = 30;
|
|
76134
|
+
var import_picocolors32, ESC8, HIDE_CURSOR4, SHOW_CURSOR4, CTRL_C5, KEY_UP5, KEY_DOWN5, KEY_RIGHT4, KEY_LEFT4, CURSOR_HOME2, CLEAR_BELOW2, CLEAR_EOL2, ANALYTICS_VIEW_POLL_MS = 1000, ANALYTICS_VIEW_LINES = 12, ANALYTICS_VIEW_TABS, TOP_PAGES_LIMIT = 5, TOP_CITED_DAYS = 30, label = (text) => text.padEnd(26);
|
|
76077
76135
|
var init_analytics_view = __esm(() => {
|
|
76078
76136
|
init_trpc();
|
|
76079
76137
|
init_config();
|
|
@@ -76088,9 +76146,12 @@ var init_analytics_view = __esm(() => {
|
|
|
76088
76146
|
CTRL_C5 = String.fromCharCode(3);
|
|
76089
76147
|
KEY_UP5 = `${ESC8}[A`;
|
|
76090
76148
|
KEY_DOWN5 = `${ESC8}[B`;
|
|
76149
|
+
KEY_RIGHT4 = `${ESC8}[C`;
|
|
76150
|
+
KEY_LEFT4 = `${ESC8}[D`;
|
|
76091
76151
|
CURSOR_HOME2 = `${ESC8}[H`;
|
|
76092
76152
|
CLEAR_BELOW2 = `${ESC8}[0J`;
|
|
76093
76153
|
CLEAR_EOL2 = `${ESC8}[K`;
|
|
76154
|
+
ANALYTICS_VIEW_TABS = ["overview", "projects", "pages"];
|
|
76094
76155
|
});
|
|
76095
76156
|
|
|
76096
76157
|
// src/tui/banner.ts
|
|
@@ -76144,8 +76205,8 @@ function checklistRows(ctx) {
|
|
|
76144
76205
|
`${import_picocolors33.default.yellow(`↑ ${ctx.update.version} available`)} ${import_picocolors33.default.dim(`${DOT3} ${ctx.update.hint}`)}`
|
|
76145
76206
|
]);
|
|
76146
76207
|
}
|
|
76147
|
-
const labelWidth = Math.max(...rows.map(([
|
|
76148
|
-
return rows.map(([
|
|
76208
|
+
const labelWidth = Math.max(...rows.map(([label2]) => label2.length));
|
|
76209
|
+
return rows.map(([label2, value]) => `${import_picocolors33.default.dim(label2.padEnd(labelWidth))} ${value}`);
|
|
76149
76210
|
}
|
|
76150
76211
|
function renderBanner(ctx) {
|
|
76151
76212
|
const logo = LOGO_ROWS.map(paintLogoRow);
|
|
@@ -76274,7 +76335,7 @@ function wrapBody(text, width) {
|
|
|
76274
76335
|
function clip3(text, max) {
|
|
76275
76336
|
return text.length <= max ? text : `${text.slice(0, max - 1)}…`;
|
|
76276
76337
|
}
|
|
76277
|
-
function
|
|
76338
|
+
function pageRows2(pages, width) {
|
|
76278
76339
|
const titleWidth = Math.max(16, width - 32);
|
|
76279
76340
|
return pages.map((page) => {
|
|
76280
76341
|
const title = clip3(page.title, titleWidth).padEnd(titleWidth + 1);
|
|
@@ -76298,7 +76359,7 @@ function renderPagesFrame(model, width, selected) {
|
|
|
76298
76359
|
} else if (model.pages.length === 0) {
|
|
76299
76360
|
body.push(import_picocolors34.default.dim("No pages in this Library yet."));
|
|
76300
76361
|
} else {
|
|
76301
|
-
const rows =
|
|
76362
|
+
const rows = pageRows2(model.pages, width - 2);
|
|
76302
76363
|
const { start, above } = windowSelection(rows.length, selected);
|
|
76303
76364
|
const visible = rows.slice(start, start + PAGES_VIEW_LINES);
|
|
76304
76365
|
body.push(...visible.map((row, i5) => start + i5 === selected ? `${brand("▸")} ${import_picocolors34.default.bold(row)}` : ` ${import_picocolors34.default.dim(row)}`));
|
|
@@ -80953,7 +81014,6 @@ var LIBRARY_VISIBILITIES = ["public", "internal", "private"];
|
|
|
80953
81014
|
var CONFIG_SETTINGS = {
|
|
80954
81015
|
commit_to_trigger_pr: true,
|
|
80955
81016
|
default_accept_review: true,
|
|
80956
|
-
default_save_publish: true,
|
|
80957
81017
|
review_timeout_days: true
|
|
80958
81018
|
};
|
|
80959
81019
|
var CONFIG_SETTING_NAMES = Object.keys(CONFIG_SETTINGS);
|
|
@@ -82690,4 +82750,4 @@ execute().catch((err) => {
|
|
|
82690
82750
|
process.exit(1);
|
|
82691
82751
|
});
|
|
82692
82752
|
|
|
82693
|
-
//# debugId=
|
|
82753
|
+
//# debugId=49488d75-f9b7-7b0e-6475-6e2164756e21
|