@staff0rd/assist 0.614.0 → 0.615.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 +282 -282
- package/dist/index.js +24 -15
- 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.615.0",
|
|
10
10
|
type: "module",
|
|
11
11
|
main: "dist/index.js",
|
|
12
12
|
bin: {
|
|
@@ -21762,6 +21762,16 @@ function collectLabels(value, previous) {
|
|
|
21762
21762
|
return [...previous, ...added];
|
|
21763
21763
|
}
|
|
21764
21764
|
|
|
21765
|
+
// src/commands/prs/appendScreenshots.ts
|
|
21766
|
+
function appendScreenshots(body, screenshots) {
|
|
21767
|
+
if (screenshots.length === 0) return body;
|
|
21768
|
+
return `${body}
|
|
21769
|
+
|
|
21770
|
+
## Screenshots
|
|
21771
|
+
|
|
21772
|
+
${screenshots.join("\n\n")}`;
|
|
21773
|
+
}
|
|
21774
|
+
|
|
21765
21775
|
// src/commands/github/issue/addIssueToProject.ts
|
|
21766
21776
|
var MUTATION3 = `mutation($projectId: ID!, $contentId: ID!) {
|
|
21767
21777
|
addProjectV2ItemById(input: { projectId: $projectId, contentId: $contentId }) {
|
|
@@ -22179,8 +22189,8 @@ function resolveCreateIssueMetadata(options2) {
|
|
|
22179
22189
|
import { randomUUID as randomUUID8 } from "crypto";
|
|
22180
22190
|
async function reviewProposedIssue(title, body, metadata2 = []) {
|
|
22181
22191
|
const sessionId = process.env.ASSIST_SESSION_ID;
|
|
22182
|
-
if (process.env.ASSIST_SESSION !== "1" || !sessionId) return;
|
|
22183
|
-
await awaitPreviewApproval("GitHub issue preview", {
|
|
22192
|
+
if (process.env.ASSIST_SESSION !== "1" || !sessionId) return void 0;
|
|
22193
|
+
return await awaitPreviewApproval("GitHub issue preview", {
|
|
22184
22194
|
sessionId,
|
|
22185
22195
|
requestId: randomUUID8(),
|
|
22186
22196
|
title,
|
|
@@ -22229,8 +22239,17 @@ async function createIssue(options2) {
|
|
|
22229
22239
|
body
|
|
22230
22240
|
);
|
|
22231
22241
|
const resolved = preflight(options2);
|
|
22232
|
-
await reviewProposedIssue(
|
|
22233
|
-
|
|
22242
|
+
const decision = await reviewProposedIssue(
|
|
22243
|
+
title,
|
|
22244
|
+
body,
|
|
22245
|
+
issuePreviewMetadata(resolved)
|
|
22246
|
+
);
|
|
22247
|
+
const output = runGhIssueCreate(
|
|
22248
|
+
title,
|
|
22249
|
+
appendScreenshots(body, decision?.screenshots ?? []),
|
|
22250
|
+
options2.repo,
|
|
22251
|
+
resolved?.labels
|
|
22252
|
+
);
|
|
22234
22253
|
console.log(output.trim());
|
|
22235
22254
|
if (resolved) applyCreatedIssueMetadata(output, resolved);
|
|
22236
22255
|
}
|
|
@@ -25178,16 +25197,6 @@ async function comment2(path90, line, body, startLine) {
|
|
|
25178
25197
|
// src/commands/prs/edit.ts
|
|
25179
25198
|
import { randomUUID as randomUUID14 } from "crypto";
|
|
25180
25199
|
|
|
25181
|
-
// src/commands/prs/appendScreenshots.ts
|
|
25182
|
-
function appendScreenshots(body, screenshots) {
|
|
25183
|
-
if (screenshots.length === 0) return body;
|
|
25184
|
-
return `${body}
|
|
25185
|
-
|
|
25186
|
-
## Screenshots
|
|
25187
|
-
|
|
25188
|
-
${screenshots.join("\n\n")}`;
|
|
25189
|
-
}
|
|
25190
|
-
|
|
25191
25200
|
// src/commands/prs/applyEdit.ts
|
|
25192
25201
|
import { execFileSync as execFileSync13 } from "child_process";
|
|
25193
25202
|
function applyEdit(number, title, body) {
|