@trevonistrevon/pi-loop 0.1.5 → 0.1.6

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/dist/ui/widget.js CHANGED
@@ -85,7 +85,8 @@ export class LoopWidget {
85
85
  for (const m of monitors.slice(0, Math.max(0, MAX_VISIBLE - loops.length))) {
86
86
  const icon = "◉";
87
87
  const age = Date.now() - m.startedAt;
88
- lines.push(trunc(` ${icon} #${m.id} ${m.command.slice(0, 40)} ${m.outputLines} lines (${formatDuration(age)})`));
88
+ const label = m.description || m.command.replace(/\n/g, " ").replace(/\s+/g, " ").trim().slice(0, 50);
89
+ lines.push(trunc(` ${icon} #${m.id} ${label} ${m.outputLines} lines (${formatDuration(age)})`));
89
90
  }
90
91
  return lines;
91
92
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@trevonistrevon/pi-loop",
3
- "version": "0.1.5",
3
+ "version": "0.1.6",
4
4
  "description": "A pi extension for cron/event-based agent re-wake loops and background process monitoring.",
5
5
  "author": "trevonistrevon",
6
6
  "license": "MIT",
package/src/ui/widget.ts CHANGED
@@ -106,7 +106,8 @@ export class LoopWidget {
106
106
  for (const m of monitors.slice(0, Math.max(0, MAX_VISIBLE - loops.length))) {
107
107
  const icon = "◉";
108
108
  const age = Date.now() - m.startedAt;
109
- lines.push(trunc(` ${icon} #${m.id} ${m.command.slice(0, 40)} ${m.outputLines} lines (${formatDuration(age)})`));
109
+ const label = m.description || m.command.replace(/\n/g, " ").replace(/\s+/g, " ").trim().slice(0, 50);
110
+ lines.push(trunc(` ${icon} #${m.id} ${label} ${m.outputLines} lines (${formatDuration(age)})`));
110
111
  }
111
112
 
112
113
  return lines;