@staff0rd/assist 0.726.0 → 0.727.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 -1
- package/dist/commands/sessions/web/bundle.js +434 -433
- package/dist/index.js +35 -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.727.1",
|
|
10
10
|
type: "module",
|
|
11
11
|
main: "dist/index.js",
|
|
12
12
|
bin: {
|
|
@@ -13699,6 +13699,32 @@ function ghJson(cwd, args) {
|
|
|
13699
13699
|
return result;
|
|
13700
13700
|
}
|
|
13701
13701
|
|
|
13702
|
+
// src/commands/sessions/web/next/fetchAssignedIssues.ts
|
|
13703
|
+
async function fetchAssignedIssues(cwd) {
|
|
13704
|
+
const issues = await ghJson(cwd, [
|
|
13705
|
+
"issue",
|
|
13706
|
+
"list",
|
|
13707
|
+
"--assignee",
|
|
13708
|
+
"@me",
|
|
13709
|
+
"--state",
|
|
13710
|
+
"open",
|
|
13711
|
+
"--limit",
|
|
13712
|
+
"100",
|
|
13713
|
+
"--json",
|
|
13714
|
+
"number,title,url,createdAt,author,labels"
|
|
13715
|
+
]);
|
|
13716
|
+
return issues.map((issue) => ({
|
|
13717
|
+
number: issue.number,
|
|
13718
|
+
title: issue.title,
|
|
13719
|
+
url: issue.url,
|
|
13720
|
+
createdAt: issue.createdAt,
|
|
13721
|
+
author: issue.author?.login ?? "unknown",
|
|
13722
|
+
labels: (issue.labels ?? []).flatMap(
|
|
13723
|
+
(label2) => label2.name ? [label2.name] : []
|
|
13724
|
+
)
|
|
13725
|
+
})).sort((a, b) => a.createdAt.localeCompare(b.createdAt));
|
|
13726
|
+
}
|
|
13727
|
+
|
|
13702
13728
|
// src/commands/sessions/web/next/peerPrsQuery.ts
|
|
13703
13729
|
var peerPrsQuery = `query($owner: String!, $name: String!) {
|
|
13704
13730
|
viewer { login }
|
|
@@ -13833,9 +13859,11 @@ async function nextItems(req, res) {
|
|
|
13833
13859
|
const cwd = getCwdParam(req, res);
|
|
13834
13860
|
if (!cwd) return;
|
|
13835
13861
|
const peers = loadConfigFrom(cwd).next?.peers ?? [];
|
|
13836
|
-
const
|
|
13837
|
-
|
|
13838
|
-
|
|
13862
|
+
const [peerPrs, assignedIssues] = await Promise.all([
|
|
13863
|
+
section(() => fetchPeerPrs(cwd, peers)),
|
|
13864
|
+
section(() => fetchAssignedIssues(cwd))
|
|
13865
|
+
]);
|
|
13866
|
+
const body = { peerPrs, assignedIssues };
|
|
13839
13867
|
respondJson(res, 200, body);
|
|
13840
13868
|
}
|
|
13841
13869
|
|
|
@@ -43189,9 +43217,10 @@ function killedByDaemonRestart(interrupted) {
|
|
|
43189
43217
|
|
|
43190
43218
|
// src/commands/sessions/daemon/restoreResumePlan.ts
|
|
43191
43219
|
function restoreResumePlan(persisted, idle) {
|
|
43192
|
-
if (!killedByDaemonRestart(persisted.interrupted)) return { idle };
|
|
43193
43220
|
const tasks = interruptedBackgroundTasks(persisted);
|
|
43194
|
-
if (
|
|
43221
|
+
if (tasks.length > 0)
|
|
43222
|
+
return { prompt: daemonRestartPrompt(tasks), idle: false };
|
|
43223
|
+
if (!killedByDaemonRestart(persisted.interrupted) || idle) return { idle };
|
|
43195
43224
|
return { prompt: daemonRestartPrompt(tasks), idle: false };
|
|
43196
43225
|
}
|
|
43197
43226
|
function resumePrompt(plan2) {
|