@staff0rd/assist 0.1047.0 → 0.1049.0
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 +484 -479
- package/dist/index.js +21 -9
- 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.1049.0",
|
|
10
10
|
type: "module",
|
|
11
11
|
main: "dist/index.js",
|
|
12
12
|
bin: {
|
|
@@ -40426,14 +40426,19 @@ function highLevelSlicesPath(repo, headRef, headSha) {
|
|
|
40426
40426
|
);
|
|
40427
40427
|
}
|
|
40428
40428
|
|
|
40429
|
-
// src/commands/review/highLevel/
|
|
40430
|
-
function
|
|
40429
|
+
// src/commands/review/highLevel/countHunkLines.ts
|
|
40430
|
+
function countHunkLines(text20, prefix2) {
|
|
40431
40431
|
return text20.split("\n").filter((line) => line.startsWith(prefix2)).length;
|
|
40432
40432
|
}
|
|
40433
|
+
|
|
40434
|
+
// src/commands/review/highLevel/hunkTextsOf.ts
|
|
40435
|
+
function hunkTextsOf(patch2) {
|
|
40436
|
+
return hunksOf(patch2 ?? "").filter((text20) => text20.startsWith("@@"));
|
|
40437
|
+
}
|
|
40438
|
+
|
|
40439
|
+
// src/commands/review/highLevel/listHighLevelHunks.ts
|
|
40433
40440
|
function hunksOfFile(file) {
|
|
40434
|
-
const texts =
|
|
40435
|
-
(text20) => text20.startsWith("@@")
|
|
40436
|
-
);
|
|
40441
|
+
const texts = hunkTextsOf(file.patch);
|
|
40437
40442
|
if (texts.length === 0)
|
|
40438
40443
|
return [
|
|
40439
40444
|
{
|
|
@@ -40448,8 +40453,8 @@ function hunksOfFile(file) {
|
|
|
40448
40453
|
ref: `${file.path}#${index3}`,
|
|
40449
40454
|
path: file.path,
|
|
40450
40455
|
text: text20,
|
|
40451
|
-
additions:
|
|
40452
|
-
deletions:
|
|
40456
|
+
additions: countHunkLines(text20, "+"),
|
|
40457
|
+
deletions: countHunkLines(text20, "-")
|
|
40453
40458
|
}));
|
|
40454
40459
|
}
|
|
40455
40460
|
function listHighLevelHunks(files) {
|
|
@@ -40519,7 +40524,14 @@ function resolveHighLevelSlices(raw, hunks) {
|
|
|
40519
40524
|
for (const ref of known) claimed.add(ref);
|
|
40520
40525
|
}
|
|
40521
40526
|
const rest = [...byRef.keys()].filter((ref) => !claimed.has(ref));
|
|
40522
|
-
if (rest.length > 0)
|
|
40527
|
+
if (rest.length > 0)
|
|
40528
|
+
slices.push({
|
|
40529
|
+
title: "Everything else",
|
|
40530
|
+
summary: "Hunks no slice claimed.",
|
|
40531
|
+
hunks: rest,
|
|
40532
|
+
...sliceTotals(rest, byRef),
|
|
40533
|
+
rest: true
|
|
40534
|
+
});
|
|
40523
40535
|
return { slices, warnings };
|
|
40524
40536
|
}
|
|
40525
40537
|
|