@wrongstack/tui 1.0.24 → 1.0.27
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/app-action-type.d.ts +68 -1
- package/dist/app-panel-state.d.ts +49 -0
- package/dist/app-props.d.ts +20 -0
- package/dist/app-reducer.d.ts +1 -1
- package/dist/app-settings-type.d.ts +1 -0
- package/dist/app-state-core-types.d.ts +13 -0
- package/dist/app-view-contract.d.ts +1 -1
- package/dist/background-strip-model.d.ts +65 -0
- package/dist/brain-panel-model.d.ts +7 -7
- package/dist/chat-search-slash.d.ts +15 -0
- package/dist/clipboard.d.ts +14 -1
- package/dist/components/background-strip.d.ts +20 -0
- package/dist/components/chat-search-bar.d.ts +19 -0
- package/dist/components/checkpoint-timeline.d.ts +6 -2
- package/dist/components/history/code-block.d.ts +2 -136
- package/dist/components/history/diff-model.d.ts +143 -0
- package/dist/components/history/scroll-controller-types.d.ts +11 -0
- package/dist/components/history/scrollbar-rail.d.ts +14 -2
- package/dist/components/history/use-history-controller.d.ts +5 -0
- package/dist/components/monitor-shell.d.ts +5 -1
- package/dist/components/phase-monitor.d.ts +3 -1
- package/dist/components/prompt-picker-model.d.ts +16 -0
- package/dist/components/prompt-picker.d.ts +2 -16
- package/dist/components/resource-menu-model.d.ts +3 -0
- package/dist/components/resource-menu.d.ts +3 -3
- package/dist/components/scrollable-history.d.ts +1 -1
- package/dist/components/send-mode-model.d.ts +44 -0
- package/dist/components/send-mode-picker.d.ts +2 -43
- package/dist/components/settings-picker.d.ts +2 -1
- package/dist/components/sidebar-panel-agents.d.ts +10 -0
- package/dist/components/sidebar-panel-connections.d.ts +11 -0
- package/dist/components/sidebar-panel-coordinator.d.ts +11 -0
- package/dist/components/sidebar-panel-fleet.d.ts +16 -0
- package/dist/components/sidebar-panel-project.d.ts +12 -0
- package/dist/components/sidebar-panel-worktree.d.ts +10 -0
- package/dist/components/sidebar-panel-wrong-proxy.d.ts +25 -0
- package/dist/components/sidebar-panels-workspace.d.ts +10 -79
- package/dist/components/status-bar-rails-async.d.ts +2 -2
- package/dist/components/status-bar-types.d.ts +19 -0
- package/dist/components/status-bar.d.ts +1 -1
- package/dist/components/statusline-picker-model.d.ts +45 -0
- package/dist/components/statusline-picker.d.ts +2 -41
- package/dist/components/theme-picker.d.ts +19 -7
- package/dist/connections-health.d.ts +1 -0
- package/dist/connections-slash.d.ts +2 -2
- package/dist/hit-test.d.ts +2 -2
- package/dist/hooks/failed-run-tracker.d.ts +30 -0
- package/dist/hooks/fork-at-checkpoint.d.ts +25 -0
- package/dist/hooks/tui-slash-command-options.d.ts +9 -0
- package/dist/hooks/use-app-execution-pipeline.d.ts +1 -1
- package/dist/hooks/use-app-picker-keys.d.ts +5 -2
- package/dist/hooks/use-chip-staleness-guard.d.ts +6 -0
- package/dist/hooks/use-core-tui-commands.d.ts +7 -2
- package/dist/hooks/use-file-search.d.ts +10 -0
- package/dist/hooks/use-mcp-status-bridge.d.ts +18 -0
- package/dist/hooks/use-next-steps-auto-submit.d.ts +4 -2
- package/dist/hooks/use-picker-keys-brain-statusline.d.ts +4 -0
- package/dist/hooks/use-picker-keys-types.d.ts +5 -0
- package/dist/hooks/use-provider-quota.d.ts +5 -0
- package/dist/hooks/use-provider-warmup.d.ts +9 -0
- package/dist/hooks/use-queue-manager.d.ts +11 -1
- package/dist/hooks/use-session-rewind.d.ts +8 -1
- package/dist/hooks/use-slash-picker.d.ts +1 -1
- package/dist/hooks/use-stable-key-handler.d.ts +8 -1
- package/dist/hooks/use-status-sync-interval.d.ts +3 -2
- package/dist/hooks/use-theme-picker-handler.d.ts +7 -2
- package/dist/hooks/use-tui-environment-state.d.ts +3 -0
- package/dist/hooks/use-tui-event-bridge.d.ts +12 -0
- package/dist/hooks/use-tui-slash-commands.d.ts +1 -1
- package/dist/index.js +23899 -21785
- package/dist/ink.d.ts +1 -1
- package/dist/input-validation/action-types.d.ts +1 -1
- package/dist/input-validation/limits.d.ts +2 -0
- package/dist/input-validation-display.d.ts +9 -0
- package/dist/input-validation.d.ts +0 -52
- package/dist/key-routes/key-route-background-strip.d.ts +14 -0
- package/dist/key-routes/key-route-chat-search.d.ts +24 -0
- package/dist/layout-store.d.ts +2 -2
- package/dist/memory-slash-render.d.ts +1 -1
- package/dist/message-checkpoint.d.ts +19 -0
- package/dist/motion.d.ts +16 -0
- package/dist/reducers/chat-search.d.ts +11 -0
- package/dist/reducers/composer-action-types.d.ts +6 -0
- package/dist/reducers/composer-pickers.d.ts +4 -0
- package/dist/reducers/composer.d.ts +1 -5
- package/dist/reducers/message-jump.d.ts +16 -0
- package/dist/reducers/workspace-panels.d.ts +1 -1
- package/dist/resume-session-tree.d.ts +8 -0
- package/dist/rewind-prompt.d.ts +24 -0
- package/dist/run-tui-options.d.ts +23 -4
- package/dist/scroll-anchor.d.ts +6 -0
- package/dist/settings-contracts.d.ts +1 -0
- package/dist/submit-controller.d.ts +1 -1
- package/dist/submit-slash-command.d.ts +67 -0
- package/dist/theme-picker-rows.d.ts +70 -0
- package/dist/theme-presets/options.d.ts +13 -1
- package/dist/theme-presets/rose-pine.d.ts +1 -1
- package/dist/theme-types.d.ts +6 -0
- package/dist/theme-utils.d.ts +11 -0
- package/dist/transcript-search.d.ts +38 -0
- package/dist/ui-contracts.d.ts +1 -1
- package/dist/use-app-controller.d.ts +1 -1
- package/dist/use-controller-key-pipeline.d.ts +218 -0
- package/package.json +7 -7
|
@@ -102,6 +102,19 @@ export interface StatusBarProps {
|
|
|
102
102
|
* for callers that pass a combined string).
|
|
103
103
|
*/
|
|
104
104
|
provider?: string | undefined;
|
|
105
|
+
/**
|
|
106
|
+
* Active reasoning-effort level (e.g. "high"), rendered as a suffix INSIDE
|
|
107
|
+
* the model chip (`provider/model · high`) rather than as a chip of its own:
|
|
108
|
+
* it qualifies the model, so the density ladder sheds it with the model at
|
|
109
|
+
* overflow instead of spending a separate statusline slot on it. Shown at
|
|
110
|
+
* the `full` and `short` density levels; `micro` drops it so the bottom rung
|
|
111
|
+
* stays strictly narrower than the one above it. NOT rendered in minimum
|
|
112
|
+
* mode — see `buildMinimumChips` for why that rail omits the qualifier.
|
|
113
|
+
*
|
|
114
|
+
* Omitted when the host has no effort to report — the chip then renders
|
|
115
|
+
* byte-for-byte as it did before, so legacy callers and tests are unaffected.
|
|
116
|
+
*/
|
|
117
|
+
effort?: string | undefined;
|
|
105
118
|
/**
|
|
106
119
|
* App version string (e.g. "0.7.0"). Rendered as a right-anchored version
|
|
107
120
|
* chip on the status bar (line 1, and the minimum-mode rail) so it stays
|
|
@@ -125,6 +138,12 @@ export interface StatusBarProps {
|
|
|
125
138
|
* orange update notice on the status bar.
|
|
126
139
|
*/
|
|
127
140
|
updateAvailable?: boolean | undefined;
|
|
141
|
+
/**
|
|
142
|
+
* A newer standalone build downloaded and waiting to be swapped in when
|
|
143
|
+
* the session exits. Replaces the "(update v…)" suffix, since there is
|
|
144
|
+
* nothing left to run: a restart picks it up.
|
|
145
|
+
*/
|
|
146
|
+
updateReadyVersion?: string | undefined;
|
|
128
147
|
state: 'idle' | 'running' | 'streaming' | 'aborting';
|
|
129
148
|
/** Single word rendered in the rainbow working-state chip. */
|
|
130
149
|
thinkingWord?: string | undefined;
|
|
@@ -22,5 +22,5 @@ export type { BrainStatusChip, ContextWindow, FleetAgentDetail, FleetCounts, Mai
|
|
|
22
22
|
* the rendered entries themselves, so an empty rail never renders and a
|
|
23
23
|
* vanilla session keeps its two-line footprint.
|
|
24
24
|
*/
|
|
25
|
-
export declare const StatusBar: React.MemoExoticComponent<({ model, provider, version, latestVersion, updateAvailable, state, thinkingWord, thinkingAnimationStyle, tokenCounter, hint, queueCount, yolo, autonomy, fleetWorkingTime, todos, plan, tasks, fleet, fleetAgents, git, subagentCount, brain, projectName, workingDir, processCount, context, estimatedContextTokens, Sage, memoryContextMonitor, contextStrategy, hiddenItems, statuslineLines, statuslineDensities, statuslineOrder, mode, events, sessionId, eternalStage, goalSummary, droppedTools, indexState, breakerCountdown, modeLabel, promptVariant, themeName, debugStreamStats, enhanceCountdown, nextStepsAutoSubmitCountdown, nextStepsAutoSubmitLabel, autoProceedCountdown, sessionCount, mailbox, tokenSavingMode, toolCount, visibleChips, sideEffectCount, maxWidth, clickMapRef, }: StatusBarProps) => React.ReactElement>;
|
|
25
|
+
export declare const StatusBar: React.MemoExoticComponent<({ model, provider, effort, version, latestVersion, updateAvailable, updateReadyVersion, state, thinkingWord, thinkingAnimationStyle, tokenCounter, hint, queueCount, yolo, autonomy, fleetWorkingTime, todos, plan, tasks, fleet, fleetAgents, git, subagentCount, brain, projectName, workingDir, processCount, context, estimatedContextTokens, Sage, memoryContextMonitor, contextStrategy, hiddenItems, statuslineLines, statuslineDensities, statuslineOrder, mode, events, sessionId, eternalStage, goalSummary, droppedTools, indexState, breakerCountdown, modeLabel, promptVariant, themeName, debugStreamStats, enhanceCountdown, nextStepsAutoSubmitCountdown, nextStepsAutoSubmitLabel, autoProceedCountdown, sessionCount, mailbox, tokenSavingMode, toolCount, visibleChips, sideEffectCount, maxWidth, clickMapRef, }: StatusBarProps) => React.ReactElement>;
|
|
26
26
|
//# sourceMappingURL=status-bar.d.ts.map
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
import { CHIP_DESCRIPTIONS, DEFAULT_LINES, STATUSLINE_FIELD_COUNT, STATUSLINE_ITEMS, type StatuslineDensity, type StatuslineItem, type StatuslineLines, type StatuslineOrder } from '@wrongstack/core/statusline';
|
|
2
|
+
import type { ChipMeta } from '../ui-contracts.js';
|
|
3
|
+
export type { StatuslineItem };
|
|
4
|
+
export { CHIP_DESCRIPTIONS, DEFAULT_LINES, DEFAULT_LINES as ITEM_LINE, STATUSLINE_FIELD_COUNT, STATUSLINE_ITEMS, };
|
|
5
|
+
/**
|
|
6
|
+
* Chips the composer's top rail already renders, so the status bar suppresses
|
|
7
|
+
* them to avoid a double display. They stay in `STATUSLINE_ITEMS` (the mouse
|
|
8
|
+
* hit-test indexes by position) and stay togglable — the picker just labels
|
|
9
|
+
* them so their "on" state doesn't read as a lie.
|
|
10
|
+
*/
|
|
11
|
+
export declare const COMPOSER_OWNED_CHIPS: StatuslineItem[];
|
|
12
|
+
/**
|
|
13
|
+
* Metadata for a temporarily-visible chip (one that appeared due to data,
|
|
14
|
+
* not user toggle). Tracked so the chip can auto-expire.
|
|
15
|
+
*
|
|
16
|
+
* Declared in the `ui-contracts` leaf and re-exported here under the picker's
|
|
17
|
+
* historical name: `status-bar-types.ts` needs the type, and owning it in a
|
|
18
|
+
* `.tsx` view module put the contracts leaf and the view in one type cycle.
|
|
19
|
+
*/
|
|
20
|
+
export type { ChipMeta };
|
|
21
|
+
/** Default expiration for stream-triggered chips (5 minutes). */
|
|
22
|
+
export declare const STREAM_CHIP_EXPIRES_IN_MINUTES = 5;
|
|
23
|
+
/**
|
|
24
|
+
* Returns true if a chip with the given metadata has expired.
|
|
25
|
+
* Chips with no `expiresIn` never expire on their own.
|
|
26
|
+
*/
|
|
27
|
+
export declare function isChipExpired(meta: ChipMeta, now?: number): boolean;
|
|
28
|
+
/**
|
|
29
|
+
* Returns a human-readable countdown label for a chip with expiration.
|
|
30
|
+
* Returns null if the chip has no expiration or has already expired.
|
|
31
|
+
*/
|
|
32
|
+
export declare function getExpiresInLabel(meta: ChipMeta, now?: number): string | null;
|
|
33
|
+
/** Stream-triggered chips — these auto-expire unless toggled on permanently. */
|
|
34
|
+
export declare const STREAM_CHIP_KEYS: StatuslineItem[];
|
|
35
|
+
/** Next density in the cycle: auto → full → short → micro → auto. */
|
|
36
|
+
export declare function nextDensity(current: StatuslineDensity, delta?: number): StatuslineDensity;
|
|
37
|
+
/**
|
|
38
|
+
* Whether `item` survives the picker's text filter. Matches the chip key and
|
|
39
|
+
* its description so "cost" finds `cost` and "cache" finds the cache chip by
|
|
40
|
+
* either its name or its blurb.
|
|
41
|
+
*/
|
|
42
|
+
export declare function matchesFilter(item: StatuslineItem, filter: string): boolean;
|
|
43
|
+
/** Shared visual/keyboard order: effective line groups, then saved order within each line. */
|
|
44
|
+
export declare function navigableFields(filter: string, order?: StatuslineOrder, lines?: StatuslineLines): number[];
|
|
45
|
+
//# sourceMappingURL=statusline-picker-model.d.ts.map
|
|
@@ -1,47 +1,8 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { type StatuslineDensities, type StatuslineItem, type StatuslineLine, type StatuslineLines, type StatuslineOrder } from '@wrongstack/core/statusline';
|
|
2
2
|
import type React from 'react';
|
|
3
3
|
import type { ChipMeta } from '../ui-contracts.js';
|
|
4
4
|
import type { StatusBarClickMap } from './status-bar-types.js';
|
|
5
|
-
export
|
|
6
|
-
export { CHIP_DESCRIPTIONS, DEFAULT_LINES, DEFAULT_LINES as ITEM_LINE, STATUSLINE_FIELD_COUNT, STATUSLINE_ITEMS, };
|
|
7
|
-
/**
|
|
8
|
-
* Chips the composer's top rail already renders, so the status bar suppresses
|
|
9
|
-
* them to avoid a double display. They stay in `STATUSLINE_ITEMS` (the mouse
|
|
10
|
-
* hit-test indexes by position) and stay togglable — the picker just labels
|
|
11
|
-
* them so their "on" state doesn't read as a lie.
|
|
12
|
-
*/
|
|
13
|
-
export declare const COMPOSER_OWNED_CHIPS: StatuslineItem[];
|
|
14
|
-
/**
|
|
15
|
-
* Metadata for a temporarily-visible chip (one that appeared due to data,
|
|
16
|
-
* not user toggle). Tracked so the chip can auto-expire.
|
|
17
|
-
*
|
|
18
|
-
* Declared in the `ui-contracts` leaf and re-exported here under the picker's
|
|
19
|
-
* historical name: `status-bar-types.ts` needs the type, and owning it in a
|
|
20
|
-
* `.tsx` view module put the contracts leaf and the view in one type cycle.
|
|
21
|
-
*/
|
|
22
|
-
export type { ChipMeta };
|
|
23
|
-
/** Default expiration for stream-triggered chips (5 minutes). */
|
|
24
|
-
export declare const STREAM_CHIP_EXPIRES_IN_MINUTES = 5;
|
|
25
|
-
/**
|
|
26
|
-
* Returns true if a chip with the given metadata has expired.
|
|
27
|
-
* Chips with no `expiresIn` never expire on their own.
|
|
28
|
-
*/
|
|
29
|
-
export declare function isChipExpired(meta: ChipMeta, now?: number): boolean;
|
|
30
|
-
/**
|
|
31
|
-
* Returns a human-readable countdown label for a chip with expiration.
|
|
32
|
-
* Returns null if the chip has no expiration or has already expired.
|
|
33
|
-
*/
|
|
34
|
-
export declare function getExpiresInLabel(meta: ChipMeta, now?: number): string | null;
|
|
35
|
-
/** Next density in the cycle: auto → full → short → micro → auto. */
|
|
36
|
-
export declare function nextDensity(current: StatuslineDensity, delta?: number): StatuslineDensity;
|
|
37
|
-
/**
|
|
38
|
-
* Whether `item` survives the picker's text filter. Matches the chip key and
|
|
39
|
-
* its description so "cost" finds `cost` and "cache" finds the cache chip by
|
|
40
|
-
* either its name or its blurb.
|
|
41
|
-
*/
|
|
42
|
-
export declare function matchesFilter(item: StatuslineItem, filter: string): boolean;
|
|
43
|
-
/** Shared visual/keyboard order: effective line groups, then saved order within each line. */
|
|
44
|
-
export declare function navigableFields(filter: string, order?: StatuslineOrder, lines?: StatuslineLines): number[];
|
|
5
|
+
export * from './statusline-picker-model.js';
|
|
45
6
|
interface StatuslinePickerProps {
|
|
46
7
|
/** Focused field index into STATUSLINE_ITEMS. */
|
|
47
8
|
field: number;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type React from 'react';
|
|
2
|
-
import type
|
|
2
|
+
import { type ThemeName, type ThemePickerOption } from '../theme.js';
|
|
3
3
|
interface ThemePickerProps {
|
|
4
4
|
options: readonly ThemePickerOption[];
|
|
5
5
|
selected: number;
|
|
@@ -22,6 +22,8 @@ interface ThemePickerProps {
|
|
|
22
22
|
* budget is too small for it to be useful.
|
|
23
23
|
*/
|
|
24
24
|
maxRows?: number | undefined;
|
|
25
|
+
/** Type-to-filter query. An empty string renders the full catalogue. */
|
|
26
|
+
filter?: string | undefined;
|
|
25
27
|
}
|
|
26
28
|
/**
|
|
27
29
|
* Interactive theme picker. Mirrors the autonomy-picker visual pattern
|
|
@@ -30,17 +32,27 @@ interface ThemePickerProps {
|
|
|
30
32
|
* highlighted with a `[active]` marker so the user can see whether
|
|
31
33
|
* their selection will actually change anything.
|
|
32
34
|
*
|
|
33
|
-
*
|
|
34
|
-
* usable on small terminals — a top-aligned `…` marker appears when the
|
|
35
|
-
* focused row is below the start of the visible window.
|
|
36
|
-
*
|
|
37
|
-
* On wide terminals the picker splits into two panes: the windowed list on
|
|
35
|
+
* On wide terminals the picker splits into two panes: the list on
|
|
38
36
|
* the left and a live {@link ThemePreview} on the right that renders the
|
|
39
37
|
* *focused* preset's palette from its frozen snapshot. Navigating with ↑/↓
|
|
40
38
|
* re-renders the preview; Enter alone applies the theme. The description
|
|
41
39
|
* column is dropped from list rows in split mode — it moves into the
|
|
42
40
|
* preview header, which is what frees the list to show more rows.
|
|
41
|
+
*
|
|
42
|
+
* Three things the flat-list version did not have:
|
|
43
|
+
*
|
|
44
|
+
* - **Type-to-filter.** Printable keys narrow the list on name, id and
|
|
45
|
+
* description. `selected` is an index into the FILTERED list, so the
|
|
46
|
+
* window, the preview, and Enter all resolve through the same
|
|
47
|
+
* `filterThemeOptions` call.
|
|
48
|
+
* - **Family headers.** Related presets (Catppuccin ×4, Tokyo Night ×3)
|
|
49
|
+
* sit under one header, so a family is reachable without scrolling past
|
|
50
|
+
* 60 unrelated rows. Headers are real rows and are counted against
|
|
51
|
+
* `maxRows` by {@link windowThemeRows}.
|
|
52
|
+
* - **Inline swatches.** Each row carries a six-chip palette sample, so
|
|
53
|
+
* the list is still informative on the narrow terminals that get no
|
|
54
|
+
* preview pane at all.
|
|
43
55
|
*/
|
|
44
|
-
export declare function ThemePicker({ options, selected, activeId, hint, columns, maxRows, }: ThemePickerProps): React.ReactElement;
|
|
56
|
+
export declare function ThemePicker({ options, selected, activeId, hint, columns, maxRows, filter, }: ThemePickerProps): React.ReactElement;
|
|
45
57
|
export {};
|
|
46
58
|
//# sourceMappingURL=theme-picker.d.ts.map
|
|
@@ -5,8 +5,8 @@ interface ConnectionsSlashDeps {
|
|
|
5
5
|
} | undefined;
|
|
6
6
|
}
|
|
7
7
|
/**
|
|
8
|
-
*
|
|
9
|
-
*
|
|
8
|
+
* Bare `/connections` opens the panel; `restart` runs the same daemon actions
|
|
9
|
+
* directly and reports each result in chat.
|
|
10
10
|
*/
|
|
11
11
|
export declare function createConnectionsSlashCommand(deps: ConnectionsSlashDeps): SlashCommand;
|
|
12
12
|
export {};
|
package/dist/hit-test.d.ts
CHANGED
|
@@ -41,9 +41,9 @@ type HitRegion =
|
|
|
41
41
|
};
|
|
42
42
|
/**
|
|
43
43
|
* Columns at the right edge of the history viewport reserved for the rail.
|
|
44
|
-
* Layout: copy · gap · inspect · selection band · scrollbar track.
|
|
44
|
+
* Layout: copy · gap · inspect · three-cell spacer · selection band · scrollbar track.
|
|
45
45
|
*/
|
|
46
|
-
export declare const SCROLLBAR_HIT_WIDTH =
|
|
46
|
+
export declare const SCROLLBAR_HIT_WIDTH = 8;
|
|
47
47
|
/** Rows available to managed history after reserving the measured bottom UI. */
|
|
48
48
|
export declare function historyViewportRows(termRows: number, bottomHeight: number): number;
|
|
49
49
|
/**
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import type { AppProps } from '../app-props.js';
|
|
2
|
+
/**
|
|
3
|
+
* The prompt the auto-proceed loop sends after a run an API error killed.
|
|
4
|
+
* The run's own work is still in the transcript, so it asks to carry on, not
|
|
5
|
+
* to start over, and to stop rather than guess when it cannot tell where it was.
|
|
6
|
+
*/
|
|
7
|
+
export declare const FAILED_RUN_CONTINUE_PROMPT: string;
|
|
8
|
+
export interface FailedRunTracker {
|
|
9
|
+
/** True when the last leader run died on a retryable provider failure. */
|
|
10
|
+
pending(): boolean;
|
|
11
|
+
/** Take the pending failure (the auto-proceed loop is acting on it). */
|
|
12
|
+
consume(): boolean;
|
|
13
|
+
dispose(): void;
|
|
14
|
+
}
|
|
15
|
+
type Events = NonNullable<AppProps['agent']>['events'];
|
|
16
|
+
/**
|
|
17
|
+
* Watches the leader's runs for the one ending auto-proceed can recover: a
|
|
18
|
+
* run that `failed` after a provider call gave up on a *retryable* error
|
|
19
|
+
* (overload, dropped connection, 5xx) — the kind a later attempt usually
|
|
20
|
+
* gets through. A non-retryable failure (bad request, auth, context overflow)
|
|
21
|
+
* would fail the same way again and is never offered. A successful response
|
|
22
|
+
* after the error (the fallback chain found a working model) clears it; so
|
|
23
|
+
* does every new run, manual or automatic.
|
|
24
|
+
*
|
|
25
|
+
* Events carrying another session's id (a subagent on the same bus) are
|
|
26
|
+
* ignored: only the leader's run decides what the leader does next.
|
|
27
|
+
*/
|
|
28
|
+
export declare function createFailedRunTracker(events: Events, leaderSessionId: () => string | undefined): FailedRunTracker;
|
|
29
|
+
export {};
|
|
30
|
+
//# sourceMappingURL=failed-run-tracker.d.ts.map
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import type { Action } from '../app-action-type.js';
|
|
2
|
+
export interface ForkAtCheckpointDeps {
|
|
3
|
+
/** Host fork: branches `sessionId` at the checkpoint and returns the new id. */
|
|
4
|
+
forkSession: (sessionId: string, checkpointPromptIndex: number) => Promise<{
|
|
5
|
+
id: string;
|
|
6
|
+
}>;
|
|
7
|
+
/** The prompt recorded for the checkpoint (see `DefaultSessionRewinder.promptAt`). */
|
|
8
|
+
promptAt: (sessionId: string, checkpointPromptIndex: number) => Promise<string | undefined>;
|
|
9
|
+
/** The resume flow the /resume picker runs. */
|
|
10
|
+
resume: (sessionId: string, label: string) => Promise<void>;
|
|
11
|
+
/** The session the agent is on now; tells whether the resume attached the fork. */
|
|
12
|
+
currentSessionId: () => string | undefined;
|
|
13
|
+
dispatch: (action: Action) => void;
|
|
14
|
+
}
|
|
15
|
+
/**
|
|
16
|
+
* Fork the current session at a checkpoint and switch to the fork: the
|
|
17
|
+
* conversation up to that prompt continues in a new session, the original
|
|
18
|
+
* stays as it was, and the prompt is back in the composer to edit and send.
|
|
19
|
+
*/
|
|
20
|
+
export declare function forkAtCheckpoint(deps: ForkAtCheckpointDeps, request: {
|
|
21
|
+
sessionId: string;
|
|
22
|
+
promptIndex: number;
|
|
23
|
+
draft: string;
|
|
24
|
+
}): Promise<void>;
|
|
25
|
+
//# sourceMappingURL=fork-at-checkpoint.d.ts.map
|
|
@@ -26,5 +26,14 @@ export interface TuiSlashCommandOptions {
|
|
|
26
26
|
switchAutonomy: AppProps['switchAutonomy'];
|
|
27
27
|
listSessions: AppProps['listSessions'];
|
|
28
28
|
openPromptPicker: () => Promise<void>;
|
|
29
|
+
/**
|
|
30
|
+
* Live ConfigStore + the persist callback, threaded here so `/theme <preset>`
|
|
31
|
+
* can apply a named preset directly instead of only opening the picker. Both
|
|
32
|
+
* are optional: without them the command still opens the picker, it just
|
|
33
|
+
* cannot persist an immediate apply.
|
|
34
|
+
*/
|
|
35
|
+
configStore?: import('@wrongstack/core/types').ConfigStore | undefined;
|
|
36
|
+
saveThemePreset?: AppProps['saveThemePreset'];
|
|
37
|
+
applyThemePreset?: ((preset: import('@wrongstack/core/types').ThemePresetId) => void) | undefined;
|
|
29
38
|
}
|
|
30
39
|
//# sourceMappingURL=tui-slash-command-options.d.ts.map
|
|
@@ -12,7 +12,7 @@ export interface AppExecutionPipelineArgs {
|
|
|
12
12
|
current: ReturnType<typeof createRunBlocksController>;
|
|
13
13
|
};
|
|
14
14
|
submitRef: {
|
|
15
|
-
current:
|
|
15
|
+
current: (text?: string) => void;
|
|
16
16
|
};
|
|
17
17
|
}
|
|
18
18
|
export declare function useAppExecutionPipeline(args: AppExecutionPipelineArgs): {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type
|
|
1
|
+
import { type PromptUsageStore } from '@wrongstack/core/storage';
|
|
2
2
|
import type { Dispatch, MutableRefObject } from 'react';
|
|
3
3
|
import type { Action } from '../app-action-type.js';
|
|
4
4
|
import type { AppProps } from '../app-props.js';
|
|
@@ -12,6 +12,8 @@ import type { useStatusbarViewModel } from './use-statusbar-view-model.js';
|
|
|
12
12
|
import type { useTuiEnvironmentState } from './use-tui-environment-state.js';
|
|
13
13
|
interface UseAppPickerKeysOptions {
|
|
14
14
|
sessionGenerationRef?: MutableRefObject<number> | undefined;
|
|
15
|
+
/** Move the input queue to a resumed session (see `useQueueManager`). */
|
|
16
|
+
switchQueueSession?: ((sessionId: string) => void) | undefined;
|
|
15
17
|
host: AppProps;
|
|
16
18
|
state: State;
|
|
17
19
|
dispatch: Dispatch<Action>;
|
|
@@ -35,8 +37,9 @@ interface UseAppPickerKeysOptions {
|
|
|
35
37
|
statuslineHiddenForPicker: () => StatuslineItem[];
|
|
36
38
|
onPickerEnter: () => Promise<void>;
|
|
37
39
|
onThemePickerEnter?: () => void;
|
|
40
|
+
onThemePickerUndo?: () => void;
|
|
38
41
|
setPromptFavorite: (slug: string, favorite: boolean) => Promise<void>;
|
|
39
42
|
}
|
|
40
|
-
export declare function useAppPickerKeys({ sessionGenerationRef, host, state, dispatch, environment, statusbar, panelControllers, authPanelController, brainController, lastEnterAtRef, inputGateRef, submitRef, promptUsageRef, setDraft, acceptSlashPickerSelection, changeBrainRisk, handleModelPicked, handleShadowStart, handleShadowStop, subagentModelsController, statuslineHiddenForPicker, onPickerEnter, onThemePickerEnter, setPromptFavorite, }: UseAppPickerKeysOptions): (input: string, key: import("../components/input.js").KeyEvent, isEnter: boolean) => boolean;
|
|
43
|
+
export declare function useAppPickerKeys({ sessionGenerationRef, switchQueueSession, host, state, dispatch, environment, statusbar, panelControllers, authPanelController, brainController, lastEnterAtRef, inputGateRef, submitRef, promptUsageRef, setDraft, acceptSlashPickerSelection, changeBrainRisk, handleModelPicked, handleShadowStart, handleShadowStop, subagentModelsController, statuslineHiddenForPicker, onPickerEnter, onThemePickerEnter, onThemePickerUndo, setPromptFavorite, }: UseAppPickerKeysOptions): (input: string, key: import("../components/input.js").KeyEvent, isEnter: boolean) => boolean;
|
|
41
44
|
export {};
|
|
42
45
|
//# sourceMappingURL=use-app-picker-keys.d.ts.map
|
|
@@ -41,6 +41,12 @@ interface UseChipStalenessGuardOptions {
|
|
|
41
41
|
agentState: 'idle' | 'running' | 'streaming' | 'aborting';
|
|
42
42
|
/** Current spinner phase index (advances every SPINNER_INTERVAL_MS while active). */
|
|
43
43
|
spinnerPhase: number;
|
|
44
|
+
/**
|
|
45
|
+
* False while the spinner is deliberately still (the `static` animation
|
|
46
|
+
* style / reduced motion): a still spinner is then not a frozen one.
|
|
47
|
+
* Default true.
|
|
48
|
+
*/
|
|
49
|
+
spinnerAnimated?: boolean;
|
|
44
50
|
/** Token usage fingerprint — changes when new token events arrive. */
|
|
45
51
|
tokenFingerprint: string;
|
|
46
52
|
/** Context usage ratio (0..1) — changes as context grows. */
|
|
@@ -1,10 +1,12 @@
|
|
|
1
1
|
import type { Director } from '@wrongstack/core/coordination';
|
|
2
|
+
import type { RedoRewindResult } from '@wrongstack/core/storage';
|
|
2
3
|
import { type Dispatch, type MutableRefObject, type SetStateAction } from 'react';
|
|
3
4
|
import type { Action } from '../app-action-type.js';
|
|
4
5
|
import type { AppProps } from '../app-props.js';
|
|
5
6
|
import type { State } from '../app-state.js';
|
|
6
7
|
import { createCronJobsGetter } from '../cron-slash.js';
|
|
7
8
|
import type { MemoryContextMonitorState } from '../memory-context-monitor.js';
|
|
9
|
+
import type { RewindOutcome } from './use-session-rewind.js';
|
|
8
10
|
interface CoreTuiCommandsOptions {
|
|
9
11
|
agent: AppProps['agent'];
|
|
10
12
|
slashRegistry: AppProps['slashRegistry'];
|
|
@@ -25,10 +27,13 @@ interface CoreTuiCommandsOptions {
|
|
|
25
27
|
liveDirector: () => Director | null | undefined;
|
|
26
28
|
streamingTextRef: MutableRefObject<string>;
|
|
27
29
|
director: AppProps['director'];
|
|
28
|
-
handleRewindTo: (index: number) => Promise<
|
|
30
|
+
handleRewindTo: (index: number) => Promise<RewindOutcome>;
|
|
31
|
+
/** `/rewind redo`: undo the newest rewind. */
|
|
32
|
+
handleRewindRedo: () => Promise<RedoRewindResult | null>;
|
|
33
|
+
getSettings?: AppProps['getSettings'] | undefined;
|
|
29
34
|
}
|
|
30
35
|
/** Registers process/context/kanban/steer/rewind/agents commands. */
|
|
31
|
-
export declare function useCoreTuiCommands({ agent, slashRegistry, memoryStore, onPanelOpen, memoryContextMonitorRef, memoryRecordTotalRef, stateRef, boardFocusRef, setFocusedBoardId, terminalWidth, getModeLabel, activeCtrlRef, clearPendingConfirms, dispatch, liveDirector, streamingTextRef, director, handleRewindTo, }: CoreTuiCommandsOptions): {
|
|
36
|
+
export declare function useCoreTuiCommands({ agent, slashRegistry, memoryStore, onPanelOpen, memoryContextMonitorRef, memoryRecordTotalRef, stateRef, boardFocusRef, setFocusedBoardId, terminalWidth, getModeLabel, activeCtrlRef, clearPendingConfirms, dispatch, liveDirector, streamingTextRef, director, handleRewindTo, handleRewindRedo, getSettings, }: CoreTuiCommandsOptions): {
|
|
32
37
|
getCronJobs: ReturnType<typeof createCronJobsGetter>;
|
|
33
38
|
runSteerSequence: (text: string) => {
|
|
34
39
|
preamble: string;
|
|
@@ -19,6 +19,16 @@ export declare function detectAtToken(buffer: string, cursor: number): {
|
|
|
19
19
|
end: number;
|
|
20
20
|
query: string;
|
|
21
21
|
} | null;
|
|
22
|
+
export declare function isFileSelectionCurrent(current: {
|
|
23
|
+
buffer: string;
|
|
24
|
+
cursor: number;
|
|
25
|
+
}, original: {
|
|
26
|
+
buffer: string;
|
|
27
|
+
cursor: number;
|
|
28
|
+
}, token: {
|
|
29
|
+
start: number;
|
|
30
|
+
end: number;
|
|
31
|
+
}): boolean;
|
|
22
32
|
interface UseFileSearchOptions {
|
|
23
33
|
state: State;
|
|
24
34
|
dispatch: React.Dispatch<Action>;
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { type Dispatch } from 'react';
|
|
2
|
+
import type { Action } from '../app-action-type.js';
|
|
3
|
+
import type { AppProps } from '../app-props.js';
|
|
4
|
+
/**
|
|
5
|
+
* Tells the person when an MCP server is down for good, and when it is back.
|
|
6
|
+
*
|
|
7
|
+
* The model learns about a failed server through its tool list; the person
|
|
8
|
+
* learned nothing — the registry only logged it. Only a `terminal` disconnect
|
|
9
|
+
* is shown: connect attempts or reconnect cycles are exhausted and nothing
|
|
10
|
+
* retries by itself. A stop, an idle sleep or a drop that an automatic
|
|
11
|
+
* reconnect follows stays quiet. Each failure is shown once; the recovery line
|
|
12
|
+
* appears only for a server this bridge reported down.
|
|
13
|
+
*/
|
|
14
|
+
export declare function useMcpStatusBridge({ events, dispatch, }: {
|
|
15
|
+
events: AppProps['events'];
|
|
16
|
+
dispatch: Dispatch<Action>;
|
|
17
|
+
}): void;
|
|
18
|
+
//# sourceMappingURL=use-mcp-status-bridge.d.ts.map
|
|
@@ -26,15 +26,17 @@ interface AutoProceedCandidateInput {
|
|
|
26
26
|
autoSuggestions?: readonly string[] | undefined;
|
|
27
27
|
yolo?: boolean | undefined;
|
|
28
28
|
autonomyNextPrompt?: string | undefined;
|
|
29
|
+
/** The last run died on a retryable provider failure (see failed-run-tracker). */
|
|
30
|
+
failedRun?: boolean | undefined;
|
|
29
31
|
}
|
|
30
32
|
interface AutoProceedCandidate {
|
|
31
|
-
source: 'todo' | 'suggestion' | 'auto-suggestion';
|
|
33
|
+
source: 'todo' | 'suggestion' | 'auto-suggestion' | 'failed-run';
|
|
32
34
|
prompt: string;
|
|
33
35
|
label: string;
|
|
34
36
|
todoId?: string | undefined;
|
|
35
37
|
}
|
|
36
38
|
/** Resolve one grounded automatic turn without mutating either suggestion store. */
|
|
37
|
-
export declare function selectAutoProceedCandidate({ todos, suggestions, autoSuggestions, yolo, autonomyNextPrompt, }: AutoProceedCandidateInput): AutoProceedCandidate | null;
|
|
39
|
+
export declare function selectAutoProceedCandidate({ todos, suggestions, autoSuggestions, yolo, autonomyNextPrompt, failedRun, }: AutoProceedCandidateInput): AutoProceedCandidate | null;
|
|
38
40
|
/** Owns grounded next-step countdowns and automatic-turn loop guards. */
|
|
39
41
|
export declare function useNextStepsAutoSubmit({ state, autonomyLive, agent, getAutonomy, getSettings, getSuggestions, getAutoSuggestions, getYolo, setSuggestions, autonomyNextPrompt, dispatch, clearDraft, runBlocksRef, }: NextStepsAutoSubmitOptions): {
|
|
40
42
|
nextStepsAutoSubmitCountdown: number | null;
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import type { KeyEvent } from '../components/input.js';
|
|
2
|
+
import type { PickerKeysHost } from './use-picker-keys-types.js';
|
|
3
|
+
export declare function tryBrainStatuslinePickerKeys(host: PickerKeysHost, input: string, key: KeyEvent, isEnter: boolean, debouncedEnter: (host: PickerKeysHost) => boolean): boolean;
|
|
4
|
+
//# sourceMappingURL=use-picker-keys-brain-statusline.d.ts.map
|
|
@@ -74,6 +74,11 @@ export interface PickerKeysHost {
|
|
|
74
74
|
* leave Enter as a no-op (the picker still navigates, just doesn't apply).
|
|
75
75
|
*/
|
|
76
76
|
onThemePickerEnter?: (() => void) | undefined;
|
|
77
|
+
/**
|
|
78
|
+
* Restores the preset that was live when the picker opened, keeping the
|
|
79
|
+
* picker open. Optional — omitted hosts leave `u` inert.
|
|
80
|
+
*/
|
|
81
|
+
onThemePickerUndo?: (() => void) | undefined;
|
|
77
82
|
onSlashPickerTab: (() => void) | undefined;
|
|
78
83
|
}
|
|
79
84
|
//# sourceMappingURL=use-picker-keys-types.d.ts.map
|
|
@@ -27,6 +27,11 @@ export interface ProviderQuotaChip {
|
|
|
27
27
|
resetIn?: string | undefined;
|
|
28
28
|
/** True when this window is the one currently cutting the account off. */
|
|
29
29
|
reached: boolean;
|
|
30
|
+
/**
|
|
31
|
+
* `1h 40m`, when the pace of the last hour fills the window before it
|
|
32
|
+
* resets. Absent while the plan is not on course to run out.
|
|
33
|
+
*/
|
|
34
|
+
exhaustsIn?: string | undefined;
|
|
30
35
|
}
|
|
31
36
|
export declare function useProviderQuota(): ProviderQuotaChip | undefined;
|
|
32
37
|
//# sourceMappingURL=use-provider-quota.d.ts.map
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import type { AppProps } from '../app-props.js';
|
|
2
|
+
import type { State } from '../app-state.js';
|
|
3
|
+
/**
|
|
4
|
+
* Warm the provider connection while the user types, so DNS and TLS are done
|
|
5
|
+
* by the time they press Enter (`Provider.warm`). Runs on every keystroke;
|
|
6
|
+
* the provider throttles to one small request per endpoint every few seconds.
|
|
7
|
+
*/
|
|
8
|
+
export declare function useProviderWarmup(agent: AppProps['agent'], buffer: string, status: State['status']): void;
|
|
9
|
+
//# sourceMappingURL=use-provider-warmup.d.ts.map
|
|
@@ -5,6 +5,12 @@ import type { Settings } from '../app-state.js';
|
|
|
5
5
|
export interface UseQueueManagerOptions {
|
|
6
6
|
/** Optional persistent store — absent => in-memory only (no crash recovery). */
|
|
7
7
|
queueStore?: QueueStore | undefined;
|
|
8
|
+
/**
|
|
9
|
+
* The store of another session. With it, resuming a session brings that
|
|
10
|
+
* session's queue along (the WebUI keeps its queue in the same file) and
|
|
11
|
+
* leaves the previous session's on disk; without it, the queue is dropped.
|
|
12
|
+
*/
|
|
13
|
+
queueStoreFor?: ((sessionId: string) => QueueStore | undefined) | undefined;
|
|
8
14
|
/** Called on every queue change so the host learns what's waiting. */
|
|
9
15
|
onQueueChange?: ((items: string[]) => void) | undefined;
|
|
10
16
|
/** Slash registry to register the /queue command. */
|
|
@@ -18,10 +24,14 @@ export interface UseQueueManagerOptions {
|
|
|
18
24
|
/** Live mirror of the mid-run send-mode picker enabled flag. */
|
|
19
25
|
midRunSendPickerRef: React.MutableRefObject<boolean>;
|
|
20
26
|
}
|
|
27
|
+
export interface QueueManager {
|
|
28
|
+
/** Move the queue to the session just resumed: its own queue replaces this one. */
|
|
29
|
+
switchSession(sessionId: string): void;
|
|
30
|
+
}
|
|
21
31
|
/**
|
|
22
32
|
* Manages the TUI message queue: rehydration from persistent store,
|
|
23
33
|
* persistence on every change, host mirroring, and the /queue slash
|
|
24
34
|
* command. All side-effect wiring extracted from app.tsx.
|
|
25
35
|
*/
|
|
26
|
-
export declare function useQueueManager({ queueStore, onQueueChange, slashRegistry, stateRef, dispatch, getSettings, saveSettings, midRunSendPickerRef, }: UseQueueManagerOptions):
|
|
36
|
+
export declare function useQueueManager({ queueStore, queueStoreFor, onQueueChange, slashRegistry, stateRef, dispatch, getSettings, saveSettings, midRunSendPickerRef, }: UseQueueManagerOptions): QueueManager;
|
|
27
37
|
//# sourceMappingURL=use-queue-manager.d.ts.map
|
|
@@ -1,6 +1,12 @@
|
|
|
1
1
|
import type { Agent } from '@wrongstack/core/agent';
|
|
2
2
|
import type { Director } from '@wrongstack/core/coordination';
|
|
3
|
+
import { type RedoRewindResult, type RewoundConversation } from '@wrongstack/core/storage';
|
|
3
4
|
import type { SessionInterruptController } from './use-session-interrupt-controller.js';
|
|
5
|
+
/** What a rewind leaves for the screen: the prompt taken back, and the rest. */
|
|
6
|
+
export interface RewindOutcome {
|
|
7
|
+
promptText?: string | undefined;
|
|
8
|
+
conversation?: RewoundConversation | undefined;
|
|
9
|
+
}
|
|
4
10
|
interface UseSessionRewindOptions {
|
|
5
11
|
agent: Agent;
|
|
6
12
|
sessionsDir?: string | undefined;
|
|
@@ -9,7 +15,8 @@ interface UseSessionRewindOptions {
|
|
|
9
15
|
sessionGenerationRef: React.MutableRefObject<number>;
|
|
10
16
|
}
|
|
11
17
|
export declare function useSessionRewind({ agent, sessionsDir, interruptController, liveDirector, sessionGenerationRef, }: UseSessionRewindOptions): {
|
|
12
|
-
handleRewindTo: (checkpointIndex: number) => Promise<
|
|
18
|
+
handleRewindTo: (checkpointIndex: number) => Promise<RewindOutcome>;
|
|
19
|
+
handleRewindRedo: () => Promise<RedoRewindResult | null>;
|
|
13
20
|
};
|
|
14
21
|
export {};
|
|
15
22
|
//# sourceMappingURL=use-session-rewind.d.ts.map
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { type Dispatch } from 'react';
|
|
2
|
-
import type { AppProps } from '../app-props.js';
|
|
3
2
|
import type { Action } from '../app-action-type.js';
|
|
3
|
+
import type { AppProps } from '../app-props.js';
|
|
4
4
|
import type { State } from '../app-state.js';
|
|
5
5
|
interface SlashPickerOptions {
|
|
6
6
|
state: State;
|
|
@@ -1,5 +1,12 @@
|
|
|
1
1
|
import type { KeyEvent } from '../components/input.js';
|
|
2
2
|
type AppKeyHandler = (input: string, key: KeyEvent) => Promise<void>;
|
|
3
|
-
|
|
3
|
+
/**
|
|
4
|
+
* Returns an identity-stable key handler that always calls the latest
|
|
5
|
+
* `handleKey`. A rejected key handler must never kill the process, but it
|
|
6
|
+
* must not vanish either: `onError` receives the failure so the host can
|
|
7
|
+
* surface it (an error entry in the transcript). Without `onError` the
|
|
8
|
+
* failure is still contained.
|
|
9
|
+
*/
|
|
10
|
+
export declare function useStableKeyHandler(handleKey: AppKeyHandler, onError?: (err: unknown) => void): AppKeyHandler;
|
|
4
11
|
export {};
|
|
5
12
|
//# sourceMappingURL=use-stable-key-handler.d.ts.map
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import type { Agent } from '@wrongstack/core/agent';
|
|
2
|
+
import type { AutonomyStage } from './use-statusline-state.js';
|
|
2
3
|
interface UseStatusSyncIntervalOptions {
|
|
3
|
-
getAutonomy?: (() =>
|
|
4
|
+
getAutonomy?: (() => AutonomyStage) | undefined;
|
|
4
5
|
getYolo?: (() => boolean) | undefined;
|
|
5
6
|
getModeLabel?: (() => string) | undefined;
|
|
6
7
|
getEternalEngine?: unknown;
|
|
@@ -11,7 +12,7 @@ interface UseStatusSyncIntervalOptions {
|
|
|
11
12
|
liveModeLabel: string;
|
|
12
13
|
liveModel: string;
|
|
13
14
|
liveProvider: string;
|
|
14
|
-
setAutonomyLive: (v:
|
|
15
|
+
setAutonomyLive: (v: AutonomyStage) => void;
|
|
15
16
|
setYoloLive: (v: boolean) => void;
|
|
16
17
|
setLiveModeLabel: (v: string) => void;
|
|
17
18
|
setLiveModel: (v: string) => void;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { ConfigStore } from '@wrongstack/core/types';
|
|
1
|
+
import type { ConfigStore, ThemePresetId } from '@wrongstack/core/types';
|
|
2
2
|
import type { Action } from '../app-reducer.js';
|
|
3
3
|
import { type ThemeName } from '../theme.js';
|
|
4
4
|
interface UseThemePickerHandlerOptions {
|
|
@@ -6,9 +6,14 @@ interface UseThemePickerHandlerOptions {
|
|
|
6
6
|
saveThemePreset?: ((theme: ThemeName) => Promise<void>) | undefined;
|
|
7
7
|
dispatch: React.Dispatch<Action>;
|
|
8
8
|
selectedIndex: number;
|
|
9
|
+
/** Active type-to-filter query — `selectedIndex` indexes the FILTERED list. */
|
|
10
|
+
filter?: string | undefined;
|
|
11
|
+
/** Preset that was live when the picker opened — the undo target. */
|
|
12
|
+
previous?: ThemePresetId | undefined;
|
|
9
13
|
}
|
|
10
|
-
export declare function useThemePickerHandler({ configStore, saveThemePreset, dispatch, selectedIndex, }: UseThemePickerHandlerOptions): {
|
|
14
|
+
export declare function useThemePickerHandler({ configStore, saveThemePreset, dispatch, selectedIndex, filter, previous, }: UseThemePickerHandlerOptions): {
|
|
11
15
|
onThemePickerEnter: () => void;
|
|
16
|
+
onThemePickerUndo: () => void;
|
|
12
17
|
};
|
|
13
18
|
export {};
|
|
14
19
|
//# sourceMappingURL=use-theme-picker-handler.d.ts.map
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { getIndexState } from '@wrongstack/tools';
|
|
1
2
|
import type { AppProps } from '../app-props.js';
|
|
2
3
|
type EnvironmentProps = Omit<Pick<AppProps, 'events' | 'memoryStore' | 'model' | 'provider' | 'effectiveMaxContext' | 'yolo' | 'getAutonomy' | 'modeLabel' | 'statuslineHiddenItems' | 'statuslineLines' | 'statuslineDensities' | 'statuslineOrder' | 'toolCount' | 'getSettings' | 'setStatuslineHiddenItems' | 'saveStatuslineHiddenItems' | 'setStatuslineLines' | 'saveStatuslineLines' | 'setStatuslineDensities' | 'saveStatuslineDensities' | 'setStatuslineOrder' | 'saveStatuslineOrder'>, 'yolo'> & {
|
|
3
4
|
yolo: boolean;
|
|
@@ -45,5 +46,7 @@ export declare function useTuiEnvironmentState({ events, memoryStore, model, pro
|
|
|
45
46
|
};
|
|
46
47
|
breakerCountdown: import("@wrongstack/tools").BreakerCountdown | null;
|
|
47
48
|
};
|
|
49
|
+
/** Everything the index status chip renders; equal keys draw an equal chip. */
|
|
50
|
+
export declare function indexChipKey(state: ReturnType<typeof getIndexState>): string;
|
|
48
51
|
export {};
|
|
49
52
|
//# sourceMappingURL=use-tui-environment-state.d.ts.map
|
|
@@ -4,6 +4,18 @@ type ClearHistoryDispatch = React.Dispatch<{
|
|
|
4
4
|
type: 'clearHistory';
|
|
5
5
|
model?: string | undefined;
|
|
6
6
|
provider?: string | undefined;
|
|
7
|
+
/**
|
|
8
|
+
* When explicitly `null`, the reducer treats the boot-time restored
|
|
9
|
+
* transcript as discarded and resets `historyBudget`, `autoProceedHold`,
|
|
10
|
+
* and `nextId` to the fresh-boot values. `/clear` passes `null` for
|
|
11
|
+
* all three so the screen genuinely looks like first launch. Pass
|
|
12
|
+
* `undefined` (or omit) to preserve the existing resume-derived
|
|
13
|
+
* budget/hold — the behavior the bridge uses for `session.rewound` /
|
|
14
|
+
* `project.switched`.
|
|
15
|
+
*/
|
|
16
|
+
restoredMessages?: readonly unknown[] | null | undefined;
|
|
17
|
+
restoredToolCalls?: readonly unknown[] | null | undefined;
|
|
18
|
+
restoredEvents?: readonly unknown[] | null | undefined;
|
|
7
19
|
} | {
|
|
8
20
|
type: 'resetContextChip';
|
|
9
21
|
} | {
|