@ravshansbox/pi-next-issue 2.17.0 → 2.19.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 +3 -3
- package/index.ts +10 -9
- package/package.json +1 -1
- package/skills/create-issue/SKILL.md +1 -1
- package/src/worker.ts +1 -0
package/README.md
CHANGED
|
@@ -14,9 +14,9 @@ Run this in pi, inside a git repository:
|
|
|
14
14
|
|
|
15
15
|
- `/next-issue` starts a run of this repository when none is going, and stops the run when one is going. A stop takes effect after the current round, and the issue keeps its saved state, so the next run resumes it.
|
|
16
16
|
- The `next_issue_start` tool lets the model start a run. When no run is going, it starts a run like `/next-issue`. When a run is going, it starts nothing and reports the current run, which picks up new issues by itself. It never stops a run, and it does not ask for confirmation. Its result says whether it started a run.
|
|
17
|
-
- The `next_issue_status` tool lets the model see the run of this repository. It returns the footer line, then one line per handled issue with its outcome, for example `#190 done`. When the worker has no run of this repository, it returns `
|
|
17
|
+
- The `next_issue_status` tool lets the model see the run of this repository. It returns the footer line, then one line per handled issue with its outcome, for example `#190 done`. When the worker has no run of this repository, it returns `no run of <root>`. When no worker is going, it returns `no worker is running` and does not start one. It reports no other repository.
|
|
18
18
|
|
|
19
|
-
The footer shows each running issue with its stage, the number of tool calls and the time spent on it, for example
|
|
19
|
+
The footer shows each running issue with the number of open issues at the latest fetch, its stage, the number of tool calls and the time spent on it, for example `#12/7 · review 2/5 · 37 tools · 4m12s | #13/7 · implement · 5 tools · 40s`. The open count includes the running issues and issues the run skips. A stage with a limited number of rounds shows the round and its limit: `review 2/5`, `review fix 2/5`, `checks fix 1/5` or `commit fix 1/10`. Other lines read, for example, `looking for issues`, `finished: 2 done` or `stopped: 1 done, 1 needs a human`. After a run ends, it keeps the last summary. In the terminal, it uses the dim colour of the theme, like the rest of the footer. A note appears when an issue is done, needs a human or fails while pi is open. Pi does not repeat the notes of a run that ended before it opened.
|
|
20
20
|
|
|
21
21
|
## Answer questions
|
|
22
22
|
|
|
@@ -32,7 +32,7 @@ Press Escape, or leave the guidance empty, to stop. Pi reads the list again befo
|
|
|
32
32
|
|
|
33
33
|
## Create an issue
|
|
34
34
|
|
|
35
|
-
The package ships the `create-issue` skill. Ask pi to write an issue, or run `/skill:create-issue <problem>`. Pi then:
|
|
35
|
+
The package ships the `create-issue` skill. Ask pi to write an issue, ask for a change in a repository with `next-issue.config.json`, or run `/skill:create-issue <problem>`. Pi then:
|
|
36
36
|
|
|
37
37
|
1. restates the problem, reads the code when the problem touches it, and finds the open issues that must be done first;
|
|
38
38
|
2. asks numbered questions until none is open;
|
package/index.ts
CHANGED
|
@@ -72,27 +72,28 @@ export function formatStatus(progress: Progress, now: number): string {
|
|
|
72
72
|
switch (progress.status) {
|
|
73
73
|
case 'running': {
|
|
74
74
|
if (running.length === 0) {
|
|
75
|
-
return '
|
|
75
|
+
return 'looking for issues';
|
|
76
76
|
}
|
|
77
|
+
const count = progress.open === undefined ? '' : `/${progress.open}`;
|
|
77
78
|
const lines = running.map((item) => {
|
|
78
|
-
const parts = [`#${item.issue}`, item.stage ?? 'prepare', `${item.tools} tools`];
|
|
79
|
+
const parts = [`#${item.issue}${count}`, item.stage ?? 'prepare', `${item.tools} tools`];
|
|
79
80
|
if (item.startedAt !== undefined) {
|
|
80
81
|
parts.push(duration(now - item.startedAt));
|
|
81
82
|
}
|
|
82
83
|
return parts.join(' · ');
|
|
83
84
|
});
|
|
84
|
-
return
|
|
85
|
+
return lines.join(' | ');
|
|
85
86
|
}
|
|
86
87
|
case 'stopping': {
|
|
87
88
|
const issues = running.map((item) => `#${item.issue}`);
|
|
88
|
-
return
|
|
89
|
+
return `${issues.length === 0 ? '#?' : issues.join(' ')} · stopping`;
|
|
89
90
|
}
|
|
90
91
|
case 'stopped':
|
|
91
|
-
return `
|
|
92
|
+
return `stopped: ${outcomes(progress)}`;
|
|
92
93
|
case 'finished':
|
|
93
|
-
return `
|
|
94
|
+
return `finished: ${outcomes(progress)}`;
|
|
94
95
|
case 'failed':
|
|
95
|
-
return `
|
|
96
|
+
return `failed: ${progress.error ?? 'unknown error'}`;
|
|
96
97
|
}
|
|
97
98
|
}
|
|
98
99
|
|
|
@@ -354,11 +355,11 @@ export function createExtension(options: Options) {
|
|
|
354
355
|
const client = shared(options.client);
|
|
355
356
|
await client.attach();
|
|
356
357
|
if (!client.connected) {
|
|
357
|
-
return report('
|
|
358
|
+
return report('no worker is running', root);
|
|
358
359
|
}
|
|
359
360
|
const progress = client.runs[root];
|
|
360
361
|
if (progress === undefined) {
|
|
361
|
-
return report(`
|
|
362
|
+
return report(`no run of ${root}`, root);
|
|
362
363
|
}
|
|
363
364
|
const lines = [
|
|
364
365
|
formatStatus(progress, Date.now()),
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: create-issue
|
|
3
|
-
description: Turn a problem into a clear GitHub issue that the next-issue worker can claim. Use when the user wants to write, file or create an issue.
|
|
3
|
+
description: Turn a problem into a clear GitHub issue that the next-issue worker can claim. Use when the user wants to write, file or create an issue, or asks for a change to the code of a repository that has `next-issue.config.json`.
|
|
4
4
|
---
|
|
5
5
|
|
|
6
6
|
# Create an issue
|