@ravshansbox/pi-next-issue 1.0.7 → 1.0.8
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 +7 -2
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -16,7 +16,7 @@ Run these in pi, inside a git repository:
|
|
|
16
16
|
- `/next-issue stop` stops the run. The issue keeps its saved state, and the next run resumes it.
|
|
17
17
|
- `/next-issue status` shows where the run is.
|
|
18
18
|
|
|
19
|
-
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/3 · 37 tools · 4m12s`. A line above the editor shows the last tool call. A note appears when an issue is merged or needs a human.
|
|
19
|
+
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/3 · 37 tools · 4m12s`. A line above the editor shows the last tool call. In the terminal, both use the dim colour of the theme, like the rest of the footer. A note appears when an issue is merged or needs a human.
|
|
20
20
|
|
|
21
21
|
The run does not belong to a session: it goes on after `/new`, `/resume`, a fork or a reload, and the new session shows it. It stops when you quit pi.
|
|
22
22
|
|
package/index.ts
CHANGED
|
@@ -68,6 +68,7 @@ const launchFromRepo: Launch = async (cwd) => {
|
|
|
68
68
|
export function createExtension(launch: Launch) {
|
|
69
69
|
return (pi: ExtensionAPI) => {
|
|
70
70
|
let ui: ExtensionContext['ui'] | undefined;
|
|
71
|
+
let coloured = false;
|
|
71
72
|
let timer: ReturnType<typeof setInterval> | undefined;
|
|
72
73
|
let unsubscribe: (() => void) | undefined;
|
|
73
74
|
let handled = 0;
|
|
@@ -79,9 +80,11 @@ export function createExtension(launch: Launch) {
|
|
|
79
80
|
return;
|
|
80
81
|
}
|
|
81
82
|
const progress = runner.progress;
|
|
82
|
-
|
|
83
|
+
const theme = ui.theme;
|
|
84
|
+
const dim = (text: string) => (coloured ? theme.fg('dim', text) : text);
|
|
85
|
+
ui.setStatus(STATUS_KEY, dim(formatStatus(progress, Date.now())));
|
|
83
86
|
const active = progress.status === 'running' && progress.lastTool !== undefined;
|
|
84
|
-
ui.setWidget(STATUS_KEY, active ? [`↳ ${progress.lastTool}`] : undefined);
|
|
87
|
+
ui.setWidget(STATUS_KEY, active ? [dim(`↳ ${progress.lastTool}`)] : undefined);
|
|
85
88
|
};
|
|
86
89
|
|
|
87
90
|
const onChange = (progress: Progress) => {
|
|
@@ -128,6 +131,7 @@ export function createExtension(launch: Launch) {
|
|
|
128
131
|
return;
|
|
129
132
|
}
|
|
130
133
|
ui = ctx.ui;
|
|
134
|
+
coloured = ctx.mode === 'tui';
|
|
131
135
|
timer ??= setInterval(render, 1000);
|
|
132
136
|
timer.unref?.();
|
|
133
137
|
const runner = holder().runner;
|
|
@@ -174,6 +178,7 @@ export function createExtension(launch: Launch) {
|
|
|
174
178
|
holder().runner = runner;
|
|
175
179
|
if (ctx.hasUI) {
|
|
176
180
|
ui = ctx.ui;
|
|
181
|
+
coloured = ctx.mode === 'tui';
|
|
177
182
|
follow(runner);
|
|
178
183
|
}
|
|
179
184
|
void runner.run();
|