@wrongstack/tui 0.309.0 → 0.309.1

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.
@@ -1,3 +1,4 @@
1
+ import { type Theme } from '../theme.js';
1
2
  /**
2
3
  * Subscribes to the module-scoped active theme so a render reads the
3
4
  * current `theme` snapshot. Used by the App shell to force a re-render
@@ -10,5 +11,5 @@
10
11
  * but exposing it lets test code and stat panels introspect the active
11
12
  * palette without re-implementing the listener.
12
13
  */
13
- export declare function useActiveTheme(): import("../theme-types.js").Theme;
14
+ export declare function useActiveTheme(): Theme;
14
15
  //# sourceMappingURL=use-active-theme.d.ts.map
@@ -1,101 +1,104 @@
1
1
  import type { AppProps } from '../app-props.js';
2
- import type { State } from '../app-reducer.js';
3
- import type { AppExecutionPipelineArgs } from './use-app-execution-pipeline.js';
2
+ import type { AppExecutionPipelineArgs, KeyHandlerParams, RunBlocksParams, SubmitParams } from './use-app-execution-pipeline.js';
3
+ type K = KeyHandlerParams;
4
+ type R = RunBlocksParams;
5
+ type S = SubmitParams;
4
6
  export declare function buildAppPipelineArgs(params: {
5
7
  props: AppProps;
6
- state: State;
7
- dispatch: any;
8
- historyScrollRef: any;
9
- runInterruptLadder: any;
10
- enhanceCancelledRef: any;
11
- enhanceAbortRef: any;
12
- enhanceOriginalRef: any;
13
- enhanceEnabledRef: any;
14
- inputGateRef: any;
15
- lastEscAtRef: any;
16
- dismissedEscAtRef: any;
17
- streamingTextRef: any;
18
- streamSegmentsRef: any;
19
- pendingDeltaRef: any;
20
- flushTimerRef: any;
21
- sessionGenerationRef: any;
22
- activeRunGenerationRef: any;
23
- activeRunSettledRef: any;
24
- assistantCommittedThisRunRef: any;
25
- confirmExitRef: any;
26
- chimeRef: any;
27
- activeCtrlRef: any;
28
- clearPendingConfirms: any;
29
- liveDirector: any;
30
- openProjectPicker: any;
31
- loadLiveSessions: any;
32
- openStatuslinePicker: any;
33
- statuslineHiddenItems: any;
34
- lastEnterAtRef: any;
35
- draftRef: any;
36
- setDraft: any;
37
- clearDraft: any;
38
- mouseMode: any;
39
- nativeMouse: any;
40
- termRows: any;
41
- terminalColumns: any;
42
- terminalRows: any;
43
- mainColumnWidth: any;
44
- overlayOpen: any;
45
- effectiveSwarmOnSidebar: any;
46
- sidebarTwinRowCount: any;
47
- statusBarWrapRef: any;
48
- belowStatusBarRef: any;
49
- statusBarClickMapRef: any;
50
- openModelPicker: any;
51
- nextStepsAutoSubmitTimerRef: any;
52
- nextStepsAutoSubmitSuggestionRef: any;
53
- nextStepsAutoSubmitLabel: any;
54
- setNextStepsAutoSubmitCountdown: any;
55
- setNextStepsAutoSubmitLabel: any;
56
- cancelNextStepsCountdown: any;
57
- pasteClipboardText: any;
58
- pasteClipboardImage: any;
59
- onHistoryCopy: any;
60
- tryPickerKey: any;
61
- pasteAccumRef: any;
62
- pasteFlushTimerRef: any;
63
- commitPaste: any;
64
- builderRef: any;
65
- tokenPreviewsRef: any;
66
- interruptsSyncRef: any;
67
- stateRef: any;
68
- runBlocksRef: any;
69
- submitRef: any;
70
- liveModel: any;
71
- liveProvider: any;
72
- activeMaxContext: any;
73
- yoloLive: any;
74
- autonomyLive: any;
75
- liveModeLabel: any;
76
- setMouseMode: any;
77
- setNativeMouse: any;
78
- setLiveModel: any;
79
- setLiveProvider: any;
80
- setActiveMaxContext: any;
81
- setYoloLive: any;
82
- setAutonomyLive: any;
83
- setLiveModeLabel: any;
84
- setLiveToolCount: any;
85
- autoSubmitStreakRef: any;
86
- autoSubmitCapWarnedRef: any;
87
- autoSubmitLoopGuardRef: any;
88
- runEternalLoopRef: any;
89
- runParallelLoopRef: any;
90
- midRunSendPickerRef: any;
91
- openPromptPicker: any;
92
- refreshGoalSummary: any;
93
- exit: any;
94
- setMemoryContextMonitor: any;
95
- runSteerSequence: any;
96
- setEnhanceStartedAt: any;
97
- setEnhanceDurationMs: any;
98
- setRefineProviderId: any;
99
- setRefineModel: any;
8
+ state: K['state'];
9
+ dispatch: K['dispatch'];
10
+ historyScrollRef: K['historyScrollRef'];
11
+ runInterruptLadder: K['runInterruptLadder'];
12
+ enhanceCancelledRef: K['enhanceCancelledRef'];
13
+ enhanceAbortRef: K['enhanceAbortRef'];
14
+ enhanceOriginalRef: S['refs']['enhanceOriginal'];
15
+ enhanceEnabledRef: S['refs']['enhanceEnabled'];
16
+ inputGateRef: K['inputGateRef'];
17
+ lastEscAtRef: K['lastEscAtRef'];
18
+ dismissedEscAtRef: K['dismissedEscAtRef'];
19
+ streamingTextRef: K['streamingTextRef'];
20
+ streamSegmentsRef: R['refs']['streamSegments'];
21
+ pendingDeltaRef: R['refs']['pendingDelta'];
22
+ flushTimerRef: R['refs']['flushTimer'];
23
+ sessionGenerationRef: R['refs']['sessionGeneration'];
24
+ activeRunGenerationRef: R['refs']['activeRunGeneration'];
25
+ activeRunSettledRef: R['refs']['activeRunSettled'];
26
+ assistantCommittedThisRunRef: R['refs']['assistantCommitted'];
27
+ confirmExitRef: K['confirmExitRef'];
28
+ chimeRef: R['refs']['chime'];
29
+ activeCtrlRef: K['activeCtrlRef'];
30
+ clearPendingConfirms: K['clearPendingConfirms'];
31
+ liveDirector: K['liveDirector'];
32
+ openProjectPicker: K['openProjectPicker'];
33
+ loadLiveSessions: K['loadLiveSessions'];
34
+ openStatuslinePicker: K['openStatuslinePicker'];
35
+ statuslineHiddenItems: K['statuslineHiddenItems'];
36
+ lastEnterAtRef: K['lastEnterAtRef'];
37
+ draftRef: K['draftRef'];
38
+ setDraft: K['setDraft'];
39
+ clearDraft: S['actions']['clearDraft'];
40
+ mouseMode: K['mouseMode'];
41
+ nativeMouse: S['live']['nativeMouse'];
42
+ termRows: K['termRows'];
43
+ terminalColumns: K['terminalColumns'];
44
+ terminalRows: K['terminalRows'];
45
+ mainColumnWidth: K['mainColumnWidth'];
46
+ overlayOpen: K['overlayOpen'];
47
+ effectiveSwarmOnSidebar: K['effectiveSwarmOnSidebar'];
48
+ sidebarTwinRowCount: K['sidebarTwinRowCount'];
49
+ statusBarWrapRef: K['statusBarWrapRef'];
50
+ belowStatusBarRef: K['belowStatusBarRef'];
51
+ statusBarClickMapRef: K['statusBarClickMapRef'];
52
+ openModelPicker: K['openModelPicker'];
53
+ nextStepsAutoSubmitTimerRef: K['nextStepsAutoSubmitTimerRef'];
54
+ nextStepsAutoSubmitSuggestionRef: K['nextStepsAutoSubmitSuggestionRef'];
55
+ nextStepsAutoSubmitLabel: K['nextStepsAutoSubmitLabel'];
56
+ setNextStepsAutoSubmitCountdown: K['setNextStepsAutoSubmitCountdown'];
57
+ setNextStepsAutoSubmitLabel: K['setNextStepsAutoSubmitLabel'];
58
+ cancelNextStepsCountdown: K['cancelNextStepsCountdown'];
59
+ pasteClipboardText: K['pasteClipboardText'];
60
+ pasteClipboardImage: K['pasteClipboardImage'];
61
+ onHistoryCopy: K['onHistoryCopy'];
62
+ tryPickerKey: K['tryPickerKey'];
63
+ pasteAccumRef: K['pasteAccumRef'];
64
+ pasteFlushTimerRef: K['pasteFlushTimerRef'];
65
+ commitPaste: K['commitPaste'];
66
+ builderRef: S['refs']['builder'];
67
+ tokenPreviewsRef: S['refs']['tokenPreviews'];
68
+ interruptsSyncRef: R['refs']['interrupts'];
69
+ stateRef: R['refs']['state'];
70
+ runBlocksRef: AppExecutionPipelineArgs['runBlocksRef'];
71
+ submitRef: AppExecutionPipelineArgs['submitRef'];
72
+ liveModel: S['live']['model'];
73
+ liveProvider: S['live']['provider'];
74
+ activeMaxContext: S['live']['maxContext'];
75
+ yoloLive: S['live']['yolo'];
76
+ autonomyLive: S['live']['autonomy'];
77
+ liveModeLabel: S['live']['modeLabel'];
78
+ setMouseMode: S['live']['setMouseMode'];
79
+ setNativeMouse: S['live']['setNativeMouse'];
80
+ setLiveModel: S['live']['setModel'];
81
+ setLiveProvider: S['live']['setProvider'];
82
+ setActiveMaxContext: S['live']['setMaxContext'];
83
+ setYoloLive: S['live']['setYolo'];
84
+ setAutonomyLive: S['live']['setAutonomy'];
85
+ setLiveModeLabel: S['live']['setModeLabel'];
86
+ setLiveToolCount: S['live']['setToolCount'];
87
+ autoSubmitStreakRef: S['refs']['autoSubmitStreak'];
88
+ autoSubmitCapWarnedRef: S['refs']['autoSubmitCapWarned'];
89
+ autoSubmitLoopGuardRef: S['refs']['autoSubmitLoopGuard'];
90
+ runEternalLoopRef: S['refs']['eternalLoop'];
91
+ runParallelLoopRef: S['refs']['parallelLoop'];
92
+ midRunSendPickerRef: S['refs']['midRunSendPicker'];
93
+ openPromptPicker: S['actions']['openPromptPicker'];
94
+ refreshGoalSummary: S['actions']['refreshGoalSummary'];
95
+ exit: S['actions']['exit'];
96
+ setMemoryContextMonitor: S['actions']['setMemoryContextMonitor'];
97
+ runSteerSequence: S['actions']['runSteerSequence'];
98
+ setEnhanceStartedAt: S['actions']['setEnhanceStartedAt'];
99
+ setEnhanceDurationMs: S['actions']['setEnhanceDuration'];
100
+ setRefineProviderId: S['actions']['setRefineProvider'];
101
+ setRefineModel: S['actions']['setRefineModel'];
100
102
  }): AppExecutionPipelineArgs;
