@staff0rd/assist 0.912.0 → 0.913.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/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.912.0",
9
+ version: "0.913.0",
10
10
  type: "module",
11
11
  main: "dist/index.js",
12
12
  bin: {
@@ -5185,6 +5185,10 @@ function githubPullNumber(url) {
5185
5185
  var prActions = [
5186
5186
  { label: "Checkout", args: ["review", "--checkout-only"] },
5187
5187
  { label: "Address Comments", args: ["review-pr-comments"] },
5188
+ {
5189
+ label: "Address Comments (batch)",
5190
+ args: ["review-pr-comments", "--batch"]
5191
+ },
5188
5192
  { label: "Address Comments (auto)", args: ["review-pr-comments", "--auto"] },
5189
5193
  { label: "Fix conflicts (merge)", args: ["fix-conflict"] },
5190
5194
  { label: "Fix conflicts (rebase)", args: ["fix-conflict", "--rebase"] }
@@ -27970,10 +27974,11 @@ function registerFixConflict(program, resumeFlag) {
27970
27974
 
27971
27975
  // src/commands/reviewPrComments.ts
27972
27976
  import { randomUUID as randomUUID12 } from "crypto";
27973
- function buildPrompt3(number, announce, auto) {
27977
+ function buildPrompt3(number, announce, options2) {
27974
27978
  const args = [
27975
27979
  "/review-pr-comments",
27976
- ...auto ? ["--auto"] : [],
27980
+ ...options2.batch ? ["--batch"] : [],
27981
+ ...options2.auto ? ["--auto"] : [],
27977
27982
  ...announce ? [`--announce ${number}`] : []
27978
27983
  ];
27979
27984
  return args.join(" ");
@@ -27983,10 +27988,16 @@ function validateAnnounce(number, announce) {
27983
27988
  console.error("Error: --announce requires a PR number.");
27984
27989
  process.exit(1);
27985
27990
  }
27991
+ function validateMode(options2) {
27992
+ if (!options2.batch || !options2.auto) return;
27993
+ console.error("Error: --batch and --auto cannot be used together.");
27994
+ process.exit(1);
27995
+ }
27986
27996
  async function reviewPrComments(number, options2 = {}) {
27987
27997
  const announce = options2.announce === true;
27988
27998
  const resumeSessionId = options2.resumeSessionId;
27989
27999
  validateAnnounce(number, announce);
28000
+ validateMode(options2);
27990
28001
  if (number && !resumeSessionId) await checkoutPr(number);
27991
28002
  const claudeSessionId = resumeSessionId ?? randomUUID12();
27992
28003
  emitActivity({
@@ -27995,7 +28006,7 @@ async function reviewPrComments(number, options2 = {}) {
27995
28006
  claudeSessionId
27996
28007
  });
27997
28008
  const { done: done2 } = spawnClaude(
27998
- resumeSessionId ? resumeNudge() : buildPrompt3(number, announce, options2.auto === true),
28009
+ resumeSessionId ? resumeNudge() : buildPrompt3(number, announce, options2),
27999
28010
  {
28000
28011
  permissionMode: "auto",
28001
28012
  sessionId: claudeSessionId,
@@ -28013,10 +28024,14 @@ function registerReviewPrComments(program, resumeFlag) {
28013
28024
  ).option(
28014
28025
  "--auto",
28015
28026
  "Accept Claude's own recommendation for each thread without asking, falling back to asking only for threads it cannot confidently decide"
28027
+ ).option(
28028
+ "--batch",
28029
+ "Collect a decision for every thread before changing anything, then apply each fix as its own commit, push once and resolve every thread (cannot be combined with --auto)"
28016
28030
  ).option("--resume-session <id>", resumeFlag).action(
28017
28031
  (number, opts) => reviewPrComments(number, {
28018
28032
  announce: opts.announce,
28019
28033
  auto: opts.auto,
28034
+ batch: opts.batch,
28020
28035
  resumeSessionId: opts.resumeSession
28021
28036
  })
28022
28037
  );
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@staff0rd/assist",
3
- "version": "0.912.0",
3
+ "version": "0.913.0",
4
4
  "type": "module",
5
5
  "main": "dist/index.js",
6
6
  "bin": {