@staff0rd/assist 0.155.0 → 0.155.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/dist/index.js +41 -36
- 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.155.
|
|
9
|
+
version: "0.155.1",
|
|
10
10
|
type: "module",
|
|
11
11
|
main: "dist/index.js",
|
|
12
12
|
bin: {
|
|
@@ -204,11 +204,40 @@ async function del(id) {
|
|
|
204
204
|
|
|
205
205
|
// src/commands/backlog/done/index.ts
|
|
206
206
|
import chalk3 from "chalk";
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
207
|
+
|
|
208
|
+
// src/commands/backlog/addComment.ts
|
|
209
|
+
function addComment(item, text, phase) {
|
|
210
|
+
const entry = {
|
|
211
|
+
text,
|
|
212
|
+
timestamp: (/* @__PURE__ */ new Date()).toISOString(),
|
|
213
|
+
type: "comment",
|
|
214
|
+
...phase !== void 0 && { phase }
|
|
215
|
+
};
|
|
216
|
+
if (!item.comments) item.comments = [];
|
|
217
|
+
item.comments.push(entry);
|
|
218
|
+
}
|
|
219
|
+
function addPhaseSummary(item, text, phase) {
|
|
220
|
+
const entry = {
|
|
221
|
+
text,
|
|
222
|
+
phase,
|
|
223
|
+
timestamp: (/* @__PURE__ */ new Date()).toISOString(),
|
|
224
|
+
type: "summary"
|
|
225
|
+
};
|
|
226
|
+
if (!item.comments) item.comments = [];
|
|
227
|
+
item.comments.push(entry);
|
|
228
|
+
}
|
|
229
|
+
|
|
230
|
+
// src/commands/backlog/done/index.ts
|
|
231
|
+
async function done(id, summary) {
|
|
232
|
+
const result = loadAndFindItem(id);
|
|
233
|
+
if (!result) return;
|
|
234
|
+
result.item.status = "done";
|
|
235
|
+
if (summary) {
|
|
236
|
+
const phase = result.item.currentPhase ?? 0;
|
|
237
|
+
addPhaseSummary(result.item, summary, phase);
|
|
211
238
|
}
|
|
239
|
+
saveBacklog(result.items);
|
|
240
|
+
console.log(chalk3.green(`Completed item #${id}: ${result.item.name}`));
|
|
212
241
|
}
|
|
213
242
|
|
|
214
243
|
// src/commands/backlog/next.ts
|
|
@@ -334,9 +363,9 @@ function buildReviewPrompt(item, phaseIndex) {
|
|
|
334
363
|
"Wait for the user to confirm before proceeding.",
|
|
335
364
|
"",
|
|
336
365
|
"Once the user confirms:",
|
|
337
|
-
`1. Run: assist backlog done ${item.id}`,
|
|
366
|
+
`1. Run: assist backlog done ${item.id} "<summary>"`,
|
|
338
367
|
"2. Run: /commit",
|
|
339
|
-
`3. Run: assist backlog phase-done ${item.id} ${phaseIndex} "
|
|
368
|
+
`3. Run: assist backlog phase-done ${item.id} ${phaseIndex} "done"`
|
|
340
369
|
].filter((line) => line !== void 0).join("\n");
|
|
341
370
|
}
|
|
342
371
|
|
|
@@ -386,30 +415,6 @@ async function handleIncompletePhase() {
|
|
|
386
415
|
import { writeFileSync as writeFileSync2 } from "fs";
|
|
387
416
|
import { join as join2 } from "path";
|
|
388
417
|
import chalk5 from "chalk";
|
|
389
|
-
|
|
390
|
-
// src/commands/backlog/addComment.ts
|
|
391
|
-
function addComment(item, text, phase) {
|
|
392
|
-
const entry = {
|
|
393
|
-
text,
|
|
394
|
-
timestamp: (/* @__PURE__ */ new Date()).toISOString(),
|
|
395
|
-
type: "comment",
|
|
396
|
-
...phase !== void 0 && { phase }
|
|
397
|
-
};
|
|
398
|
-
if (!item.comments) item.comments = [];
|
|
399
|
-
item.comments.push(entry);
|
|
400
|
-
}
|
|
401
|
-
function addPhaseSummary(item, text, phase) {
|
|
402
|
-
const entry = {
|
|
403
|
-
text,
|
|
404
|
-
phase,
|
|
405
|
-
timestamp: (/* @__PURE__ */ new Date()).toISOString(),
|
|
406
|
-
type: "summary"
|
|
407
|
-
};
|
|
408
|
-
if (!item.comments) item.comments = [];
|
|
409
|
-
item.comments.push(entry);
|
|
410
|
-
}
|
|
411
|
-
|
|
412
|
-
// src/commands/backlog/phaseDone.ts
|
|
413
418
|
var PHASE_STATUS_FILE = ".assist-phase-status.json";
|
|
414
419
|
function getPhaseStatusPath() {
|
|
415
420
|
return join2(process.cwd(), PHASE_STATUS_FILE);
|
|
@@ -426,14 +431,14 @@ function phaseDone(id, phase, summary) {
|
|
|
426
431
|
})
|
|
427
432
|
);
|
|
428
433
|
const result = loadAndFindItem(id);
|
|
429
|
-
if (result) {
|
|
430
|
-
addPhaseSummary(result.item, summary, phaseIndex);
|
|
431
|
-
saveBacklog(result.items);
|
|
432
|
-
}
|
|
433
434
|
if (result?.item.status === "done") {
|
|
434
435
|
console.log(chalk5.dim(`Item #${id} already done, skipping phase advance.`));
|
|
435
436
|
return;
|
|
436
437
|
}
|
|
438
|
+
if (result) {
|
|
439
|
+
addPhaseSummary(result.item, summary, phaseIndex);
|
|
440
|
+
saveBacklog(result.items);
|
|
441
|
+
}
|
|
437
442
|
setCurrentPhase(id, phaseIndex + 1);
|
|
438
443
|
console.log(chalk5.green(`Phase ${phase} of item #${id} marked as complete.`));
|
|
439
444
|
}
|
|
@@ -3398,7 +3403,7 @@ function registerShowCommands(cmd) {
|
|
|
3398
3403
|
}
|
|
3399
3404
|
function registerStatusCommands(cmd) {
|
|
3400
3405
|
cmd.command("start <id>").description("Set a backlog item to in-progress").action(start);
|
|
3401
|
-
cmd.command("done <id>").description("Set a backlog item to done").action(done);
|
|
3406
|
+
cmd.command("done <id> [summary]").description("Set a backlog item to done").action(done);
|
|
3402
3407
|
cmd.command("delete <id>").alias("remove").description("Delete a backlog item").action(del);
|
|
3403
3408
|
}
|
|
3404
3409
|
function registerWebCommand(cmd) {
|