@staff0rd/assist 0.55.0 → 0.56.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/README.md +0 -1
- package/claude/settings.json +1 -0
- package/dist/index.js +85 -63
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -62,7 +62,6 @@ After installation, the `assist` command will be available globally.
|
|
|
62
62
|
- `assist config set <key> <value>` - Set a config value (e.g. commit.push true)
|
|
63
63
|
- `assist config get <key>` - Get a config value
|
|
64
64
|
- `assist config list` - List all config values
|
|
65
|
-
- `assist update` - Update claude-code to the latest version
|
|
66
65
|
- `assist verify` - Run all verify:* scripts from package.json in parallel
|
|
67
66
|
- `assist verify init` - Add verify scripts to a project
|
|
68
67
|
- `assist verify hardcoded-colors` - Check for hardcoded hex colors in src/
|
package/claude/settings.json
CHANGED
package/dist/index.js
CHANGED
|
@@ -1,13 +1,12 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
|
|
3
3
|
// src/index.ts
|
|
4
|
-
import { execSync as execSync23 } from "child_process";
|
|
5
4
|
import { Command } from "commander";
|
|
6
5
|
|
|
7
6
|
// package.json
|
|
8
7
|
var package_default = {
|
|
9
8
|
name: "@staff0rd/assist",
|
|
10
|
-
version: "0.
|
|
9
|
+
version: "0.56.1",
|
|
11
10
|
type: "module",
|
|
12
11
|
main: "dist/index.js",
|
|
13
12
|
bin: {
|
|
@@ -1874,6 +1873,10 @@ function getNextId(items) {
|
|
|
1874
1873
|
}
|
|
1875
1874
|
|
|
1876
1875
|
// src/commands/backlog/add/shared.ts
|
|
1876
|
+
import { spawnSync } from "child_process";
|
|
1877
|
+
import { mkdtempSync, readFileSync as readFileSync10, unlinkSync as unlinkSync2, writeFileSync as writeFileSync11 } from "fs";
|
|
1878
|
+
import { tmpdir } from "os";
|
|
1879
|
+
import { join as join9 } from "path";
|
|
1877
1880
|
import enquirer4 from "enquirer";
|
|
1878
1881
|
async function promptName() {
|
|
1879
1882
|
const { name } = await enquirer4.prompt({
|
|
@@ -1885,12 +1888,35 @@ async function promptName() {
|
|
|
1885
1888
|
return name.trim();
|
|
1886
1889
|
}
|
|
1887
1890
|
async function promptDescription() {
|
|
1888
|
-
const {
|
|
1889
|
-
type: "
|
|
1890
|
-
name: "
|
|
1891
|
-
message: "
|
|
1891
|
+
const { useEditor } = await enquirer4.prompt({
|
|
1892
|
+
type: "confirm",
|
|
1893
|
+
name: "useEditor",
|
|
1894
|
+
message: "Open editor for description?",
|
|
1895
|
+
initial: false
|
|
1892
1896
|
});
|
|
1893
|
-
|
|
1897
|
+
if (!useEditor) {
|
|
1898
|
+
const { description } = await enquirer4.prompt({
|
|
1899
|
+
type: "input",
|
|
1900
|
+
name: "description",
|
|
1901
|
+
message: "Description (optional):"
|
|
1902
|
+
});
|
|
1903
|
+
return description.trim() || void 0;
|
|
1904
|
+
}
|
|
1905
|
+
return openEditor();
|
|
1906
|
+
}
|
|
1907
|
+
function openEditor() {
|
|
1908
|
+
const editor = process.env.EDITOR || process.env.VISUAL || "vi";
|
|
1909
|
+
const dir = mkdtempSync(join9(tmpdir(), "assist-"));
|
|
1910
|
+
const filePath = join9(dir, "description.md");
|
|
1911
|
+
writeFileSync11(filePath, "");
|
|
1912
|
+
const result = spawnSync(editor, [filePath], { stdio: "inherit" });
|
|
1913
|
+
if (result.status !== 0) {
|
|
1914
|
+
unlinkSync2(filePath);
|
|
1915
|
+
return void 0;
|
|
1916
|
+
}
|
|
1917
|
+
const content = readFileSync10(filePath, "utf-8").trim();
|
|
1918
|
+
unlinkSync2(filePath);
|
|
1919
|
+
return content || void 0;
|
|
1894
1920
|
}
|
|
1895
1921
|
async function promptAcceptanceCriteria() {
|
|
1896
1922
|
const criteria = [];
|
|
@@ -2510,7 +2536,7 @@ function registerComplexity(program2) {
|
|
|
2510
2536
|
}
|
|
2511
2537
|
|
|
2512
2538
|
// src/commands/deploy/redirect.ts
|
|
2513
|
-
import { existsSync as existsSync15, readFileSync as
|
|
2539
|
+
import { existsSync as existsSync15, readFileSync as readFileSync11, writeFileSync as writeFileSync12 } from "fs";
|
|
2514
2540
|
import chalk34 from "chalk";
|
|
2515
2541
|
var TRAILING_SLASH_SCRIPT = ` <script>
|
|
2516
2542
|
if (!window.location.pathname.endsWith('/')) {
|
|
@@ -2523,7 +2549,7 @@ function redirect() {
|
|
|
2523
2549
|
console.log(chalk34.yellow("No index.html found"));
|
|
2524
2550
|
return;
|
|
2525
2551
|
}
|
|
2526
|
-
const content =
|
|
2552
|
+
const content = readFileSync11(indexPath, "utf-8");
|
|
2527
2553
|
if (content.includes("window.location.pathname.endsWith('/')")) {
|
|
2528
2554
|
console.log(chalk34.dim("Trailing slash script already present"));
|
|
2529
2555
|
return;
|
|
@@ -2534,7 +2560,7 @@ function redirect() {
|
|
|
2534
2560
|
return;
|
|
2535
2561
|
}
|
|
2536
2562
|
const newContent = content.slice(0, headCloseIndex) + TRAILING_SLASH_SCRIPT + "\n " + content.slice(headCloseIndex);
|
|
2537
|
-
|
|
2563
|
+
writeFileSync12(indexPath, newContent);
|
|
2538
2564
|
console.log(chalk34.green("Added trailing slash redirect to index.html"));
|
|
2539
2565
|
}
|
|
2540
2566
|
|
|
@@ -2554,16 +2580,16 @@ import { execSync as execSync11 } from "child_process";
|
|
|
2554
2580
|
import chalk35 from "chalk";
|
|
2555
2581
|
|
|
2556
2582
|
// src/commands/devlog/loadDevlogEntries.ts
|
|
2557
|
-
import { readdirSync, readFileSync as
|
|
2583
|
+
import { readdirSync, readFileSync as readFileSync12 } from "fs";
|
|
2558
2584
|
import { homedir } from "os";
|
|
2559
|
-
import { join as
|
|
2560
|
-
var DEVLOG_DIR =
|
|
2585
|
+
import { join as join10 } from "path";
|
|
2586
|
+
var DEVLOG_DIR = join10(homedir(), "git/blog/src/content/devlog");
|
|
2561
2587
|
function loadDevlogEntries(repoName) {
|
|
2562
2588
|
const entries = /* @__PURE__ */ new Map();
|
|
2563
2589
|
try {
|
|
2564
2590
|
const files = readdirSync(DEVLOG_DIR).filter((f) => f.endsWith(".md"));
|
|
2565
2591
|
for (const file of files) {
|
|
2566
|
-
const content =
|
|
2592
|
+
const content = readFileSync12(join10(DEVLOG_DIR, file), "utf-8");
|
|
2567
2593
|
const frontmatterMatch = content.match(/^---\n([\s\S]*?)\n---/);
|
|
2568
2594
|
if (frontmatterMatch) {
|
|
2569
2595
|
const frontmatter = frontmatterMatch[1];
|
|
@@ -2918,29 +2944,29 @@ import { execSync as execSync17 } from "child_process";
|
|
|
2918
2944
|
|
|
2919
2945
|
// src/commands/prs/resolveCommentWithReply.ts
|
|
2920
2946
|
import { execSync as execSync16 } from "child_process";
|
|
2921
|
-
import { unlinkSync as
|
|
2922
|
-
import { tmpdir } from "os";
|
|
2923
|
-
import { join as
|
|
2947
|
+
import { unlinkSync as unlinkSync4, writeFileSync as writeFileSync13 } from "fs";
|
|
2948
|
+
import { tmpdir as tmpdir2 } from "os";
|
|
2949
|
+
import { join as join12 } from "path";
|
|
2924
2950
|
|
|
2925
2951
|
// src/commands/prs/loadCommentsCache.ts
|
|
2926
|
-
import { existsSync as existsSync16, readFileSync as
|
|
2927
|
-
import { join as
|
|
2952
|
+
import { existsSync as existsSync16, readFileSync as readFileSync13, unlinkSync as unlinkSync3 } from "fs";
|
|
2953
|
+
import { join as join11 } from "path";
|
|
2928
2954
|
import { parse } from "yaml";
|
|
2929
2955
|
function getCachePath(prNumber) {
|
|
2930
|
-
return
|
|
2956
|
+
return join11(process.cwd(), ".assist", `pr-${prNumber}-comments.yaml`);
|
|
2931
2957
|
}
|
|
2932
2958
|
function loadCommentsCache(prNumber) {
|
|
2933
2959
|
const cachePath = getCachePath(prNumber);
|
|
2934
2960
|
if (!existsSync16(cachePath)) {
|
|
2935
2961
|
return null;
|
|
2936
2962
|
}
|
|
2937
|
-
const content =
|
|
2963
|
+
const content = readFileSync13(cachePath, "utf-8");
|
|
2938
2964
|
return parse(content);
|
|
2939
2965
|
}
|
|
2940
2966
|
function deleteCommentsCache(prNumber) {
|
|
2941
2967
|
const cachePath = getCachePath(prNumber);
|
|
2942
2968
|
if (existsSync16(cachePath)) {
|
|
2943
|
-
|
|
2969
|
+
unlinkSync3(cachePath);
|
|
2944
2970
|
console.log("No more unresolved line comments. Cache dropped.");
|
|
2945
2971
|
}
|
|
2946
2972
|
}
|
|
@@ -2990,15 +3016,15 @@ function replyToComment(org, repo, prNumber, commentId, message) {
|
|
|
2990
3016
|
}
|
|
2991
3017
|
function resolveThread(threadId) {
|
|
2992
3018
|
const mutation = `mutation($threadId: ID!) { resolveReviewThread(input: {threadId: $threadId}) { thread { isResolved } } }`;
|
|
2993
|
-
const queryFile =
|
|
2994
|
-
|
|
3019
|
+
const queryFile = join12(tmpdir2(), `gh-mutation-${Date.now()}.graphql`);
|
|
3020
|
+
writeFileSync13(queryFile, mutation);
|
|
2995
3021
|
try {
|
|
2996
3022
|
execSync16(
|
|
2997
3023
|
`gh api graphql -F query=@${queryFile} -f threadId="${threadId}"`,
|
|
2998
3024
|
{ stdio: "inherit" }
|
|
2999
3025
|
);
|
|
3000
3026
|
} finally {
|
|
3001
|
-
|
|
3027
|
+
unlinkSync4(queryFile);
|
|
3002
3028
|
}
|
|
3003
3029
|
}
|
|
3004
3030
|
function requireCache(prNumber) {
|
|
@@ -3071,8 +3097,8 @@ function fixed(commentId, sha) {
|
|
|
3071
3097
|
}
|
|
3072
3098
|
|
|
3073
3099
|
// src/commands/prs/listComments/index.ts
|
|
3074
|
-
import { existsSync as existsSync17, mkdirSync as mkdirSync4, writeFileSync as
|
|
3075
|
-
import { join as
|
|
3100
|
+
import { existsSync as existsSync17, mkdirSync as mkdirSync4, writeFileSync as writeFileSync15 } from "fs";
|
|
3101
|
+
import { join as join14 } from "path";
|
|
3076
3102
|
import { stringify } from "yaml";
|
|
3077
3103
|
|
|
3078
3104
|
// src/lib/isClaudeCode.ts
|
|
@@ -3082,13 +3108,13 @@ function isClaudeCode() {
|
|
|
3082
3108
|
|
|
3083
3109
|
// src/commands/prs/fetchThreadIds.ts
|
|
3084
3110
|
import { execSync as execSync18 } from "child_process";
|
|
3085
|
-
import { unlinkSync as
|
|
3086
|
-
import { tmpdir as
|
|
3087
|
-
import { join as
|
|
3111
|
+
import { unlinkSync as unlinkSync5, writeFileSync as writeFileSync14 } from "fs";
|
|
3112
|
+
import { tmpdir as tmpdir3 } from "os";
|
|
3113
|
+
import { join as join13 } from "path";
|
|
3088
3114
|
var THREAD_QUERY = `query($owner: String!, $repo: String!, $prNumber: Int!) { repository(owner: $owner, name: $repo) { pullRequest(number: $prNumber) { reviewThreads(first: 100) { nodes { id isResolved comments(first: 100) { nodes { databaseId } } } } } } }`;
|
|
3089
3115
|
function fetchThreadIds(org, repo, prNumber) {
|
|
3090
|
-
const queryFile =
|
|
3091
|
-
|
|
3116
|
+
const queryFile = join13(tmpdir3(), `gh-query-${Date.now()}.graphql`);
|
|
3117
|
+
writeFileSync14(queryFile, THREAD_QUERY);
|
|
3092
3118
|
try {
|
|
3093
3119
|
const result = execSync18(
|
|
3094
3120
|
`gh api graphql -F query=@${queryFile} -F owner="${org}" -F repo="${repo}" -F prNumber=${prNumber}`,
|
|
@@ -3107,7 +3133,7 @@ function fetchThreadIds(org, repo, prNumber) {
|
|
|
3107
3133
|
}
|
|
3108
3134
|
return { threadMap, resolvedThreadIds };
|
|
3109
3135
|
} finally {
|
|
3110
|
-
|
|
3136
|
+
unlinkSync5(queryFile);
|
|
3111
3137
|
}
|
|
3112
3138
|
}
|
|
3113
3139
|
|
|
@@ -3190,7 +3216,7 @@ function printComments(comments) {
|
|
|
3190
3216
|
}
|
|
3191
3217
|
}
|
|
3192
3218
|
function writeCommentsCache(prNumber, comments) {
|
|
3193
|
-
const assistDir =
|
|
3219
|
+
const assistDir = join14(process.cwd(), ".assist");
|
|
3194
3220
|
if (!existsSync17(assistDir)) {
|
|
3195
3221
|
mkdirSync4(assistDir, { recursive: true });
|
|
3196
3222
|
}
|
|
@@ -3199,8 +3225,8 @@ function writeCommentsCache(prNumber, comments) {
|
|
|
3199
3225
|
fetchedAt: (/* @__PURE__ */ new Date()).toISOString(),
|
|
3200
3226
|
comments
|
|
3201
3227
|
};
|
|
3202
|
-
const cachePath =
|
|
3203
|
-
|
|
3228
|
+
const cachePath = join14(assistDir, `pr-${prNumber}-comments.yaml`);
|
|
3229
|
+
writeFileSync15(cachePath, stringify(cacheData));
|
|
3204
3230
|
}
|
|
3205
3231
|
function handleKnownErrors(error) {
|
|
3206
3232
|
if (isGhNotInstalled(error)) {
|
|
@@ -4162,7 +4188,7 @@ function registerRefactor(program2) {
|
|
|
4162
4188
|
|
|
4163
4189
|
// src/commands/transcript/shared.ts
|
|
4164
4190
|
import { existsSync as existsSync18, readdirSync as readdirSync2, statSync } from "fs";
|
|
4165
|
-
import { basename as basename4, join as
|
|
4191
|
+
import { basename as basename4, join as join15, relative } from "path";
|
|
4166
4192
|
import * as readline2 from "readline";
|
|
4167
4193
|
var DATE_PREFIX_REGEX = /^\d{4}-\d{2}-\d{2}/;
|
|
4168
4194
|
function getDatePrefix(daysOffset = 0) {
|
|
@@ -4180,7 +4206,7 @@ function collectFiles(dir, extension) {
|
|
|
4180
4206
|
if (!existsSync18(dir)) return [];
|
|
4181
4207
|
const results = [];
|
|
4182
4208
|
for (const entry of readdirSync2(dir)) {
|
|
4183
|
-
const fullPath =
|
|
4209
|
+
const fullPath = join15(dir, entry);
|
|
4184
4210
|
if (statSync(fullPath).isDirectory()) {
|
|
4185
4211
|
results.push(...collectFiles(fullPath, extension));
|
|
4186
4212
|
} else if (entry.endsWith(extension)) {
|
|
@@ -4277,11 +4303,11 @@ async function configure() {
|
|
|
4277
4303
|
import { existsSync as existsSync20 } from "fs";
|
|
4278
4304
|
|
|
4279
4305
|
// src/commands/transcript/format/fixInvalidDatePrefixes/index.ts
|
|
4280
|
-
import { dirname as dirname12, join as
|
|
4306
|
+
import { dirname as dirname12, join as join17 } from "path";
|
|
4281
4307
|
|
|
4282
4308
|
// src/commands/transcript/format/fixInvalidDatePrefixes/promptForDateFix.ts
|
|
4283
4309
|
import { renameSync } from "fs";
|
|
4284
|
-
import { join as
|
|
4310
|
+
import { join as join16 } from "path";
|
|
4285
4311
|
async function resolveDate(rl, choice) {
|
|
4286
4312
|
if (choice === "1") return getDatePrefix(0);
|
|
4287
4313
|
if (choice === "2") return getDatePrefix(-1);
|
|
@@ -4296,7 +4322,7 @@ async function resolveDate(rl, choice) {
|
|
|
4296
4322
|
}
|
|
4297
4323
|
function renameWithPrefix(vttDir, vttFile, prefix) {
|
|
4298
4324
|
const newFilename = `${prefix}.${vttFile}`;
|
|
4299
|
-
renameSync(
|
|
4325
|
+
renameSync(join16(vttDir, vttFile), join16(vttDir, newFilename));
|
|
4300
4326
|
console.log(`Renamed to: ${newFilename}`);
|
|
4301
4327
|
return newFilename;
|
|
4302
4328
|
}
|
|
@@ -4330,12 +4356,12 @@ async function fixInvalidDatePrefixes(vttFiles) {
|
|
|
4330
4356
|
const vttFileDir = dirname12(vttFile.absolutePath);
|
|
4331
4357
|
const newFilename = await promptForDateFix(vttFile.filename, vttFileDir);
|
|
4332
4358
|
if (newFilename) {
|
|
4333
|
-
const newRelativePath =
|
|
4359
|
+
const newRelativePath = join17(
|
|
4334
4360
|
dirname12(vttFile.relativePath),
|
|
4335
4361
|
newFilename
|
|
4336
4362
|
);
|
|
4337
4363
|
vttFiles[i] = {
|
|
4338
|
-
absolutePath:
|
|
4364
|
+
absolutePath: join17(vttFileDir, newFilename),
|
|
4339
4365
|
relativePath: newRelativePath,
|
|
4340
4366
|
filename: newFilename
|
|
4341
4367
|
};
|
|
@@ -4348,8 +4374,8 @@ async function fixInvalidDatePrefixes(vttFiles) {
|
|
|
4348
4374
|
}
|
|
4349
4375
|
|
|
4350
4376
|
// src/commands/transcript/format/processVttFile/index.ts
|
|
4351
|
-
import { existsSync as existsSync19, mkdirSync as mkdirSync5, readFileSync as
|
|
4352
|
-
import { basename as basename5, dirname as dirname13, join as
|
|
4377
|
+
import { existsSync as existsSync19, mkdirSync as mkdirSync5, readFileSync as readFileSync14, writeFileSync as writeFileSync16 } from "fs";
|
|
4378
|
+
import { basename as basename5, dirname as dirname13, join as join18 } from "path";
|
|
4353
4379
|
|
|
4354
4380
|
// src/commands/transcript/cleanText.ts
|
|
4355
4381
|
function cleanText(text) {
|
|
@@ -4559,17 +4585,17 @@ function toMdFilename(vttFilename) {
|
|
|
4559
4585
|
return `${basename5(vttFilename, ".vtt").replace(/\s*Transcription\s*/g, " ").trim()}.md`;
|
|
4560
4586
|
}
|
|
4561
4587
|
function resolveOutputDir(relativeDir, transcriptsDir) {
|
|
4562
|
-
return relativeDir === "." ? transcriptsDir :
|
|
4588
|
+
return relativeDir === "." ? transcriptsDir : join18(transcriptsDir, relativeDir);
|
|
4563
4589
|
}
|
|
4564
4590
|
function buildOutputPaths(vttFile, transcriptsDir) {
|
|
4565
4591
|
const mdFile = toMdFilename(vttFile.filename);
|
|
4566
4592
|
const relativeDir = dirname13(vttFile.relativePath);
|
|
4567
4593
|
const outputDir = resolveOutputDir(relativeDir, transcriptsDir);
|
|
4568
|
-
const outputPath =
|
|
4594
|
+
const outputPath = join18(outputDir, mdFile);
|
|
4569
4595
|
return { outputDir, outputPath, mdFile, relativeDir };
|
|
4570
4596
|
}
|
|
4571
4597
|
function logSkipped(relativeDir, mdFile) {
|
|
4572
|
-
console.log(`Skipping (already exists): ${
|
|
4598
|
+
console.log(`Skipping (already exists): ${join18(relativeDir, mdFile)}`);
|
|
4573
4599
|
return "skipped";
|
|
4574
4600
|
}
|
|
4575
4601
|
function ensureDirectory(dir, label) {
|
|
@@ -4596,10 +4622,10 @@ function logReduction(cueCount, messageCount) {
|
|
|
4596
4622
|
}
|
|
4597
4623
|
function readAndParseCues(inputPath) {
|
|
4598
4624
|
console.log(`Reading: ${inputPath}`);
|
|
4599
|
-
return processCues(
|
|
4625
|
+
return processCues(readFileSync14(inputPath, "utf-8"));
|
|
4600
4626
|
}
|
|
4601
4627
|
function writeFormatted(outputPath, content) {
|
|
4602
|
-
|
|
4628
|
+
writeFileSync16(outputPath, content, "utf-8");
|
|
4603
4629
|
console.log(`Written: ${outputPath}`);
|
|
4604
4630
|
}
|
|
4605
4631
|
function convertVttToMarkdown(inputPath, outputPath) {
|
|
@@ -4668,17 +4694,17 @@ async function format() {
|
|
|
4668
4694
|
|
|
4669
4695
|
// src/commands/transcript/summarise/index.ts
|
|
4670
4696
|
import { existsSync as existsSync22 } from "fs";
|
|
4671
|
-
import { basename as basename6, dirname as dirname15, join as
|
|
4697
|
+
import { basename as basename6, dirname as dirname15, join as join20, relative as relative2 } from "path";
|
|
4672
4698
|
|
|
4673
4699
|
// src/commands/transcript/summarise/processStagedFile/index.ts
|
|
4674
4700
|
import {
|
|
4675
4701
|
existsSync as existsSync21,
|
|
4676
4702
|
mkdirSync as mkdirSync6,
|
|
4677
|
-
readFileSync as
|
|
4703
|
+
readFileSync as readFileSync15,
|
|
4678
4704
|
renameSync as renameSync2,
|
|
4679
4705
|
rmSync
|
|
4680
4706
|
} from "fs";
|
|
4681
|
-
import { dirname as dirname14, join as
|
|
4707
|
+
import { dirname as dirname14, join as join19 } from "path";
|
|
4682
4708
|
|
|
4683
4709
|
// src/commands/transcript/summarise/processStagedFile/validateStagedContent.ts
|
|
4684
4710
|
import chalk48 from "chalk";
|
|
@@ -4707,7 +4733,7 @@ function validateStagedContent(filename, content) {
|
|
|
4707
4733
|
}
|
|
4708
4734
|
|
|
4709
4735
|
// src/commands/transcript/summarise/processStagedFile/index.ts
|
|
4710
|
-
var STAGING_DIR =
|
|
4736
|
+
var STAGING_DIR = join19(process.cwd(), ".assist", "transcript");
|
|
4711
4737
|
function processStagedFile() {
|
|
4712
4738
|
if (!existsSync21(STAGING_DIR)) {
|
|
4713
4739
|
return false;
|
|
@@ -4718,7 +4744,7 @@ function processStagedFile() {
|
|
|
4718
4744
|
}
|
|
4719
4745
|
const { transcriptsDir, summaryDir } = getTranscriptConfig();
|
|
4720
4746
|
const stagedFile = stagedFiles[0];
|
|
4721
|
-
const content =
|
|
4747
|
+
const content = readFileSync15(stagedFile.absolutePath, "utf-8");
|
|
4722
4748
|
validateStagedContent(stagedFile.filename, content);
|
|
4723
4749
|
const stagedBaseName = getTranscriptBaseName(stagedFile.filename);
|
|
4724
4750
|
const transcriptFiles = findMdFilesRecursive(transcriptsDir);
|
|
@@ -4731,7 +4757,7 @@ function processStagedFile() {
|
|
|
4731
4757
|
);
|
|
4732
4758
|
process.exit(1);
|
|
4733
4759
|
}
|
|
4734
|
-
const destPath =
|
|
4760
|
+
const destPath = join19(summaryDir, matchingTranscript.relativePath);
|
|
4735
4761
|
const destDir = dirname14(destPath);
|
|
4736
4762
|
if (!existsSync21(destDir)) {
|
|
4737
4763
|
mkdirSync6(destDir, { recursive: true });
|
|
@@ -4747,7 +4773,7 @@ function processStagedFile() {
|
|
|
4747
4773
|
// src/commands/transcript/summarise/index.ts
|
|
4748
4774
|
function buildRelativeKey(relativePath, baseName) {
|
|
4749
4775
|
const relDir = dirname15(relativePath);
|
|
4750
|
-
return relDir === "." ? baseName :
|
|
4776
|
+
return relDir === "." ? baseName : join20(relDir, baseName);
|
|
4751
4777
|
}
|
|
4752
4778
|
function buildSummaryIndex(summaryDir) {
|
|
4753
4779
|
const summaryFiles = findMdFilesRecursive(summaryDir);
|
|
@@ -4781,8 +4807,8 @@ function summarise() {
|
|
|
4781
4807
|
}
|
|
4782
4808
|
const next2 = missing[0];
|
|
4783
4809
|
const outputFilename = `${getTranscriptBaseName(next2.filename)}.md`;
|
|
4784
|
-
const outputPath =
|
|
4785
|
-
const summaryFileDir =
|
|
4810
|
+
const outputPath = join20(STAGING_DIR, outputFilename);
|
|
4811
|
+
const summaryFileDir = join20(summaryDir, dirname15(next2.relativePath));
|
|
4786
4812
|
const relativeTranscriptPath = encodeURI(
|
|
4787
4813
|
relative2(summaryFileDir, next2.absolutePath).replace(/\\/g, "/")
|
|
4788
4814
|
);
|
|
@@ -5037,10 +5063,6 @@ program.name("assist").description("CLI application").version(package_default.ve
|
|
|
5037
5063
|
program.command("sync").description("Copy command files to ~/.claude/commands").action(sync);
|
|
5038
5064
|
program.command("init").description("Initialize VS Code and verify configurations").action(init4);
|
|
5039
5065
|
program.command("commit <message>").description("Create a git commit with validation").action(commit);
|
|
5040
|
-
program.command("update").description("Update claude-code to the latest version").action(() => {
|
|
5041
|
-
console.log("Updating claude-code...");
|
|
5042
|
-
execSync23("npm install -g @anthropic-ai/claude-code", { stdio: "inherit" });
|
|
5043
|
-
});
|
|
5044
5066
|
var configCommand = program.command("config").description("View and modify assist.yml configuration");
|
|
5045
5067
|
configCommand.command("set <key> <value>").description("Set a config value (e.g. commit.push true)").action(configSet);
|
|
5046
5068
|
configCommand.command("get <key>").description("Get a config value").action(configGet);
|