103
+ export {};
101
104
  //# sourceMappingURL=use-app-pipeline-builders.d.ts.map
package/dist/index.js CHANGED
@@ -1429,31 +1429,27 @@ function softColor(color) {
1429
1429
  function getActiveTheme() {
1430
1430
  return theme;
1431
1431
  }
1432
+ function isThemeName(name) {
1433
+ return name in themePresets;
1434
+ }
1432
1435
  function setActiveTheme(name) {
1433
- let applied = currentPresetName;
1434
- const preset = name ? themePresets[name] : void 0;
1435
- if (preset && name in themePresets) {
1436
- applied = name;
1437
- }
1438
- if (!preset) {
1439
- return applied;
1440
- }
1441
- const t = theme;
1442
- const p = preset;
1443
- for (const k of Object.keys(t)) {
1444
- if (!(k in p)) delete t[k];
1436
+ if (name === void 0 || !isThemeName(name)) {
1437
+ return currentPresetName;
1445
1438
  }
1446
- for (const k of Object.keys(p)) {
1447
- t[k] = p[k];
1439
+ const preset = themePresets[name];
1440
+ const mutable = theme;
1441
+ for (const key of Object.keys(theme)) {
1442
+ if (!(key in preset)) delete mutable[key];
1448
1443
  }
1449
- currentPresetName = applied;
1444
+ Object.assign(theme, preset);
1445
+ currentPresetName = name;
1450
1446
  for (const cb of themeSubscribers) {
1451
1447
  try {
1452
- cb(applied);
1448
+ cb(name);
1453
1449
  } catch {
1454
1450
  }
1455
1451
  }
1456
- return applied;
1452
+ return name;
1457
1453
  }
1458
1454
  var themeSubscribers = /* @__PURE__ */ new Set();
1459
1455
  function subscribeToTheme(cb) {
package/dist/theme.d.ts CHANGED
@@ -1,4 +1,4 @@
1
- import type { SyntaxPalette, SyntaxRole, Theme, ThemeName } from './theme-types.js';
1
+ import type { SyntaxPalette, SyntaxRole, Theme, ThemeListener, ThemeName } from './theme-types.js';
2
2
  export { baseTheme, THEME_OPTIONS, themePickerOptions, themePresets } from './theme-presets.js';
3
3
  export type { SyntaxPalette, SyntaxRole, Theme, ThemeName, ThemePickerOption, } from './theme-types.js';
4
4
  export { catppuccin, detectSupportsBackground, mixHexColors, pastel, SYNTAX_TOKEN, } from './theme-utils.js';
@@ -30,7 +30,6 @@ export declare function resolveSyntaxPalette(palette?: Theme): SyntaxPalette;
30
30
  export declare function softColor(color?: string): string | undefined;
31
31
  export declare function getActiveTheme(): Theme;
32
32
  export declare function setActiveTheme(name: string | undefined): ThemeName;
33
- type ThemeListener = (name: ThemeName) => void;
34
33
  export declare function subscribeToTheme(cb: ThemeListener): () => void;
35
34
  export declare function getActiveThemeName(): ThemeName;
36
35
  //# sourceMappingURL=theme.d.ts.map
@@ -21,7 +21,7 @@ export interface RunBlocksCapabilities {
21
21
  agent: Agent;
22
22
  tokenCounter?: TokenCounter | undefined;
23
23
  supportsVision?: (() => boolean | Promise<boolean>) | undefined;
24
- visionAdapters: VisionAdapters;
24
+ visionAdapters?: VisionAdapters | undefined;
25
25
  onSDDOutput?: ((output: string) => Promise<string[]>) | undefined;
26
26
  onSuggestionsParsed?: ((finalText: string) => void) | undefined;
27
27
  predictNext?: ((input: {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@wrongstack/tui",
3
- "version": "0.309.0",
3
+ "version": "0.309.1",
4
4
  "license": "MIT",
5
5
  "description": "WrongStack terminal UI: Ink-based interactive renderer with history, pickers, and slash menus.",
6
6
  "repository": {
@@ -29,12 +29,12 @@
29
29
  "ink": "7.1.1",
30
30
  "react": "^19.2.8",
31
31
  "string-width": "8.2.2",
32
- "@wrongstack/kanban": "0.309.0",
33
- "@wrongstack/sdd": "0.309.0",
34
- "@wrongstack/core": "0.309.0",
35
- "@wrongstack/runtime": "0.309.0",
36
- "@wrongstack/sage": "0.309.0",
37
- "@wrongstack/tools": "0.309.0"
32
+ "@wrongstack/core": "0.309.1",
33
+ "@wrongstack/sage": "0.309.1",
34
+ "@wrongstack/runtime": "0.309.1",
35
+ "@wrongstack/kanban": "0.309.1",
36
+ "@wrongstack/sdd": "0.309.1",
37
+ "@wrongstack/tools": "0.309.1"
38
38
  },
39
39
  "devDependencies": {
40
40
  "@testing-library/dom": "^10.4.1",