gsd-pi 2.28.0-dev.e19bf89 → 2.29.0-dev.49d972f
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/cli.js +15 -9
- package/dist/resource-loader.js +80 -8
- package/dist/resources/extensions/gsd/auto-post-unit.ts +9 -4
- package/dist/resources/extensions/gsd/auto-recovery.ts +33 -23
- package/dist/resources/extensions/gsd/auto-start.ts +25 -10
- package/dist/resources/extensions/gsd/auto-verification.ts +41 -7
- package/dist/resources/extensions/gsd/auto-worktree-sync.ts +21 -6
- package/dist/resources/extensions/gsd/auto.ts +67 -22
- package/dist/resources/extensions/gsd/commands-handlers.ts +3 -11
- package/dist/resources/extensions/gsd/commands-logs.ts +536 -0
- package/dist/resources/extensions/gsd/commands-prefs-wizard.ts +46 -33
- package/dist/resources/extensions/gsd/commands.ts +22 -28
- package/dist/resources/extensions/gsd/dashboard-overlay.ts +2 -1
- package/dist/resources/extensions/gsd/doctor-types.ts +13 -0
- package/dist/resources/extensions/gsd/doctor.ts +2 -6
- package/dist/resources/extensions/gsd/export.ts +28 -2
- package/dist/resources/extensions/gsd/gsd-db.ts +19 -0
- package/dist/resources/extensions/gsd/index.ts +2 -1
- package/dist/resources/extensions/gsd/json-persistence.ts +67 -0
- package/dist/resources/extensions/gsd/metrics.ts +17 -31
- package/dist/resources/extensions/gsd/paths.ts +0 -8
- package/dist/resources/extensions/gsd/queue-order.ts +10 -11
- package/dist/resources/extensions/gsd/routing-history.ts +13 -17
- package/dist/resources/extensions/gsd/session-lock.ts +284 -0
- package/dist/resources/extensions/gsd/session-status-io.ts +23 -41
- package/dist/resources/extensions/gsd/tests/auto-budget-alerts.test.ts +1 -1
- package/dist/resources/extensions/gsd/tests/auto-skip-loop.test.ts +1 -1
- package/dist/resources/extensions/gsd/tests/commands-logs.test.ts +241 -0
- package/dist/resources/extensions/gsd/tests/gsd-inspect.test.ts +1 -1
- package/dist/resources/extensions/gsd/tests/parallel-workers-multi-milestone-e2e.test.ts +1 -1
- package/dist/resources/extensions/gsd/tests/session-lock.test.ts +315 -0
- package/dist/resources/extensions/gsd/tests/validate-milestone.test.ts +55 -0
- package/dist/resources/extensions/gsd/tests/verification-evidence.test.ts +26 -24
- package/dist/resources/extensions/gsd/tests/verification-gate.test.ts +136 -7
- package/dist/resources/extensions/gsd/types.ts +1 -0
- package/dist/resources/extensions/gsd/unit-runtime.ts +16 -13
- package/dist/resources/extensions/gsd/verification-evidence.ts +2 -0
- package/dist/resources/extensions/gsd/verification-gate.ts +13 -2
- package/dist/resources/extensions/remote-questions/discord-adapter.ts +9 -20
- package/dist/resources/extensions/remote-questions/http-client.ts +76 -0
- package/dist/resources/extensions/remote-questions/notify.ts +1 -2
- package/dist/resources/extensions/remote-questions/slack-adapter.ts +11 -18
- package/dist/resources/extensions/remote-questions/telegram-adapter.ts +8 -20
- package/dist/resources/extensions/remote-questions/types.ts +3 -0
- package/dist/resources/extensions/shared/mod.ts +3 -0
- package/package.json +6 -3
- package/packages/pi-coding-agent/dist/core/settings-manager.d.ts +3 -0
- package/packages/pi-coding-agent/dist/core/settings-manager.d.ts.map +1 -1
- package/packages/pi-coding-agent/dist/core/settings-manager.js +8 -0
- package/packages/pi-coding-agent/dist/core/settings-manager.js.map +1 -1
- package/packages/pi-coding-agent/dist/core/system-prompt.d.ts.map +1 -1
- package/packages/pi-coding-agent/dist/core/system-prompt.js +10 -0
- package/packages/pi-coding-agent/dist/core/system-prompt.js.map +1 -1
- package/packages/pi-coding-agent/dist/modes/interactive/interactive-mode.d.ts.map +1 -1
- package/packages/pi-coding-agent/dist/modes/interactive/interactive-mode.js +4 -1
- package/packages/pi-coding-agent/dist/modes/interactive/interactive-mode.js.map +1 -1
- package/packages/pi-coding-agent/package.json +1 -1
- package/packages/pi-coding-agent/scripts/copy-assets.cjs +39 -8
- package/packages/pi-coding-agent/src/core/settings-manager.ts +11 -0
- package/packages/pi-coding-agent/src/core/system-prompt.ts +11 -0
- package/packages/pi-coding-agent/src/modes/interactive/interactive-mode.ts +4 -1
- package/packages/pi-tui/dist/autocomplete.d.ts +3 -0
- package/packages/pi-tui/dist/autocomplete.d.ts.map +1 -1
- package/packages/pi-tui/dist/autocomplete.js +14 -0
- package/packages/pi-tui/dist/autocomplete.js.map +1 -1
- package/packages/pi-tui/src/autocomplete.ts +19 -1
- package/pkg/package.json +1 -1
- package/src/resources/extensions/gsd/auto-post-unit.ts +9 -4
- package/src/resources/extensions/gsd/auto-recovery.ts +33 -23
- package/src/resources/extensions/gsd/auto-start.ts +25 -10
- package/src/resources/extensions/gsd/auto-verification.ts +41 -7
- package/src/resources/extensions/gsd/auto-worktree-sync.ts +21 -6
- package/src/resources/extensions/gsd/auto.ts +67 -22
- package/src/resources/extensions/gsd/commands-handlers.ts +3 -11
- package/src/resources/extensions/gsd/commands-logs.ts +536 -0
- package/src/resources/extensions/gsd/commands-prefs-wizard.ts +46 -33
- package/src/resources/extensions/gsd/commands.ts +22 -28
- package/src/resources/extensions/gsd/dashboard-overlay.ts +2 -1
- package/src/resources/extensions/gsd/doctor-types.ts +13 -0
- package/src/resources/extensions/gsd/doctor.ts +2 -6
- package/src/resources/extensions/gsd/export.ts +28 -2
- package/src/resources/extensions/gsd/gsd-db.ts +19 -0
- package/src/resources/extensions/gsd/index.ts +2 -1
- package/src/resources/extensions/gsd/json-persistence.ts +67 -0
- package/src/resources/extensions/gsd/metrics.ts +17 -31
- package/src/resources/extensions/gsd/paths.ts +0 -8
- package/src/resources/extensions/gsd/queue-order.ts +10 -11
- package/src/resources/extensions/gsd/routing-history.ts +13 -17
- package/src/resources/extensions/gsd/session-lock.ts +284 -0
- package/src/resources/extensions/gsd/session-status-io.ts +23 -41
- package/src/resources/extensions/gsd/tests/auto-budget-alerts.test.ts +1 -1
- package/src/resources/extensions/gsd/tests/auto-skip-loop.test.ts +1 -1
- package/src/resources/extensions/gsd/tests/commands-logs.test.ts +241 -0
- package/src/resources/extensions/gsd/tests/gsd-inspect.test.ts +1 -1
- package/src/resources/extensions/gsd/tests/parallel-workers-multi-milestone-e2e.test.ts +1 -1
- package/src/resources/extensions/gsd/tests/session-lock.test.ts +315 -0
- package/src/resources/extensions/gsd/tests/validate-milestone.test.ts +55 -0
- package/src/resources/extensions/gsd/tests/verification-evidence.test.ts +26 -24
- package/src/resources/extensions/gsd/tests/verification-gate.test.ts +136 -7
- package/src/resources/extensions/gsd/types.ts +1 -0
- package/src/resources/extensions/gsd/unit-runtime.ts +16 -13
- package/src/resources/extensions/gsd/verification-evidence.ts +2 -0
- package/src/resources/extensions/gsd/verification-gate.ts +13 -2
- package/src/resources/extensions/remote-questions/discord-adapter.ts +9 -20
- package/src/resources/extensions/remote-questions/http-client.ts +76 -0
- package/src/resources/extensions/remote-questions/notify.ts +1 -2
- package/src/resources/extensions/remote-questions/slack-adapter.ts +11 -18
- package/src/resources/extensions/remote-questions/telegram-adapter.ts +8 -20
- package/src/resources/extensions/remote-questions/types.ts +3 -0
- package/src/resources/extensions/shared/mod.ts +3 -0
- package/dist/resources/extensions/gsd/preferences-hooks.ts +0 -10
- package/dist/resources/extensions/shared/progress-widget.ts +0 -282
- package/dist/resources/extensions/shared/thinking-widget.ts +0 -107
- package/src/resources/extensions/gsd/preferences-hooks.ts +0 -10
- package/src/resources/extensions/shared/progress-widget.ts +0 -282
- package/src/resources/extensions/shared/thinking-widget.ts +0 -107
|
@@ -1,107 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Shared thinking/spinner widget.
|
|
3
|
-
*
|
|
4
|
-
* Shows an animated spinner with a label and an optional live-preview of
|
|
5
|
-
* streamed text (e.g. LLM output) while a background operation is running.
|
|
6
|
-
*
|
|
7
|
-
* Usage:
|
|
8
|
-
*
|
|
9
|
-
* import { showThinkingWidget } from "./shared/thinking-widget.js";
|
|
10
|
-
*
|
|
11
|
-
* const widget = showThinkingWidget("Generating questions…", ctx);
|
|
12
|
-
*
|
|
13
|
-
* // Optionally stream partial text into the preview line:
|
|
14
|
-
* widget.setText(partialLlmOutput);
|
|
15
|
-
*
|
|
16
|
-
* // Always dispose when done — removes the widget from the UI:
|
|
17
|
-
* widget.dispose();
|
|
18
|
-
*
|
|
19
|
-
* Each call gets a unique widget key derived from a monotonic counter, so
|
|
20
|
-
* multiple widgets can safely coexist without key collisions.
|
|
21
|
-
*/
|
|
22
|
-
|
|
23
|
-
import type { ExtensionCommandContext } from "@gsd/pi-coding-agent";
|
|
24
|
-
import { type Theme } from "@gsd/pi-coding-agent";
|
|
25
|
-
import { truncateToWidth, type TUI } from "@gsd/pi-tui";
|
|
26
|
-
|
|
27
|
-
// ─── Public API ───────────────────────────────────────────────────────────────
|
|
28
|
-
|
|
29
|
-
export interface ThinkingWidget {
|
|
30
|
-
/**
|
|
31
|
-
* Update the streamed-text preview line.
|
|
32
|
-
* Pass the full accumulated text — the widget trims and previews the tail.
|
|
33
|
-
*/
|
|
34
|
-
setText(text: string): void;
|
|
35
|
-
/** Remove the widget from the UI. Always call this when the operation completes. */
|
|
36
|
-
dispose(): void;
|
|
37
|
-
}
|
|
38
|
-
|
|
39
|
-
// ─── Internal constants ───────────────────────────────────────────────────────
|
|
40
|
-
|
|
41
|
-
const SPINNER_FRAMES = ["⠋", "⠙", "⠹", "⠸", "⠼", "⠴", "⠦", "⠧", "⠇", "⠏"] as const;
|
|
42
|
-
const SPINNER_INTERVAL_MS = 80;
|
|
43
|
-
const PREVIEW_MAX_CHARS = 120;
|
|
44
|
-
|
|
45
|
-
let widgetCounter = 0;
|
|
46
|
-
|
|
47
|
-
// ─── Implementation ───────────────────────────────────────────────────────────
|
|
48
|
-
|
|
49
|
-
/**
|
|
50
|
-
* Show an animated thinking spinner as a TUI widget.
|
|
51
|
-
*
|
|
52
|
-
* @param label Short description of what is happening, e.g. "Writing PROJECT.md…"
|
|
53
|
-
* @param ctx Extension command context
|
|
54
|
-
* @returns Handle with setText() and dispose()
|
|
55
|
-
*/
|
|
56
|
-
export function showThinkingWidget(label: string, ctx: ExtensionCommandContext): ThinkingWidget {
|
|
57
|
-
const widgetKey = `thinking-widget-${++widgetCounter}`;
|
|
58
|
-
|
|
59
|
-
let streamedText = "";
|
|
60
|
-
let widgetRef: { invalidate: () => void; requestRender: () => void } | null = null;
|
|
61
|
-
|
|
62
|
-
ctx.ui.setWidget(widgetKey, (tui: TUI, theme: Theme) => {
|
|
63
|
-
let frame = 0;
|
|
64
|
-
let cachedLines: string[] | undefined;
|
|
65
|
-
|
|
66
|
-
const interval = setInterval(() => {
|
|
67
|
-
frame = (frame + 1) % SPINNER_FRAMES.length;
|
|
68
|
-
cachedLines = undefined;
|
|
69
|
-
tui.requestRender();
|
|
70
|
-
}, SPINNER_INTERVAL_MS);
|
|
71
|
-
|
|
72
|
-
widgetRef = {
|
|
73
|
-
invalidate: () => { cachedLines = undefined; },
|
|
74
|
-
requestRender: () => tui.requestRender(),
|
|
75
|
-
};
|
|
76
|
-
|
|
77
|
-
return {
|
|
78
|
-
render(width: number): string[] {
|
|
79
|
-
if (cachedLines) return cachedLines;
|
|
80
|
-
const spinner = theme.fg("accent", SPINNER_FRAMES[frame]);
|
|
81
|
-
const lines: string[] = [];
|
|
82
|
-
lines.push(truncateToWidth(` ${spinner} ${theme.fg("muted", label)}`, width));
|
|
83
|
-
if (streamedText) {
|
|
84
|
-
const preview = streamedText.replace(/\s+/g, " ").trim().slice(-PREVIEW_MAX_CHARS);
|
|
85
|
-
lines.push(truncateToWidth(` ${theme.fg("dim", preview)}`, width));
|
|
86
|
-
}
|
|
87
|
-
cachedLines = lines;
|
|
88
|
-
return lines;
|
|
89
|
-
},
|
|
90
|
-
invalidate() { cachedLines = undefined; },
|
|
91
|
-
dispose() { clearInterval(interval); },
|
|
92
|
-
};
|
|
93
|
-
});
|
|
94
|
-
|
|
95
|
-
return {
|
|
96
|
-
setText(text: string) {
|
|
97
|
-
streamedText = text;
|
|
98
|
-
if (widgetRef) {
|
|
99
|
-
widgetRef.invalidate();
|
|
100
|
-
widgetRef.requestRender();
|
|
101
|
-
}
|
|
102
|
-
},
|
|
103
|
-
dispose() {
|
|
104
|
-
ctx.ui.setWidget(widgetKey, undefined);
|
|
105
|
-
},
|
|
106
|
-
};
|
|
107
|
-
}
|