@staff0rd/assist 0.426.1 → 0.428.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/README.md +2 -1
- package/claude/commands/bug.md +12 -2
- package/claude/commands/draft.md +12 -2
- package/claude/commands/prs-slack.md +1 -0
- package/dist/commands/sessions/web/bundle.js +384 -384
- package/dist/index.js +21 -6
- 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.428.0",
|
|
10
10
|
type: "module",
|
|
11
11
|
main: "dist/index.js",
|
|
12
12
|
bin: {
|
|
@@ -6031,7 +6031,7 @@ var backlogCommentSchema = z3.strictObject({
|
|
|
6031
6031
|
timestamp: z3.string(),
|
|
6032
6032
|
type: backlogCommentTypeSchema
|
|
6033
6033
|
});
|
|
6034
|
-
var gitRefKindSchema = z3.enum(["branch", "commit", "pr"]);
|
|
6034
|
+
var gitRefKindSchema = z3.enum(["branch", "commit", "pr", "slack"]);
|
|
6035
6035
|
var gitRefSchema = z3.strictObject({
|
|
6036
6036
|
kind: gitRefKindSchema,
|
|
6037
6037
|
ref: z3.string(),
|
|
@@ -7611,6 +7611,7 @@ function groupActivityRefs(refs, commitLimit = ACTIVITY_COMMIT_LIMIT) {
|
|
|
7611
7611
|
branches: newestFirst("branch"),
|
|
7612
7612
|
commits: commits2.slice(0, commitLimit),
|
|
7613
7613
|
prs: newestFirst("pr"),
|
|
7614
|
+
slacks: newestFirst("slack"),
|
|
7614
7615
|
hiddenCommits: Math.max(0, commits2.length - commitLimit)
|
|
7615
7616
|
};
|
|
7616
7617
|
}
|
|
@@ -7621,10 +7622,11 @@ function printRef(label2, text17, ref) {
|
|
|
7621
7622
|
console.log(` ${chalk50.cyan(label2)} ${text17}${url}`);
|
|
7622
7623
|
}
|
|
7623
7624
|
function printActivity(item) {
|
|
7624
|
-
const { branches, commits: commits2, prs: prs2, hiddenCommits } = groupActivityRefs(
|
|
7625
|
+
const { branches, commits: commits2, prs: prs2, slacks, hiddenCommits } = groupActivityRefs(
|
|
7625
7626
|
item.gitRefs ?? []
|
|
7626
7627
|
);
|
|
7627
|
-
if (branches.length + commits2.length + prs2.length === 0)
|
|
7628
|
+
if (branches.length + commits2.length + prs2.length + slacks.length === 0)
|
|
7629
|
+
return;
|
|
7628
7630
|
console.log(chalk50.bold("Activity"));
|
|
7629
7631
|
for (const branch2 of branches) {
|
|
7630
7632
|
printRef("branch", branch2.ref, branch2);
|
|
@@ -7641,6 +7643,9 @@ function printActivity(item) {
|
|
|
7641
7643
|
const state = pr.state ? ` ${chalk50.dim(`(${pr.state.toLowerCase()})`)}` : "";
|
|
7642
7644
|
printRef("pr", `#${pr.ref}${title}${state}`, pr);
|
|
7643
7645
|
}
|
|
7646
|
+
for (const slack of slacks) {
|
|
7647
|
+
printRef("slack", slack.title ?? slack.ref, slack);
|
|
7648
|
+
}
|
|
7644
7649
|
console.log();
|
|
7645
7650
|
}
|
|
7646
7651
|
|
|
@@ -9763,7 +9768,7 @@ async function addActivity(id, kind, ref, options2) {
|
|
|
9763
9768
|
return;
|
|
9764
9769
|
}
|
|
9765
9770
|
const { orm, item } = found;
|
|
9766
|
-
const url = options2.url ?? (parsedKind.data === "
|
|
9771
|
+
const url = options2.url ?? (parsedKind.data === "branch" || parsedKind.data === "commit" ? gitRefUrl(parsedKind.data, ref) : void 0);
|
|
9767
9772
|
await recordGitRef(orm, item.id, {
|
|
9768
9773
|
kind: parsedKind.data,
|
|
9769
9774
|
ref,
|
|
@@ -9778,11 +9783,21 @@ async function addActivity(id, kind, ref, options2) {
|
|
|
9778
9783
|
);
|
|
9779
9784
|
}
|
|
9780
9785
|
|
|
9786
|
+
// src/commands/backlog/recordSlack.ts
|
|
9787
|
+
async function recordSlack(url, options2) {
|
|
9788
|
+
await recordSessionRefs([
|
|
9789
|
+
{ kind: "slack", ref: url, url, title: options2.title }
|
|
9790
|
+
]);
|
|
9791
|
+
}
|
|
9792
|
+
|
|
9781
9793
|
// src/commands/backlog/registerActivityCommands.ts
|
|
9782
9794
|
function registerActivityCommands(cmd) {
|
|
9783
9795
|
cmd.command("add-activity <id> <kind> <ref>").description(
|
|
9784
|
-
"Attach
|
|
9796
|
+
"Attach an activity ref (branch|commit|pr|slack) to a backlog item"
|
|
9785
9797
|
).option("--title <title>", "Title metadata for the ref").option("--url <url>", "URL metadata (auto-filled for branch/commit)").option("--state <state>", "State metadata for the ref").action(addActivity);
|
|
9798
|
+
cmd.command("record-slack <url>").description(
|
|
9799
|
+
"Attach a Slack thread permalink to the current session's backlog item"
|
|
9800
|
+
).option("--title <title>", "PR title to label the ref with").action(recordSlack);
|
|
9786
9801
|
}
|
|
9787
9802
|
|
|
9788
9803
|
// src/commands/backlog/associate-github/index.ts
|