@staff0rd/assist 0.443.0 → 0.444.1
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/commands/sessions/web/bundle.js +370 -370
- package/dist/index.js +35 -37
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -6,7 +6,7 @@ import { Command } from "commander";
|
|
|
6
6
|
// package.json
|
|
7
7
|
var package_default = {
|
|
8
8
|
name: "@staff0rd/assist",
|
|
9
|
-
version: "0.
|
|
9
|
+
version: "0.444.1",
|
|
10
10
|
type: "module",
|
|
11
11
|
main: "dist/index.js",
|
|
12
12
|
bin: {
|
|
@@ -25044,12 +25044,24 @@ function registerRoam(program2) {
|
|
|
25044
25044
|
]);
|
|
25045
25045
|
}
|
|
25046
25046
|
|
|
25047
|
+
// src/commands/sync/printAutoConfirmHint.ts
|
|
25048
|
+
import chalk205 from "chalk";
|
|
25049
|
+
var autoConfirmHintCommand = "assist config set sync.autoConfirm true --global";
|
|
25050
|
+
function printAutoConfirmHint() {
|
|
25051
|
+
console.log(
|
|
25052
|
+
chalk205.dim(
|
|
25053
|
+
`Tip: run \`${autoConfirmHintCommand}\` to overwrite automatically next time`
|
|
25054
|
+
)
|
|
25055
|
+
);
|
|
25056
|
+
console.log();
|
|
25057
|
+
}
|
|
25058
|
+
|
|
25047
25059
|
// src/commands/rootConfigHelp.ts
|
|
25048
25060
|
var rootConfigHelp = {
|
|
25049
25061
|
sync: [
|
|
25050
25062
|
{
|
|
25051
25063
|
key: "sync.autoConfirm",
|
|
25052
|
-
setter:
|
|
25064
|
+
setter: autoConfirmHintCommand,
|
|
25053
25065
|
note: "skip the settings.json overwrite prompt"
|
|
25054
25066
|
}
|
|
25055
25067
|
],
|
|
@@ -25485,7 +25497,7 @@ import { execSync as execSync58 } from "child_process";
|
|
|
25485
25497
|
import { existsSync as existsSync56, mkdirSync as mkdirSync24, unlinkSync as unlinkSync21, writeFileSync as writeFileSync42 } from "fs";
|
|
25486
25498
|
import { tmpdir as tmpdir8 } from "os";
|
|
25487
25499
|
import { join as join67, resolve as resolve17 } from "path";
|
|
25488
|
-
import
|
|
25500
|
+
import chalk206 from "chalk";
|
|
25489
25501
|
|
|
25490
25502
|
// src/commands/screenshot/captureWindowPs1.ts
|
|
25491
25503
|
var captureWindowPs1 = `
|
|
@@ -25636,13 +25648,13 @@ function screenshot(processName) {
|
|
|
25636
25648
|
const config = loadConfig();
|
|
25637
25649
|
const outputDir = resolve17(config.screenshot.outputDir);
|
|
25638
25650
|
const outputPath = buildOutputPath(outputDir, processName);
|
|
25639
|
-
console.log(
|
|
25651
|
+
console.log(chalk206.gray(`Capturing window for process "${processName}" ...`));
|
|
25640
25652
|
try {
|
|
25641
25653
|
runPowerShellScript(processName, outputPath);
|
|
25642
|
-
console.log(
|
|
25654
|
+
console.log(chalk206.green(`Screenshot saved: ${outputPath}`));
|
|
25643
25655
|
} catch (error) {
|
|
25644
25656
|
const msg = error instanceof Error ? error.message : String(error);
|
|
25645
|
-
console.error(
|
|
25657
|
+
console.error(chalk206.red(`Failed to capture screenshot: ${msg}`));
|
|
25646
25658
|
process.exit(1);
|
|
25647
25659
|
}
|
|
25648
25660
|
}
|
|
@@ -29972,7 +29984,7 @@ var sessionsConfigHelp = [
|
|
|
29972
29984
|
|
|
29973
29985
|
// src/commands/sessions/summarise/index.ts
|
|
29974
29986
|
import * as fs41 from "fs";
|
|
29975
|
-
import
|
|
29987
|
+
import chalk207 from "chalk";
|
|
29976
29988
|
|
|
29977
29989
|
// src/commands/sessions/summarise/shared.ts
|
|
29978
29990
|
import * as fs40 from "fs";
|
|
@@ -30046,22 +30058,22 @@ ${firstMessage}`);
|
|
|
30046
30058
|
async function summarise2(options2) {
|
|
30047
30059
|
const files = await discoverSessionFiles();
|
|
30048
30060
|
if (files.length === 0) {
|
|
30049
|
-
console.log(
|
|
30061
|
+
console.log(chalk207.yellow("No sessions found."));
|
|
30050
30062
|
return;
|
|
30051
30063
|
}
|
|
30052
30064
|
const toProcess = selectCandidates(files, options2);
|
|
30053
30065
|
if (toProcess.length === 0) {
|
|
30054
|
-
console.log(
|
|
30066
|
+
console.log(chalk207.green("All sessions already summarised."));
|
|
30055
30067
|
return;
|
|
30056
30068
|
}
|
|
30057
30069
|
console.log(
|
|
30058
|
-
|
|
30070
|
+
chalk207.cyan(
|
|
30059
30071
|
`Summarising ${toProcess.length} session(s) (${files.length} total)\u2026`
|
|
30060
30072
|
)
|
|
30061
30073
|
);
|
|
30062
30074
|
const { succeeded, failed: failed2 } = processSessions(toProcess);
|
|
30063
30075
|
console.log(
|
|
30064
|
-
|
|
30076
|
+
chalk207.green(`Done: ${succeeded} summarised`) + (failed2 > 0 ? chalk207.yellow(`, ${failed2} skipped`) : "")
|
|
30065
30077
|
);
|
|
30066
30078
|
}
|
|
30067
30079
|
function selectCandidates(files, options2) {
|
|
@@ -30081,16 +30093,16 @@ function processSessions(files) {
|
|
|
30081
30093
|
let failed2 = 0;
|
|
30082
30094
|
for (let i = 0; i < files.length; i++) {
|
|
30083
30095
|
const file = files[i];
|
|
30084
|
-
process.stdout.write(
|
|
30096
|
+
process.stdout.write(chalk207.dim(` [${i + 1}/${files.length}] `));
|
|
30085
30097
|
const summary = summariseSession(file);
|
|
30086
30098
|
if (summary) {
|
|
30087
30099
|
writeSummary(file, summary);
|
|
30088
30100
|
succeeded++;
|
|
30089
|
-
process.stdout.write(`${
|
|
30101
|
+
process.stdout.write(`${chalk207.green("\u2713")} ${summary}
|
|
30090
30102
|
`);
|
|
30091
30103
|
} else {
|
|
30092
30104
|
failed2++;
|
|
30093
|
-
process.stdout.write(` ${
|
|
30105
|
+
process.stdout.write(` ${chalk207.yellow("skip")}
|
|
30094
30106
|
`);
|
|
30095
30107
|
}
|
|
30096
30108
|
}
|
|
@@ -30111,7 +30123,7 @@ function registerSessions(program2) {
|
|
|
30111
30123
|
}
|
|
30112
30124
|
|
|
30113
30125
|
// src/commands/statusLine.ts
|
|
30114
|
-
import
|
|
30126
|
+
import chalk209 from "chalk";
|
|
30115
30127
|
|
|
30116
30128
|
// src/shared/contextLevel.ts
|
|
30117
30129
|
function contextLevel(pct) {
|
|
@@ -30121,7 +30133,7 @@ function contextLevel(pct) {
|
|
|
30121
30133
|
}
|
|
30122
30134
|
|
|
30123
30135
|
// src/commands/buildLimitsSegment.ts
|
|
30124
|
-
import
|
|
30136
|
+
import chalk208 from "chalk";
|
|
30125
30137
|
|
|
30126
30138
|
// src/shared/rateLimitLevel.ts
|
|
30127
30139
|
var FIVE_HOUR_SECONDS = 5 * 3600;
|
|
@@ -30152,9 +30164,9 @@ function rateLimitLevel(pct, resetsAt, windowSeconds, now) {
|
|
|
30152
30164
|
|
|
30153
30165
|
// src/commands/buildLimitsSegment.ts
|
|
30154
30166
|
var LEVEL_COLOR = {
|
|
30155
|
-
ok:
|
|
30156
|
-
warn:
|
|
30157
|
-
over:
|
|
30167
|
+
ok: chalk208.green,
|
|
30168
|
+
warn: chalk208.yellow,
|
|
30169
|
+
over: chalk208.red
|
|
30158
30170
|
};
|
|
30159
30171
|
function formatLimit(pct, resetsAt, windowSeconds, fallbackLabel, now) {
|
|
30160
30172
|
const level = rateLimitLevel(pct, resetsAt, windowSeconds, now);
|
|
@@ -30250,7 +30262,7 @@ async function relayUsage(claudeSessionId, transcriptPath, usedPct) {
|
|
|
30250
30262
|
}
|
|
30251
30263
|
|
|
30252
30264
|
// src/commands/statusLine.ts
|
|
30253
|
-
|
|
30265
|
+
chalk209.level = 3;
|
|
30254
30266
|
function formatNumber(num) {
|
|
30255
30267
|
return num.toLocaleString("en-US");
|
|
30256
30268
|
}
|
|
@@ -30258,9 +30270,9 @@ function colorizePercent(pct) {
|
|
|
30258
30270
|
const label2 = `${Math.round(pct)}%`;
|
|
30259
30271
|
switch (contextLevel(pct)) {
|
|
30260
30272
|
case "red":
|
|
30261
|
-
return
|
|
30273
|
+
return chalk209.red(label2);
|
|
30262
30274
|
case "yellow":
|
|
30263
|
-
return
|
|
30275
|
+
return chalk209.yellow(label2);
|
|
30264
30276
|
default:
|
|
30265
30277
|
return label2;
|
|
30266
30278
|
}
|
|
@@ -30273,7 +30285,7 @@ async function statusLine() {
|
|
|
30273
30285
|
const usedPct = data.context_window.used_percentage ?? 0;
|
|
30274
30286
|
const dir = data.workspace?.current_dir ?? data.cwd;
|
|
30275
30287
|
const branch2 = dir ? readGitBranch(toGitCwd(dir)) : null;
|
|
30276
|
-
const branchSegment = branch2 ? `\u{1F33F}\uFE0F ${
|
|
30288
|
+
const branchSegment = branch2 ? `\u{1F33F}\uFE0F ${chalk209.cyan(branch2)} | ` : "";
|
|
30277
30289
|
console.log(
|
|
30278
30290
|
`${branchSegment}${model} | Tokens - ${formatNumber(totalIn)} \u2191 : ${formatNumber(totalOut)} \u2193 | Context - ${colorizePercent(usedPct)}${buildLimitsSegment(data.rate_limits)}`
|
|
30279
30291
|
);
|
|
@@ -30295,20 +30307,6 @@ import { fileURLToPath as fileURLToPath9 } from "url";
|
|
|
30295
30307
|
import * as fs42 from "fs";
|
|
30296
30308
|
import * as path61 from "path";
|
|
30297
30309
|
import chalk210 from "chalk";
|
|
30298
|
-
|
|
30299
|
-
// src/commands/sync/printAutoConfirmHint.ts
|
|
30300
|
-
import chalk209 from "chalk";
|
|
30301
|
-
var autoConfirmHintCommand = "assist config set sync.autoConfirm true --global";
|
|
30302
|
-
function printAutoConfirmHint() {
|
|
30303
|
-
console.log(
|
|
30304
|
-
chalk209.dim(
|
|
30305
|
-
`Tip: run \`${autoConfirmHintCommand}\` to overwrite automatically next time`
|
|
30306
|
-
)
|
|
30307
|
-
);
|
|
30308
|
-
console.log();
|
|
30309
|
-
}
|
|
30310
|
-
|
|
30311
|
-
// src/commands/sync/syncClaudeMd.ts
|
|
30312
30310
|
async function syncClaudeMd(claudeDir, targetBase, options2) {
|
|
30313
30311
|
const source = path61.join(claudeDir, "CLAUDE.md");
|
|
30314
30312
|
const target = path61.join(targetBase, "CLAUDE.md");
|