@wrongstack/tui 0.9.0 → 0.9.4
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/index.d.ts +16 -0
- package/dist/index.js +7 -10
- package/dist/index.js.map +1 -1
- package/package.json +4 -4
package/dist/index.d.ts
CHANGED
|
@@ -210,6 +210,22 @@ interface RunTuiOptions {
|
|
|
210
210
|
* PhaseMonitor and PhasePanel live views via dispatch actions.
|
|
211
211
|
*/
|
|
212
212
|
subscribeAutoPhase?: (handler: (event: string, payload: unknown) => void) => () => void;
|
|
213
|
+
/**
|
|
214
|
+
* Read the persisted autonomy settings (defaultMode, autoProceedDelayMs).
|
|
215
|
+
* Used by the SettingsPicker in the TUI on mount and after Ctrl+S toggle.
|
|
216
|
+
*/
|
|
217
|
+
getSettings?: () => {
|
|
218
|
+
mode: 'off' | 'suggest' | 'auto';
|
|
219
|
+
delayMs: number;
|
|
220
|
+
};
|
|
221
|
+
/**
|
|
222
|
+
* Persist autonomy settings changes. Returns null on success, or an
|
|
223
|
+
* error string on failure (so the TUI can display it as a hint).
|
|
224
|
+
*/
|
|
225
|
+
saveSettings?: (s: {
|
|
226
|
+
mode: 'off' | 'suggest' | 'auto';
|
|
227
|
+
delayMs: number;
|
|
228
|
+
}) => string | null | Promise<string | null>;
|
|
213
229
|
}
|
|
214
230
|
declare function runTui(opts: RunTuiOptions): Promise<number>;
|
|
215
231
|
|
package/dist/index.js
CHANGED
|
@@ -215,7 +215,8 @@ function StatusBar({
|
|
|
215
215
|
processCount,
|
|
216
216
|
hiddenItems,
|
|
217
217
|
eternalStage,
|
|
218
|
-
goalSummary
|
|
218
|
+
goalSummary,
|
|
219
|
+
autoProceedCountdown
|
|
219
220
|
}) {
|
|
220
221
|
const hiddenSet = new Set(hiddenItems);
|
|
221
222
|
const usage = tokenCounter?.total();
|
|
@@ -5989,11 +5990,6 @@ function fmtTok3(n) {
|
|
|
5989
5990
|
// src/terminal-title.ts
|
|
5990
5991
|
var SPINNER = ["\u280B", "\u2819", "\u2839", "\u2838", "\u283C", "\u2834", "\u2826", "\u2827", "\u2807", "\u280F"];
|
|
5991
5992
|
var setTitle = (s2) => `\x1B]0;${s2}\x07`;
|
|
5992
|
-
function shortModel(model) {
|
|
5993
|
-
if (!model) return "";
|
|
5994
|
-
const base = model.split("/").pop() ?? model;
|
|
5995
|
-
return base.replace(/-\d{8}$/, "").replace(/\[.*?\]$/, "");
|
|
5996
|
-
}
|
|
5997
5993
|
function marquee(text, offset, width) {
|
|
5998
5994
|
const padded = `${text} `;
|
|
5999
5995
|
const start = offset % padded.length;
|
|
@@ -6006,9 +6002,8 @@ function startTerminalTitle(opts) {
|
|
|
6006
6002
|
};
|
|
6007
6003
|
}
|
|
6008
6004
|
const app = opts.appName ?? "WrongStack";
|
|
6009
|
-
const model = shortModel(opts.model);
|
|
6010
6005
|
const idleAfter = opts.idleAfterMs ?? 3500;
|
|
6011
|
-
const suffix =
|
|
6006
|
+
const suffix = ` \xB7 ${app}`;
|
|
6012
6007
|
let frame = 0;
|
|
6013
6008
|
let scroll = 0;
|
|
6014
6009
|
let phase = "idle";
|
|
@@ -6051,7 +6046,7 @@ function startTerminalTitle(opts) {
|
|
|
6051
6046
|
return () => {
|
|
6052
6047
|
clearInterval(timer);
|
|
6053
6048
|
for (const off of offs) off();
|
|
6054
|
-
write(setTitle(
|
|
6049
|
+
write(setTitle(app));
|
|
6055
6050
|
};
|
|
6056
6051
|
}
|
|
6057
6052
|
|
|
@@ -6176,7 +6171,9 @@ async function runTui(opts) {
|
|
|
6176
6171
|
getSDDContext: opts.getSDDContext,
|
|
6177
6172
|
onSDDOutput: opts.onSDDOutput,
|
|
6178
6173
|
sessionsDir: opts.sessionsDir,
|
|
6179
|
-
projectRoot: opts.projectRoot
|
|
6174
|
+
projectRoot: opts.projectRoot,
|
|
6175
|
+
getSettings: opts.getSettings,
|
|
6176
|
+
saveSettings: opts.saveSettings
|
|
6180
6177
|
}),
|
|
6181
6178
|
{ exitOnCtrlC: false }
|
|
6182
6179
|
);
|