@deathbeam/pi-delegate 0.0.4 → 0.0.5
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/index.ts +2 -7
- package/package.json +1 -1
package/index.ts
CHANGED
|
@@ -191,7 +191,6 @@ export default function (pi: ExtensionAPI) {
|
|
|
191
191
|
const running = new Map<string, DelegateJob>();
|
|
192
192
|
const recent: InspectJob[] = [];
|
|
193
193
|
let viewing: (() => void) | undefined;
|
|
194
|
-
let finished = 0;
|
|
195
194
|
let ticker: ReturnType<typeof setInterval> | undefined;
|
|
196
195
|
|
|
197
196
|
const addActivity = (job: DelegateJob, activity: ChildActivity) => {
|
|
@@ -226,10 +225,8 @@ export default function (pi: ExtensionAPI) {
|
|
|
226
225
|
const now = Date.now();
|
|
227
226
|
const { shown, hidden, detail } = widgetJobs([...running.values()]);
|
|
228
227
|
const lines: string[] = [];
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
lines.push(`${statusText(theme, "running", now)} ${theme.fg("muted", counts)}`);
|
|
232
|
-
}
|
|
228
|
+
const counts = `${running.size} running · ${running.size + recent.length} total`;
|
|
229
|
+
lines.push(`${statusText(theme, "running", now)} ${theme.fg("muted", counts)}`);
|
|
233
230
|
for (const job of shown) {
|
|
234
231
|
lines.push(
|
|
235
232
|
`${statusText(theme, "running", now)} ${theme.fg("toolTitle", theme.bold(job.agent))} ${theme.fg("muted", jobLine(job, now - job.startedAt))}`,
|
|
@@ -255,7 +252,6 @@ export default function (pi: ExtensionAPI) {
|
|
|
255
252
|
if (job.controller.signal.aborted) return;
|
|
256
253
|
running.delete(job.id);
|
|
257
254
|
remember(job, error ? "failed" : "done", error ? `Error: ${error}` : undefined);
|
|
258
|
-
finished += 1;
|
|
259
255
|
if (running.size === 0) stopTicker();
|
|
260
256
|
refreshWidget(ctx);
|
|
261
257
|
const report: DelegateReport = {
|
|
@@ -284,7 +280,6 @@ export default function (pi: ExtensionAPI) {
|
|
|
284
280
|
running.clear();
|
|
285
281
|
recent.length = 0;
|
|
286
282
|
viewing = undefined;
|
|
287
|
-
finished = 0;
|
|
288
283
|
});
|
|
289
284
|
|
|
290
285
|
pi.on("before_agent_start", (event, ctx) => {
|