@ravshansbox/pi-next-issue 2.4.1 → 2.4.3
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/index.ts +9 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -14,7 +14,7 @@ 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
|
|
|
17
|
-
The footer shows the issue, the stage, the number of tool calls and the time spent on the issue, for example `next-issue #12 · review 1 · 37 tools · 4m12s`. 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.
|
|
17
|
+
The footer shows the issue, the stage, the number of tool calls and the time spent on the issue, for example `next-issue #12 · review 1 · 37 tools · 4m12s`. 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.
|
|
18
18
|
|
|
19
19
|
## Worker
|
|
20
20
|
|
package/index.ts
CHANGED
|
@@ -94,6 +94,7 @@ export function createExtension(options: Options) {
|
|
|
94
94
|
let unsubscribe: (() => void) | undefined;
|
|
95
95
|
let handled = 0;
|
|
96
96
|
let status: Progress['status'] | undefined;
|
|
97
|
+
let baseline = false;
|
|
97
98
|
|
|
98
99
|
const current = (): Progress | undefined =>
|
|
99
100
|
root === undefined ? undefined : shared(options.client).runs[root];
|
|
@@ -135,7 +136,13 @@ export function createExtension(options: Options) {
|
|
|
135
136
|
};
|
|
136
137
|
|
|
137
138
|
const onEvent = (event: WorkerEvent) => {
|
|
138
|
-
if (event.type === 'runs') {
|
|
139
|
+
if (event.type === 'runs' && baseline) {
|
|
140
|
+
baseline = false;
|
|
141
|
+
const progress = root === undefined ? undefined : event.runs[root];
|
|
142
|
+
handled = progress?.handled.length ?? 0;
|
|
143
|
+
status = progress?.status;
|
|
144
|
+
render();
|
|
145
|
+
} else if (event.type === 'runs') {
|
|
139
146
|
onProgress(root === undefined ? undefined : event.runs[root]);
|
|
140
147
|
} else if (event.root === root) {
|
|
141
148
|
ui?.notify(`next-issue cannot start: ${event.message}`, 'error');
|
|
@@ -147,6 +154,7 @@ export function createExtension(options: Options) {
|
|
|
147
154
|
const progress = current();
|
|
148
155
|
handled = progress?.handled.length ?? 0;
|
|
149
156
|
status = progress?.status;
|
|
157
|
+
baseline = !shared(options.client).connected;
|
|
150
158
|
unsubscribe = shared(options.client).subscribe(onEvent);
|
|
151
159
|
render();
|
|
152
160
|
};
|