@wrongstack/tui 0.250.0 → 0.256.0
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 +28 -9
- package/dist/index.js +280 -42
- package/dist/index.js.map +1 -1
- package/package.json +6 -5
package/dist/index.d.ts
CHANGED
|
@@ -153,6 +153,8 @@ type Settings = {
|
|
|
153
153
|
featureMemory: boolean;
|
|
154
154
|
featureSkills: boolean;
|
|
155
155
|
featureModelsRegistry: boolean;
|
|
156
|
+
/** Token-saving mode: omits non-essential tools and trims system prompt. */
|
|
157
|
+
featureTokenSaving: boolean;
|
|
156
158
|
contextAutoCompact: boolean;
|
|
157
159
|
contextStrategy: 'hybrid' | 'intelligent' | 'selective';
|
|
158
160
|
logLevel: 'error' | 'warn' | 'info' | 'debug' | 'trace';
|
|
@@ -269,6 +271,10 @@ interface RunTuiOptions {
|
|
|
269
271
|
confirmExit?: boolean | undefined;
|
|
270
272
|
/** Active agent mode label shown in the status bar (e.g. "teach", "brief"). */
|
|
271
273
|
modeLabel?: string | undefined;
|
|
274
|
+
/** Token-saving mode indicator — shown in the TUI status bar. */
|
|
275
|
+
tokenSavingMode?: boolean | undefined;
|
|
276
|
+
/** Number of registered tools — shown on the status bar line 2. */
|
|
277
|
+
toolCount?: number | undefined;
|
|
272
278
|
/** Live getter for the agent mode label so the status bar updates after /mode. */
|
|
273
279
|
getModeLabel?: (() => string) | undefined;
|
|
274
280
|
/**
|
|
@@ -322,6 +328,13 @@ interface RunTuiOptions {
|
|
|
322
328
|
enabled: boolean;
|
|
323
329
|
setEnabled: (enabled: boolean) => void;
|
|
324
330
|
} | undefined;
|
|
331
|
+
/**
|
|
332
|
+
* Controller for the `/interrupt` slash command. The App installs the real
|
|
333
|
+
* `abortLeader` on mount so the command can abort the in-flight leader run.
|
|
334
|
+
*/
|
|
335
|
+
interruptController?: {
|
|
336
|
+
abortLeader: () => boolean;
|
|
337
|
+
} | undefined;
|
|
325
338
|
/**
|
|
326
339
|
* Controller for the `/enhance on|off` prompt-refinement toggle. The App
|
|
327
340
|
* installs a dispatch-backed `setEnabled` here on mount so the slash command
|
|
@@ -338,8 +351,8 @@ interface RunTuiOptions {
|
|
|
338
351
|
* visible bar without a round-trip. The initial value is loaded from
|
|
339
352
|
* the config file before App mounts.
|
|
340
353
|
*/
|
|
341
|
-
statuslineHiddenItems: Array<'todos' | 'plan' | 'fleet' | 'git' | 'elapsed' | 'context' | 'cost'>;
|
|
342
|
-
setStatuslineHiddenItems: (items: Array<'todos' | 'plan' | 'fleet' | 'git' | 'elapsed' | 'context' | 'cost'>) => void;
|
|
354
|
+
statuslineHiddenItems: Array<'todos' | 'plan' | 'tasks' | 'fleet' | 'git' | 'elapsed' | 'context' | 'cost' | 'working_dir'>;
|
|
355
|
+
setStatuslineHiddenItems: (items: Array<'todos' | 'plan' | 'tasks' | 'fleet' | 'git' | 'elapsed' | 'context' | 'cost' | 'working_dir'>) => void;
|
|
343
356
|
/**
|
|
344
357
|
* Controller for the agents monitor overlay. App installs a dispatch-backed
|
|
345
358
|
* setter on mount so the `/agents on|off` slash command can toggle the
|
|
@@ -541,16 +554,22 @@ declare function replaySessionEvents(events: SessionEvent[], startId: number): H
|
|
|
541
554
|
* Unified next-steps suggestion parser.
|
|
542
555
|
*
|
|
543
556
|
* Three code paths feed into the suggestion store:
|
|
544
|
-
* 1. TUI rendering — entry.tsx parses "💡 Next steps" from assistant output
|
|
545
|
-
* 2. REPL store — repl.ts parses "💡 Next steps" from final agent output
|
|
557
|
+
* 1. TUI rendering — entry.tsx parses "💡 Next steps" or "<next_steps>" from assistant output
|
|
558
|
+
* 2. REPL store — repl.ts parses "💡 Next steps" or "<next_steps>" from final agent output
|
|
546
559
|
* 3. /suggest output — suggest.ts parses LLM-generated numbered lists
|
|
547
560
|
*
|
|
548
561
|
* Heading mode (`requireHeading = true`):
|
|
549
|
-
* strict=true — only 💡 emoji heading (TUI rendering)
|
|
550
|
-
* strict=false — 💡, ##, plain "Next steps" headings (REPL store)
|
|
562
|
+
* strict=true — only 💡 emoji heading or <next_steps> tag (TUI rendering)
|
|
563
|
+
* strict=false — 💡, ##, plain "Next steps", or <next_steps> headings (REPL store)
|
|
551
564
|
*
|
|
552
565
|
* Raw mode (`requireHeading = false`):
|
|
553
566
|
* Parses numbered/bullet items from anywhere in text (subagent /suggest output).
|
|
567
|
+
*
|
|
568
|
+
* Supported formats:
|
|
569
|
+
* 💡 Next steps (old emoji format)
|
|
570
|
+
* ## Next steps (markdown heading)
|
|
571
|
+
* Next steps (plain text)
|
|
572
|
+
* <next_steps> (new XML tag format - preferred)
|
|
554
573
|
*/
|
|
555
574
|
interface ParsedNextStep {
|
|
556
575
|
index: number;
|
|
@@ -562,16 +581,16 @@ interface ParseNextStepsResult {
|
|
|
562
581
|
/** Flat string array — what gets stored in the suggestion store. */
|
|
563
582
|
texts: string[];
|
|
564
583
|
/**
|
|
565
|
-
* Content with the entire "💡 Next steps" block removed.
|
|
584
|
+
* Content with the entire "💡 Next steps" or "<next_steps>" block removed.
|
|
566
585
|
* Used by entry.tsx to strip suggestions from the rendered message body.
|
|
567
586
|
*/
|
|
568
587
|
stripped: string;
|
|
569
588
|
}
|
|
570
589
|
/**
|
|
571
|
-
* Parse "💡 Next steps" blocks from assistant output (or raw numbered lines).
|
|
590
|
+
* Parse "<next_steps>" or "💡 Next steps" blocks from assistant output (or raw numbered lines).
|
|
572
591
|
*
|
|
573
592
|
* @param content — raw assistant message text or subagent output
|
|
574
|
-
* @param strict — when true,
|
|
593
|
+
* @param strict — when true, accepts 💡 emoji heading OR <next_steps> XML tag (TUI rendering).
|
|
575
594
|
* when false, also accepts ## / plain "Next steps" headings (REPL store).
|
|
576
595
|
* @param requireHeading — when true, a heading must precede the item list.
|
|
577
596
|
* when false, numbered/bullet items are parsed from anywhere in text
|