@staff0rd/assist 0.422.0 → 0.423.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 +1 -0
- package/dist/commands/sessions/web/bundle.js +2 -2
- package/dist/index.js +27 -12
- 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.423.1",
|
|
10
10
|
type: "module",
|
|
11
11
|
main: "dist/index.js",
|
|
12
12
|
bin: {
|
|
@@ -426,7 +426,8 @@ var assistConfigSchema = z2.strictObject({
|
|
|
426
426
|
}).optional(),
|
|
427
427
|
prs: z2.strictObject({
|
|
428
428
|
slack: z2.string().optional(),
|
|
429
|
-
required: z2.boolean().default(false)
|
|
429
|
+
required: z2.boolean().default(false),
|
|
430
|
+
promptJira: z2.boolean().default(false)
|
|
430
431
|
}).optional(),
|
|
431
432
|
repos: z2.record(z2.string(), z2.record(z2.string(), z2.unknown())).optional(),
|
|
432
433
|
run: z2.array(z2.union([runConfigSchema, runLinkSchema])).optional(),
|
|
@@ -1625,9 +1626,9 @@ function findUnmergedPaths() {
|
|
|
1625
1626
|
}
|
|
1626
1627
|
|
|
1627
1628
|
// src/commands/commit/abortOnConflicts.ts
|
|
1628
|
-
function abort(headline,
|
|
1629
|
+
function abort(headline, guidance2) {
|
|
1629
1630
|
console.error(`Error: refusing to commit \u2014 ${headline}`);
|
|
1630
|
-
console.error(
|
|
1631
|
+
console.error(guidance2);
|
|
1631
1632
|
console.error("Nothing was committed or pushed.");
|
|
1632
1633
|
process.exit(1);
|
|
1633
1634
|
}
|
|
@@ -18487,6 +18488,11 @@ var prsConfigHelp = [
|
|
|
18487
18488
|
key: "prs.required",
|
|
18488
18489
|
setter: "assist config set prs.required true",
|
|
18489
18490
|
note: "require a branch when running a backlog item"
|
|
18491
|
+
},
|
|
18492
|
+
{
|
|
18493
|
+
key: "prs.promptJira",
|
|
18494
|
+
setter: "assist config set prs.promptJira true",
|
|
18495
|
+
note: "'assist prs raise' help asks the user for a Jira key to --resolves (default false)"
|
|
18490
18496
|
}
|
|
18491
18497
|
];
|
|
18492
18498
|
|
|
@@ -18506,7 +18512,18 @@ function registerPrsEdit(prsCommand) {
|
|
|
18506
18512
|
}
|
|
18507
18513
|
|
|
18508
18514
|
// src/commands/prs/raiseHelpText.ts
|
|
18509
|
-
var
|
|
18515
|
+
var RESOLVES_WITH_PROMPT = ` --resolves <key> Jira issue key resolved by this PR; repeatable. Each key's
|
|
18516
|
+
browse URL is appended inline to ## Why. Unless a Jira key is
|
|
18517
|
+
already known from the session, ask the user whether this PR
|
|
18518
|
+
resolves a Jira issue and for the key before raising; omit
|
|
18519
|
+
--resolves only if they say there isn't one.`;
|
|
18520
|
+
var RESOLVES_NO_PROMPT = ` --resolves <key> Jira issue key resolved by this PR; repeatable. Each key's
|
|
18521
|
+
browse URL is appended inline to ## Why. Pass it when a Jira
|
|
18522
|
+
key is known from the session or supplied by the user; omit
|
|
18523
|
+
it otherwise.`;
|
|
18524
|
+
function guidance(promptJira) {
|
|
18525
|
+
const resolves = promptJira ? RESOLVES_WITH_PROMPT : RESOLVES_NO_PROMPT;
|
|
18526
|
+
return `Raise a pull request for the current branch. Use a concise description with no
|
|
18510
18527
|
headers, and do not reference Claude or any AI assistance in the title or body.
|
|
18511
18528
|
|
|
18512
18529
|
The body is assembled from discrete section options; supply at minimum --title,
|
|
@@ -18517,11 +18534,7 @@ The body is assembled from discrete section options; supply at minimum --title,
|
|
|
18517
18534
|
--why <why> why the change is needed (rendered as ## Why).
|
|
18518
18535
|
--how <how> optional; how the change works (rendered as ## How). Omit it
|
|
18519
18536
|
unless the approach genuinely needs explaining.
|
|
18520
|
-
|
|
18521
|
-
browse URL is appended inline to ## Why. Unless a Jira key is
|
|
18522
|
-
already known from the session, ask the user whether this PR
|
|
18523
|
-
resolves a Jira issue and for the key before raising; omit
|
|
18524
|
-
--resolves only if they say there isn't one.
|
|
18537
|
+
${resolves}
|
|
18525
18538
|
|
|
18526
18539
|
Wrap symbols, file paths, function names, class names, variable names, config
|
|
18527
18540
|
keys, CLI commands, and flag names in backticks.
|
|
@@ -18562,6 +18575,7 @@ will be rejected.
|
|
|
18562
18575
|
If a pull request already exists for the branch, this command errors \u2014 pass
|
|
18563
18576
|
--force to fully overwrite its title and body, or use 'assist prs edit' to update
|
|
18564
18577
|
only individual sections (every other section of the existing body is preserved).`;
|
|
18578
|
+
}
|
|
18565
18579
|
var TERMINAL_CONFIRM = `Before running this command, the user must see the full proposed title and body \u2014
|
|
18566
18580
|
do not assume they can see your reasoning or earlier tool output. Write the
|
|
18567
18581
|
complete title and body verbatim in your visible reply, then use the
|
|
@@ -18579,10 +18593,11 @@ inline comments to specific spans of the preview; on rejection these are printed
|
|
|
18579
18593
|
as numbered quoted-span + note pairs on stderr. Address every comment (and the
|
|
18580
18594
|
reason), then run the command again to re-preview the revised PR. Repeat until it
|
|
18581
18595
|
is approved. Just compose the sections and run the command.`;
|
|
18582
|
-
function raiseHelpText() {
|
|
18596
|
+
function raiseHelpText(promptJira) {
|
|
18597
|
+
const prompt = promptJira ?? loadConfig().prs?.promptJira ?? false;
|
|
18583
18598
|
const confirm = process.env.ASSIST_SESSION === "1" ? WEB_CONFIRM : TERMINAL_CONFIRM;
|
|
18584
18599
|
return `
|
|
18585
|
-
${
|
|
18600
|
+
${guidance(prompt)}
|
|
18586
18601
|
|
|
18587
18602
|
${confirm}
|
|
18588
18603
|
`;
|