@wrongstack/tui 1.0.33 → 1.0.35
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-settings.d.ts +1 -0
- package/dist/app-action-workflows.d.ts +4 -0
- package/dist/app-coordination-props.d.ts +116 -0
- package/dist/app-enhancement-props.d.ts +57 -0
- package/dist/app-panel-state.d.ts +2 -0
- package/dist/app-props.d.ts +9 -350
- package/dist/app-session-props.d.ts +91 -0
- package/dist/app-settings-props.d.ts +101 -0
- package/dist/app-settings-type.d.ts +5 -2
- package/dist/app-state.d.ts +6 -0
- package/dist/app-view-contract.d.ts +2 -3
- package/dist/app-view-pickers.d.ts +1 -12
- package/dist/app-view-prompts.d.ts +19 -0
- package/dist/components/chat-search-bar.d.ts +0 -2
- package/dist/components/history/assistant.d.ts +0 -7
- package/dist/components/history/banner-formation.d.ts +6 -0
- package/dist/components/history/banner.d.ts +3 -1
- package/dist/components/history/basic-format.d.ts +0 -2
- package/dist/components/history/copy-geometry.d.ts +0 -9
- package/dist/components/history/entry.d.ts +2 -1
- package/dist/components/history/index.d.ts +1 -1
- package/dist/components/history/scroll-controller-types.d.ts +5 -0
- package/dist/components/history/scrollbar-geometry.d.ts +2 -0
- package/dist/components/history/types.d.ts +1 -1
- package/dist/components/history/use-history-controller.d.ts +4 -0
- package/dist/components/model-picker-effort.d.ts +7 -0
- package/dist/components/model-picker.d.ts +6 -0
- package/dist/components/provider-colors.d.ts +0 -7
- package/dist/components/scrollable-history.d.ts +2 -5
- package/dist/components/settings-picker-constants.d.ts +2 -3
- package/dist/components/settings-picker-props.d.ts +139 -0
- package/dist/components/settings-picker.d.ts +4 -138
- package/dist/components/sidebar-panels-workspace.d.ts +7 -7
- package/dist/components/sidebar-panels.d.ts +2 -3
- package/dist/components/status-bar-format.d.ts +0 -10
- package/dist/components/status-bar-icons.d.ts +0 -2
- package/dist/components/status-bar-rails-common.d.ts +1 -0
- package/dist/components/status-bar-rails.d.ts +0 -1
- package/dist/components/status-bar-types.d.ts +2 -0
- package/dist/components/status-bar.d.ts +3 -4
- package/dist/components/worktree-monitor.d.ts +8 -12
- package/dist/components/worktree-timeline-bars.d.ts +31 -0
- package/dist/heap-watchdog.d.ts +1 -1
- package/dist/hooks/use-app-pipeline-builders.d.ts +1 -0
- package/dist/hooks/use-bug-hunt-loop.d.ts +1 -0
- package/dist/hooks/use-history-viewport-sync.d.ts +4 -7
- package/dist/hooks/use-tui-slash-commands.d.ts +0 -1
- package/dist/index.js +40454 -39672
- package/dist/input-validation/action-types.d.ts +1 -2
- package/dist/input-validation/allow-lists.d.ts +0 -6
- package/dist/input-validation/terminal.d.ts +0 -13
- package/dist/key-handler-context.d.ts +1 -1
- package/dist/memory-slash-types.d.ts +1 -4
- package/dist/on-panel-open.d.ts +0 -13
- package/dist/reducers/workspace-panels.d.ts +1 -1
- package/dist/settings-contracts.d.ts +7 -0
- package/dist/submit-controller.d.ts +1 -0
- package/dist/tool-result-view-mode.d.ts +0 -2
- package/dist/topic-shift-advisor.d.ts +1 -1
- package/dist/tui-host-capabilities.d.ts +2 -1
- package/dist/ui-contracts.d.ts +2 -1
- package/dist/use-app-controller.d.ts +6 -8
- package/dist/use-controller-app-state.d.ts +13 -0
- package/dist/use-controller-auto-prompts.d.ts +14 -0
- package/dist/use-controller-commands.d.ts +51 -0
- package/dist/use-controller-confirm-auth.d.ts +20 -0
- package/dist/use-controller-environment.d.ts +112 -0
- package/dist/use-controller-input-wiring.d.ts +53 -0
- package/dist/use-controller-key-pipeline.d.ts +1 -0
- package/dist/use-controller-panel-hooks.d.ts +1 -0
- package/dist/use-controller-session-bridges.d.ts +19 -0
- package/dist/use-controller-statusline-picker.d.ts +16 -0
- package/dist/use-controller-theme-events.d.ts +31 -0
- package/dist/use-controller-theme-wiring.d.ts +25 -0
- package/package.json +7 -7
|
@@ -0,0 +1,91 @@
|
|
|
1
|
+
import type { ContextSnapshot, SessionLoadProgress } from '@wrongstack/core/types';
|
|
2
|
+
import type { ResumeSessionEntry } from './app-reducer.js';
|
|
3
|
+
import type { HistoryEntry } from './history-entry.js';
|
|
4
|
+
export interface TuiSessionProps {
|
|
5
|
+
/**
|
|
6
|
+
* Called when the user selects a session in the /resume picker. The host
|
|
7
|
+
* loads the session JSONL, replays history entries, rebuilds the agent
|
|
8
|
+
* context, and returns the hydrated history entries + nextId for display.
|
|
9
|
+
* Returns null when resume fails (session not found, corrupt JSONL, etc.).
|
|
10
|
+
*
|
|
11
|
+
* The returned entries replace the TUI's current entries in a single
|
|
12
|
+
* `replaceHistory` dispatch, so the user sees the prior conversation
|
|
13
|
+
* exactly as it appeared during live interaction.
|
|
14
|
+
*/
|
|
15
|
+
onResumeSession?: ((sessionId: string, onLoadProgress?: (progress: SessionLoadProgress) => void,
|
|
16
|
+
/**
|
|
17
|
+
* Live stage names as each step of the resume begins (`resolve_id`,
|
|
18
|
+
* `open_journal`, `swap_writer`, …). Drives the rolling rows of the
|
|
19
|
+
* resume loading block, so the screen reports what is actually
|
|
20
|
+
* happening instead of a spinner over an unexplained multi-second wait.
|
|
21
|
+
*/
|
|
22
|
+
onStage?: (stage: string) => void) => Promise<{
|
|
23
|
+
entries: HistoryEntry[];
|
|
24
|
+
nextId: number;
|
|
25
|
+
sessionId: string;
|
|
26
|
+
/**
|
|
27
|
+
* Optional context-window snapshot computed from the resumed
|
|
28
|
+
* session's tokenCounter after accounting the persisted usage.
|
|
29
|
+
* When present, the reducer writes `tokens` to `state.leader.ctxTokens`,
|
|
30
|
+
* `maxContext` to `state.leader.ctxMaxTokens`, and bumps
|
|
31
|
+
* `state.contextChipVersion` so the chip refreshes immediately. When
|
|
32
|
+
* absent, the chip stays at its previous value until the next ctx.pct
|
|
33
|
+
* event lands.
|
|
34
|
+
*/
|
|
35
|
+
contextSnapshot?: ContextSnapshot | undefined;
|
|
36
|
+
/**
|
|
37
|
+
* `false` when the transcript loaded but the session was NOT claimed
|
|
38
|
+
* for writing — another process owns it, or the claim lapsed. The
|
|
39
|
+
* conversation is still shown (read-only); the agent keeps writing to
|
|
40
|
+
* the session it was already in. Treated as present-but-true by hosts
|
|
41
|
+
* that predate the field.
|
|
42
|
+
*/
|
|
43
|
+
attached?: boolean | undefined;
|
|
44
|
+
/**
|
|
45
|
+
* Non-fatal problems to print alongside the replayed transcript
|
|
46
|
+
* (sidecars that did not re-point, a provider that is gone). These no
|
|
47
|
+
* longer abort a resume, so they have to be visible somewhere.
|
|
48
|
+
*/
|
|
49
|
+
warnings?: string[] | undefined;
|
|
50
|
+
/**
|
|
51
|
+
* `<nextsteps>` parsed from the resumed session's final assistant turn.
|
|
52
|
+
*
|
|
53
|
+
* OFFERED, never executed: the resume lists them and stops. Empty when
|
|
54
|
+
* the session did not end on a next-steps block, when it has open todos
|
|
55
|
+
* (the board keeps precedence), or when the transcript is read-only.
|
|
56
|
+
*/
|
|
57
|
+
nextSteps?: string[] | undefined;
|
|
58
|
+
} | null>) | undefined;
|
|
59
|
+
/**
|
|
60
|
+
* List recent session summaries for the /resume picker. The host reads
|
|
61
|
+
* from the session store and returns ResumeSessionEntry-shaped data.
|
|
62
|
+
* Used both by the /resume slash command (to populate the picker) and
|
|
63
|
+
* optionally by the startup rehydration path.
|
|
64
|
+
*/
|
|
65
|
+
listSessions?: ((limit?: number) => Promise<ResumeSessionEntry[]>) | undefined;
|
|
66
|
+
/**
|
|
67
|
+
* Branch a session at a checkpoint (the conversation before that prompt)
|
|
68
|
+
* into a new session, leaving the original as it is. Returns the new id;
|
|
69
|
+
* the TUI then resumes it. The working tree is shared, not copied.
|
|
70
|
+
*/
|
|
71
|
+
forkSession?: ((sessionId: string, checkpointPromptIndex: number) => Promise<{
|
|
72
|
+
id: string;
|
|
73
|
+
}>) | undefined;
|
|
74
|
+
/**
|
|
75
|
+
* Goal text passed from `--goal "..."` on the command line. When set,
|
|
76
|
+
* the App mounts, renders the banner, then automatically dispatches
|
|
77
|
+
* a synthetic `/goal <text>` so the user lands in goal mode without
|
|
78
|
+
* having to type the slash command. Mutually advisory with `initialSteer`
|
|
79
|
+
* — `initialGoal` wins if both are present.
|
|
80
|
+
*/
|
|
81
|
+
initialGoal?: string | undefined;
|
|
82
|
+
/**
|
|
83
|
+
* Initial user message passed from `--ask "..."` on the command line.
|
|
84
|
+
* Submitted verbatim as the first turn (no preamble) so users can
|
|
85
|
+
* launch the TUI and pre-populate one turn from a shell alias / script.
|
|
86
|
+
*/
|
|
87
|
+
initialAsk?: string | undefined;
|
|
88
|
+
/** Directory for session JSONL files. Passed to App for /rewind. */
|
|
89
|
+
sessionsDir?: string | undefined;
|
|
90
|
+
}
|
|
91
|
+
//# sourceMappingURL=app-session-props.d.ts.map
|
|
@@ -0,0 +1,101 @@
|
|
|
1
|
+
import type { ConfigStore } from '@wrongstack/core/types';
|
|
2
|
+
import type { Settings } from './app-reducer.js';
|
|
3
|
+
import type { AuthPanelHost } from './auth-panel-model.js';
|
|
4
|
+
import type { BrainRiskLevel } from './brain-contracts.js';
|
|
5
|
+
import type { McpPickerItem, PluginPickerItem, ToolPickerItem } from './ui-contracts.js';
|
|
6
|
+
export interface TuiSettingsProps {
|
|
7
|
+
/**
|
|
8
|
+
* Read the persisted autonomy settings (defaultMode, autoProceedDelayMs).
|
|
9
|
+
* Used by the SettingsPicker in the TUI on mount and after Ctrl+S toggle.
|
|
10
|
+
*/
|
|
11
|
+
/** Settings shape — shared between getSettings and saveSettings. */
|
|
12
|
+
getSettings?: (() => Settings) | undefined;
|
|
13
|
+
/**
|
|
14
|
+
* Live view over the persisted user config. The TUI uses this to:
|
|
15
|
+
* - apply `themePreset` on boot (so `/theme` choices persist across
|
|
16
|
+
* restarts), and
|
|
17
|
+
* - write `themePreset` back when the picker Enter handler fires
|
|
18
|
+
* (so the picker shows `[active]` on the right row next session).
|
|
19
|
+
*
|
|
20
|
+
* Optional for hosts that don't expose a config store (e.g. tests);
|
|
21
|
+
* when omitted the TUI stays on the default catppuccin palette and
|
|
22
|
+
* picker changes are ephemeral.
|
|
23
|
+
*/
|
|
24
|
+
configStore?: ConfigStore | undefined;
|
|
25
|
+
/**
|
|
26
|
+
* Persist settings changes. Returns null on success, or an
|
|
27
|
+
* error string on failure (so the TUI can display it as a hint).
|
|
28
|
+
*/
|
|
29
|
+
saveSettings?: ((s: Settings) => string | null | Promise<string | null>) | undefined;
|
|
30
|
+
/** Persist the active theme preset to disk so the next boot starts with it. */
|
|
31
|
+
saveThemePreset?: ((preset: import('@wrongstack/core/types').ThemePresetId) => Promise<void>) | undefined;
|
|
32
|
+
/** Load toggleable plugin rows for the interactive plugin picker. */
|
|
33
|
+
getPluginItems?: (() => PluginPickerItem[]) | undefined;
|
|
34
|
+
/** Toggle one plugin from the interactive picker and return the refreshed rows. */
|
|
35
|
+
onPluginToggle?: ((name: string) => Promise<{
|
|
36
|
+
items: PluginPickerItem[];
|
|
37
|
+
message?: string | undefined;
|
|
38
|
+
error?: string | undefined;
|
|
39
|
+
}>) | undefined;
|
|
40
|
+
/** Load MCP server rows for the interactive MCP picker. */
|
|
41
|
+
getMcpServers?: (() => McpPickerItem[]) | undefined;
|
|
42
|
+
/** Toggle one MCP server (enable/disable) from the interactive picker. */
|
|
43
|
+
onMcpToggle?: ((name: string) => Promise<{
|
|
44
|
+
items: McpPickerItem[];
|
|
45
|
+
message?: string | undefined;
|
|
46
|
+
error?: string | undefined;
|
|
47
|
+
}>) | undefined;
|
|
48
|
+
/** Restart one MCP server from the interactive picker. */
|
|
49
|
+
onMcpRestart?: ((name: string) => Promise<{
|
|
50
|
+
items: McpPickerItem[];
|
|
51
|
+
message?: string | undefined;
|
|
52
|
+
error?: string | undefined;
|
|
53
|
+
}>) | undefined;
|
|
54
|
+
/** Load tool rows for the interactive tool picker. */
|
|
55
|
+
getToolsItems?: (() => ToolPickerItem[]) | undefined;
|
|
56
|
+
/** Toggle one tool (enable/disable) from the interactive tool picker. */
|
|
57
|
+
onToolToggle?: ((name: string) => Promise<{
|
|
58
|
+
items: ToolPickerItem[];
|
|
59
|
+
message?: string | undefined;
|
|
60
|
+
error?: string | undefined;
|
|
61
|
+
}>) | undefined;
|
|
62
|
+
/** Get current brain risk level and decision log. */
|
|
63
|
+
getBrainData?: (() => {
|
|
64
|
+
riskLevel: BrainRiskLevel;
|
|
65
|
+
log: Array<{
|
|
66
|
+
kind: string;
|
|
67
|
+
question: string;
|
|
68
|
+
outcome: string;
|
|
69
|
+
age: string;
|
|
70
|
+
}>;
|
|
71
|
+
}) | undefined;
|
|
72
|
+
/** Set brain risk ceiling. */
|
|
73
|
+
onBrainRiskLevel?: ((level: BrainRiskLevel) => string | undefined) | undefined;
|
|
74
|
+
/** Full Brain settings editor bridge (live apply + persist). */
|
|
75
|
+
brainPanelHost?: import('./brain-panel-model.js').BrainPanelHost | undefined;
|
|
76
|
+
/**
|
|
77
|
+
* Session-scoped subagent model plan bridge for `/subagent-models`. The host
|
|
78
|
+
* owns the plan (it needs the session writer to journal it); the panel only
|
|
79
|
+
* reads snapshots and calls back. Absent = the panel stays unavailable and
|
|
80
|
+
* the slash command falls back to its text output.
|
|
81
|
+
*/
|
|
82
|
+
subagentModelsHost?: import('./subagent-models-panel-model.js').SubagentModelsPanelHost | undefined;
|
|
83
|
+
/** Get current Shadow Agent state. */
|
|
84
|
+
getShadowData?: (() => {
|
|
85
|
+
activeId: string | null;
|
|
86
|
+
running: boolean;
|
|
87
|
+
model: string;
|
|
88
|
+
intervalMs: number;
|
|
89
|
+
}) | undefined;
|
|
90
|
+
/** Start Shadow Agent. Returns message or error. */
|
|
91
|
+
onShadowStart?: (() => Promise<string | undefined>) | undefined;
|
|
92
|
+
/** Stop Shadow Agent. Returns message or error. */
|
|
93
|
+
onShadowStop?: (() => Promise<string | undefined>) | undefined;
|
|
94
|
+
/**
|
|
95
|
+
* Host for the interactive `/auth` panel (provider/key management, OAuth
|
|
96
|
+
* sign-in, local-server add). Provided by the CLI; when absent, `/auth`
|
|
97
|
+
* falls back to its plain-text output.
|
|
98
|
+
*/
|
|
99
|
+
authHost?: AuthPanelHost | undefined;
|
|
100
|
+
}
|
|
101
|
+
//# sourceMappingURL=app-settings-props.d.ts.map
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import type { FleetChatVerbosity, TokenSavingTier } from '@wrongstack/core/types';
|
|
2
2
|
import type { AgentSwarmPanelMode, CacheTtl, ContextMode, ReasoningEffort, StatuslineMode } from './settings-contracts.js';
|
|
3
|
-
export
|
|
4
|
-
export { coercePanelPositionMap, DEFAULT_PANEL_POSITIONS, PANEL_IDS, } from './ui-contracts.js';
|
|
3
|
+
export { coercePanelPositionMap } from './ui-contracts.js';
|
|
5
4
|
import type { ToolResultViewMode } from './tool-result-view-mode.js';
|
|
6
5
|
import type { PanelPositionMap } from './ui-contracts.js';
|
|
7
6
|
export type { AgentSwarmPanelMode } from './settings-contracts.js';
|
|
@@ -58,6 +57,8 @@ export type Settings = {
|
|
|
58
57
|
enhanceEnabled: boolean;
|
|
59
58
|
/** Default language for refinement: original or english. */
|
|
60
59
|
enhanceLanguage: 'original' | 'english';
|
|
60
|
+
/** Retry window override for the refiner (ms). Unset = derived (2× base, floored at 180s). */
|
|
61
|
+
enhanceRetryTimeoutMs?: number | undefined;
|
|
61
62
|
midRunSendPicker?: boolean | undefined;
|
|
62
63
|
/** Raw SSE stream debugging — hex-dump every byte received from providers. */
|
|
63
64
|
debugStream: boolean;
|
|
@@ -97,6 +98,8 @@ export type Settings = {
|
|
|
97
98
|
sageMemoryInjectThreshold: number;
|
|
98
99
|
/** Register the leader's agent-callable `nextsteps` tool. Default: false. */
|
|
99
100
|
nextStepsTool: boolean;
|
|
101
|
+
/** Leader must end every finished turn with <nextsteps> or the completion marker (`autonomy.nextSteps: 'required'`). Default: true. */
|
|
102
|
+
nextStepsRequired: boolean;
|
|
100
103
|
/** Prompt cache TTL. */
|
|
101
104
|
cacheTtl: CacheTtl;
|
|
102
105
|
/** Where to persist settings: 'global' or 'project'. */
|
package/dist/app-state.d.ts
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import type { AutonomyStage, FleetChatVerbosity } from '@wrongstack/core/types';
|
|
2
|
+
import type { WorktreeTimelineEvent } from '@wrongstack/core/types/worktree-timeline';
|
|
2
3
|
import type { SddBoardSnapshot } from '@wrongstack/sdd';
|
|
3
4
|
import type { PanelState } from './app-panel-state.js';
|
|
4
5
|
import type { GoalSummary, QueueItem } from './app-state-core-types.js';
|
|
@@ -403,6 +404,11 @@ export type State = PanelState & {
|
|
|
403
404
|
worktreeBase?: string | undefined;
|
|
404
405
|
/** True while the worktree monitor overlay is open (Ctrl+T). */
|
|
405
406
|
worktreeMonitorOpen: boolean;
|
|
407
|
+
/**
|
|
408
|
+
* Normalised `worktree.*` lifecycle log (bounded) the monitor projects into
|
|
409
|
+
* its timeline. Unlike `worktrees` it is not pruned on release.
|
|
410
|
+
*/
|
|
411
|
+
worktreeTimeline: WorktreeTimelineEvent[];
|
|
406
412
|
/**
|
|
407
413
|
* AutonomousCoordinator state — live from `subscribeCoordinatorEvents`.
|
|
408
414
|
* Tracks project-level multi-session coordination: goals, tasks, consensus, and knowledge.
|
|
@@ -54,9 +54,8 @@ interface AppViewRuntime {
|
|
|
54
54
|
statusBarWrapRef: MutableRefObject<DOMElement | null>;
|
|
55
55
|
belowStatusBarRef: MutableRefObject<DOMElement | null>;
|
|
56
56
|
/**
|
|
57
|
-
* Measured rows consumed by the status
|
|
58
|
-
*
|
|
59
|
-
* window against the real remaining space instead of a hardcoded guess.
|
|
57
|
+
* Measured rows consumed by the status bar. Picker and monitor overlays
|
|
58
|
+
* reserve this independent chrome when sizing their shared viewport.
|
|
60
59
|
*/
|
|
61
60
|
statusBarRows: number;
|
|
62
61
|
/** Chip click map published by StatusBar; consumed by the mouse hit-test. */
|
|
@@ -1,15 +1,4 @@
|
|
|
1
1
|
import type React from 'react';
|
|
2
|
-
import type
|
|
3
|
-
import type { PanelId } from './ui-contracts.js';
|
|
4
|
-
interface AppViewPickersProps {
|
|
5
|
-
host: AppViewProps['host'];
|
|
6
|
-
runtime: AppViewProps['runtime'];
|
|
7
|
-
mainColumnWidth: number;
|
|
8
|
-
pickerMaxRows: number;
|
|
9
|
-
pickerInputEnabled?: boolean | undefined;
|
|
10
|
-
routedToSidebar: (id: PanelId) => boolean;
|
|
11
|
-
panelPositions: Record<PanelId, 'bottom' | 'sidebar'>;
|
|
12
|
-
}
|
|
2
|
+
import { type AppViewPickersProps } from './app-view-prompts.js';
|
|
13
3
|
export declare function AppViewPickers({ host, runtime, mainColumnWidth, pickerMaxRows, pickerInputEnabled, routedToSidebar, panelPositions, }: AppViewPickersProps): React.ReactElement;
|
|
14
|
-
export {};
|
|
15
4
|
//# sourceMappingURL=app-view-pickers.d.ts.map
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import type React from 'react';
|
|
2
|
+
import type { AppViewProps } from './app-view-contract.js';
|
|
3
|
+
import type { PanelId } from './ui-contracts.js';
|
|
4
|
+
export interface AppViewPickersProps {
|
|
5
|
+
host: AppViewProps['host'];
|
|
6
|
+
runtime: AppViewProps['runtime'];
|
|
7
|
+
mainColumnWidth: number;
|
|
8
|
+
pickerMaxRows: number;
|
|
9
|
+
pickerInputEnabled?: boolean | undefined;
|
|
10
|
+
routedToSidebar: (id: PanelId) => boolean;
|
|
11
|
+
panelPositions: Record<PanelId, 'bottom' | 'sidebar'>;
|
|
12
|
+
}
|
|
13
|
+
/**
|
|
14
|
+
* The modal prompts and overlays layered under the picker column: rewind,
|
|
15
|
+
* Brain and tool confirmations, exit/clear/slash/Esc confirms, fallback,
|
|
16
|
+
* send-mode, refine/enhance flows, continue and bug-hunt panels.
|
|
17
|
+
*/
|
|
18
|
+
export declare function AppViewPrompts({ host, runtime, pickerMaxRows, }: Pick<AppViewPickersProps, 'host' | 'runtime' | 'pickerMaxRows'>): React.ReactElement;
|
|
19
|
+
//# sourceMappingURL=app-view-prompts.d.ts.map
|
|
@@ -1,8 +1,6 @@
|
|
|
1
1
|
import type React from 'react';
|
|
2
2
|
import type { State } from '../app-state.js';
|
|
3
3
|
import type { HistoryEntry } from '../history-entry.js';
|
|
4
|
-
/** Rows the bar always occupies, so the history viewport never jumps. */
|
|
5
|
-
export declare const CHAT_SEARCH_BAR_ROWS = 2;
|
|
6
4
|
interface ChatSearchBarProps {
|
|
7
5
|
search: NonNullable<State['chatSearch']>;
|
|
8
6
|
entries: readonly HistoryEntry[];
|
|
@@ -10,13 +10,6 @@ export declare const MESSAGE_PANEL_BORDER_WIDTH = 1;
|
|
|
10
10
|
* (border glyph + paddingLeft). Exported so tests can assert consistency.
|
|
11
11
|
*/
|
|
12
12
|
export declare const MESSAGE_PANEL_CHROME_WIDTH = 2;
|
|
13
|
-
/**
|
|
14
|
-
* Margin on each side of bordered panels, in columns. Prevents the
|
|
15
|
-
* last character of a full-width line from wrapping at the terminal edge
|
|
16
|
-
* and leaking into scrollback. Content inside the panel is narrower by
|
|
17
|
-
* twice this value (left + right).
|
|
18
|
-
*/
|
|
19
|
-
export declare const MESSAGE_PANEL_MARGIN = 2;
|
|
20
13
|
/**
|
|
21
14
|
* Compute the real inner content width of an assistant panel.
|
|
22
15
|
* termWidth - chrome (border+padding) only — no margin since panels are now full-width.
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
export declare const BANNER_FORMATION_DURATION_MS = 1200;
|
|
2
|
+
/** Reveal the two bitmap pixels in each terminal cell independently. */
|
|
3
|
+
export declare function pixelFormationLine(line: string, row: number, progress: number, columnOffset?: number): string;
|
|
4
|
+
/** A bounded clock owned only by the brand leaf, never by input or history. */
|
|
5
|
+
export declare function useBannerFormation(startedAt: number | undefined): number;
|
|
6
|
+
//# sourceMappingURL=banner-formation.d.ts.map
|
|
@@ -3,11 +3,13 @@ import type { HistoryEntry } from './types.js';
|
|
|
3
3
|
export declare function brandMarkPinkRow(frame: number): 0 | 1;
|
|
4
4
|
export declare const WORDMARK_LINES: ReadonlyArray<string>;
|
|
5
5
|
export declare function bannerGradientColor(position: number, length: number): string;
|
|
6
|
-
export declare function Banner({ entry, termWidth, termHeight, }: {
|
|
6
|
+
export declare function Banner({ entry, termWidth, termHeight, animationStartedAt, }: {
|
|
7
7
|
entry: Extract<HistoryEntry, {
|
|
8
8
|
kind: 'banner';
|
|
9
9
|
}>;
|
|
10
10
|
termWidth?: number;
|
|
11
11
|
termHeight?: number;
|
|
12
|
+
/** Shared boot timestamp; absent for committed native scrollback. */
|
|
13
|
+
animationStartedAt?: number | undefined;
|
|
12
14
|
}): React.ReactElement | null;
|
|
13
15
|
//# sourceMappingURL=banner.d.ts.map
|
|
@@ -1,6 +1,4 @@
|
|
|
1
1
|
export declare function shortenPath(p: string, max: number): string;
|
|
2
|
-
export declare function previewArgs(input: unknown): string;
|
|
3
|
-
export declare function previewOutput(output: string): string;
|
|
4
2
|
export declare function fmtTok(n: number): string;
|
|
5
3
|
export declare function fmtDuration(ms: number): string;
|
|
6
4
|
export declare function fmtBytes(n: number): string;
|
|
@@ -65,15 +65,6 @@ export declare function resolveCopyPayload(hit: CopyHit, entriesById: ReadonlyMa
|
|
|
65
65
|
entryId: number;
|
|
66
66
|
text: string;
|
|
67
67
|
} | null;
|
|
68
|
-
/** Resolve a hit to the inspect overlay payload (title + full body). */
|
|
69
|
-
export declare function resolveInspectPayload(hit: CopyHit, entriesById: ReadonlyMap<number, HistoryEntry>, liveTool?: {
|
|
70
|
-
name: string;
|
|
71
|
-
text: string;
|
|
72
|
-
} | undefined): {
|
|
73
|
-
entryId: number;
|
|
74
|
-
title: string;
|
|
75
|
-
body: string;
|
|
76
|
-
} | null;
|
|
77
68
|
/**
|
|
78
69
|
* Rows clipped from the top of the mounted history stack before it appears in
|
|
79
70
|
* the viewport. Scrolled frames clip by the anchor's row offset; pinned frames
|
|
@@ -13,11 +13,12 @@ export declare function nextStepSweepParts(text: string, deadlineMs: number, now
|
|
|
13
13
|
};
|
|
14
14
|
/** Find the newest rendered panel that owns the armed suggestion label. */
|
|
15
15
|
export declare function findArmedNextStepsEntryId(entries: readonly HistoryEntry[], label: string | null | undefined): number | null;
|
|
16
|
-
export declare const Entry: React.MemoExoticComponent<({ entry, termWidth, termHeight, setSuggestions, autonomyMode, nextStepsAutoSubmitLabel, nextStepsAutoSubmitDeadlineMs, multiDiffSummaryThreshold, todos, showModelReasoning, showSageMemoryInject, toolResultViewMode, }: {
|
|
16
|
+
export declare const Entry: React.MemoExoticComponent<({ entry, termWidth, termHeight, bannerAnimationStartedAt, setSuggestions, autonomyMode, nextStepsAutoSubmitLabel, nextStepsAutoSubmitDeadlineMs, multiDiffSummaryThreshold, todos, showModelReasoning, showSageMemoryInject, toolResultViewMode, }: {
|
|
17
17
|
entry: HistoryEntry;
|
|
18
18
|
termWidth: number;
|
|
19
19
|
/** Available managed-history rows; used by height-aware entries such as the banner. */
|
|
20
20
|
termHeight?: number | undefined;
|
|
21
|
+
bannerAnimationStartedAt?: number | undefined;
|
|
21
22
|
/** Store parsed next steps in the shared suggestion store so /next 1 works. */
|
|
22
23
|
setSuggestions?: ((steps: string[]) => void) | undefined;
|
|
23
24
|
/** Current autonomy mode — when 'auto', first step shows an auto marker. */
|
|
@@ -2,7 +2,7 @@ import type React from 'react';
|
|
|
2
2
|
import type { HistoryProps } from './types.js';
|
|
3
3
|
export { AssistantBody, assistantContentWidth, MESSAGE_PANEL_BORDER_WIDTH, MESSAGE_PANEL_CHROME_WIDTH, splitFencedBlocks, } from './assistant.js';
|
|
4
4
|
export { Banner } from './banner.js';
|
|
5
|
-
export { CodeBlock, DiffBlock, DiffFileBlock, type DiffFilePreview, type DiffLineKind, type DiffLineRow, type DiffPreview, extractDiffPreview, extractMultiFileDiffs, extractReplaceDiffs,
|
|
5
|
+
export { CodeBlock, DiffBlock, DiffFileBlock, type DiffFilePreview, type DiffLineKind, type DiffLineRow, type DiffPreview, extractDiffPreview, extractMultiFileDiffs, extractReplaceDiffs, formatMultiDiffSummary, MULTI_DIFF_MAX_FILES, MULTI_DIFF_MAX_ROWS, MULTI_DIFF_SUMMARY_THRESHOLD, type MultiDiffSummary, parseUnifiedDiff, summarizeMultiFileDiffs, } from './code-block.js';
|
|
6
6
|
export { Entry } from './entry.js';
|
|
7
7
|
export type { AutonomyAgentStatus, BodySegment, HistoryEntry, HistoryProps } from './types.js';
|
|
8
8
|
export { AssistantStreamBox, assistantStreamBoxHeight, countLines, firstNonEmpty, fmtBytes, fmtDuration, fmtTok, formatMatchHit, formatToolArgs, formatToolOutput, formatToolVisualOutput, MAX_STREAM_DISPLAY_CHARS, numOf, scanNumberedRange, shortenPath, streamBoxRows, stringOf, ToolOutputLines, ToolStreamBox, type ToolVisualLine, type ToolVisualLineKind, tailForDisplay, toolStreamBoxHeight, truncMid, tryParseJson, } from './utils.js';
|
|
@@ -33,6 +33,8 @@ export interface HistoryScrollController {
|
|
|
33
33
|
scrollToEntry(entryId: number): boolean;
|
|
34
34
|
/** True while the viewport is scrolled away from the newest output. */
|
|
35
35
|
isScrolled(): boolean;
|
|
36
|
+
/** Replay the logo intro when a cell is inside the visible banner. */
|
|
37
|
+
replayBannerAt?(row: number, col: number): boolean;
|
|
36
38
|
/**
|
|
37
39
|
* True when the viewport cell lands on a copyable card's copy icon. Lets the
|
|
38
40
|
* mouse handler decide synchronously whether to consume the click before
|
|
@@ -133,6 +135,9 @@ export interface HistoryScrollController {
|
|
|
133
135
|
commitSelection(): Promise<boolean>;
|
|
134
136
|
}
|
|
135
137
|
export interface ScrollableHistoryProps extends HistoryProps {
|
|
138
|
+
/** Intro timestamp, retained across viewport remounts until replayed or cleared. */
|
|
139
|
+
bannerAnimationStartedAt?: number | undefined;
|
|
140
|
+
onBannerReplay?: (() => void) | undefined;
|
|
136
141
|
/** Height of the viewport in rows, computed by App from the bottom region. */
|
|
137
142
|
viewportRows: number;
|
|
138
143
|
/** Receives the imperative scroll controller. The component assigns on
|
|
@@ -48,6 +48,8 @@ export declare function buildMountedCardSpans(opts: {
|
|
|
48
48
|
tailRows: number;
|
|
49
49
|
viewportRows: number;
|
|
50
50
|
showModelReasoning?: boolean | undefined;
|
|
51
|
+
/** Include banner hit spans for replay; callers keep these out of selection. */
|
|
52
|
+
includeBanner?: boolean | undefined;
|
|
51
53
|
}): MountedCardSpan[];
|
|
52
54
|
/**
|
|
53
55
|
* Find the card whose viewport row range contains `row`. Pure.
|
|
@@ -2,7 +2,7 @@ import type { TodoItem } from '@wrongstack/core/agent';
|
|
|
2
2
|
import type { Lang } from '../../highlight.js';
|
|
3
3
|
import type { HistoryEntry } from '../../history-entry.js';
|
|
4
4
|
import type { ToolResultViewMode } from '../../tool-result-view-mode.js';
|
|
5
|
-
export type { AutonomyAgentStatus, HistoryEntry,
|
|
5
|
+
export type { AutonomyAgentStatus, HistoryEntry, } from '../../history-entry.js';
|
|
6
6
|
export interface HistoryProps {
|
|
7
7
|
entries: HistoryEntry[];
|
|
8
8
|
/**
|
|
@@ -20,6 +20,10 @@ interface UseHistoryControllerOptions {
|
|
|
20
20
|
mountedGroupSpansRef: {
|
|
21
21
|
current: readonly MountedCardSpan[];
|
|
22
22
|
};
|
|
23
|
+
bannerSpansRef?: {
|
|
24
|
+
current: readonly MountedCardSpan[];
|
|
25
|
+
} | undefined;
|
|
26
|
+
onBannerReplay?: (() => void) | undefined;
|
|
23
27
|
selectionRef: {
|
|
24
28
|
current: {
|
|
25
29
|
anchor: {
|
|
@@ -20,6 +20,13 @@ export type ModelEffortChoice = typeof EFFORT_KEEP | ReasoningEffort;
|
|
|
20
20
|
export interface EffortModelDetail {
|
|
21
21
|
reasoning?: boolean | undefined;
|
|
22
22
|
effortLevels?: readonly string[] | undefined;
|
|
23
|
+
/**
|
|
24
|
+
* Documented "no effort control" — the upstream tri-state
|
|
25
|
+
* `reasoningConfig.effortSupported === false`. Absent means undocumented,
|
|
26
|
+
* which the strip reads as the full canonical set; `effortLevels` absence
|
|
27
|
+
* alone cannot carry this (it is overloaded with "undocumented").
|
|
28
|
+
*/
|
|
29
|
+
effortControlSupported?: false | undefined;
|
|
23
30
|
}
|
|
24
31
|
/**
|
|
25
32
|
* Effort choices for one model, canonical order (weakest → strongest),
|
|
@@ -20,6 +20,12 @@ export interface ProviderOption {
|
|
|
20
20
|
* strip reads as "offer the full canonical set".
|
|
21
21
|
*/
|
|
22
22
|
effortLevels?: readonly string[] | undefined;
|
|
23
|
+
/**
|
|
24
|
+
* Documented "no effort control" (`reasoningConfig.effortSupported
|
|
25
|
+
* === false` upstream): no effort strip even though the model
|
|
26
|
+
* reasons. Absent means undocumented (see `effortLevels`).
|
|
27
|
+
*/
|
|
28
|
+
effortControlSupported?: false | undefined;
|
|
23
29
|
maxContext?: number | undefined;
|
|
24
30
|
maxOutput?: number | undefined;
|
|
25
31
|
inputCost?: number | undefined;
|
|
@@ -20,11 +20,4 @@ export declare const OAUTH_KIND_COLORS: Record<string, string>;
|
|
|
20
20
|
export declare const UI_COLORS: Record<"active" | "border" | "error" | "focused" | "hint" | "inactive" | "selectedModel" | "title" | "warning", string> & {
|
|
21
21
|
dimmed: string | undefined;
|
|
22
22
|
};
|
|
23
|
-
/**
|
|
24
|
-
* Statusline item category colors — imported by status-bar.tsx and
|
|
25
|
-
* statusline-picker.tsx so chips are distinguishable at a glance.
|
|
26
|
-
*
|
|
27
|
-
* Keys match `StatuslineItem` union member names.
|
|
28
|
-
*/
|
|
29
|
-
export declare const STATUSLINE_ITEM_COLORS: Record<string, string>;
|
|
30
23
|
//# sourceMappingURL=provider-colors.d.ts.map
|
|
@@ -1,14 +1,11 @@
|
|
|
1
1
|
import type React from 'react';
|
|
2
|
-
|
|
3
|
-
export { type CopyHit, copyRegistryVisibleClip, findCopyHit, findInspectHit, LIVE_TOOL_STREAM_COPY_ID, liveToolStreamCopyHit, resolveCopyPayload, resolveInspectPayload, SELECTION_COPY_ID, } from './history/copy-geometry.js';
|
|
2
|
+
export { type CopyHit, copyRegistryVisibleClip, findCopyHit, findInspectHit, LIVE_TOOL_STREAM_COPY_ID, liveToolStreamCopyHit, resolveCopyPayload, SELECTION_COPY_ID, } from './history/copy-geometry.js';
|
|
4
3
|
export type { HistoryScrollController } from './history/scroll-controller-types.js';
|
|
5
4
|
export { buildMountedCardSpans, type MountedCardSpan, scrollbarThumb, scrollOffsetForTrackRow, selectionHitAt, } from './history/scrollbar-geometry.js';
|
|
6
|
-
export { Scrollbar } from './history/scrollbar-rail.js';
|
|
7
5
|
export { assembleSelectionText, isOutOfBand, normalizeSelection, type SelectionRect, selectionTouchedEntryIds, } from './history/selection-helpers.js';
|
|
8
6
|
import type { ScrollableHistoryProps } from './history/scroll-controller-types.js';
|
|
9
7
|
/**
|
|
10
8
|
* Bounded history viewport with stable-anchor virtual scrolling.
|
|
11
9
|
*/
|
|
12
|
-
export declare const ScrollableHistory: React.MemoExoticComponent<({ entries, toolStream, streamingText, viewportRows, controllerRef, onScrollInfo, maxWidth, setSuggestions, autonomyMode, nextStepsAutoSubmitLabel, nextStepsAutoSubmitDeadlineMs, multiDiffSummaryThreshold, todos, showModelReasoning, showSageMemoryInject, layoutStore, copiedEntryId, markedEntryId, onRequestOlderEntries, toolResultViewMode, toolResultViewOverrides, onToolResultViewChange, }: ScrollableHistoryProps) => React.ReactElement>;
|
|
13
|
-
export type { HistoryEntry };
|
|
10
|
+
export declare const ScrollableHistory: React.MemoExoticComponent<({ entries, toolStream, streamingText, viewportRows, bannerAnimationStartedAt, onBannerReplay, controllerRef, onScrollInfo, maxWidth, setSuggestions, autonomyMode, nextStepsAutoSubmitLabel, nextStepsAutoSubmitDeadlineMs, multiDiffSummaryThreshold, todos, showModelReasoning, showSageMemoryInject, layoutStore, copiedEntryId, markedEntryId, onRequestOlderEntries, toolResultViewMode, toolResultViewOverrides, onToolResultViewChange, }: ScrollableHistoryProps) => React.ReactElement>;
|
|
14
11
|
//# sourceMappingURL=scrollable-history.d.ts.map
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { ReasoningEffort as CoreReasoningEffort } from '@wrongstack/core/types';
|
|
2
|
-
export {
|
|
2
|
+
export { TOOL_RESULT_VIEW_MODES, } from '../tool-result-view-mode.js';
|
|
3
3
|
/** Selectable presets for the auto-proceed delay, so the field is fully
|
|
4
4
|
* keyboard-cyclable (←/→) instead of needing typed numeric input. */
|
|
5
5
|
export declare const DELAY_PRESETS_MS: number[];
|
|
@@ -29,7 +29,7 @@ export declare const STATUSLINE_MODE_DESCS: Record<StatuslineMode, string>;
|
|
|
29
29
|
export declare const MAX_ITERATIONS_PRESETS: number[];
|
|
30
30
|
/** Presets for max concurrent subagents. 0 = runtime default. */
|
|
31
31
|
export declare const MAX_CONCURRENT_PRESETS: number[];
|
|
32
|
-
/** Presets for auto-proceed max iterations. 0 = unlimited,
|
|
32
|
+
/** Presets for auto-proceed max iterations (also offered by `/nextsteps limit`). 0 = unlimited, the default. */
|
|
33
33
|
export declare const AUTO_PROCEED_MAX_PRESETS: number[];
|
|
34
34
|
/** Presets for prompt refinement preview countdown. */
|
|
35
35
|
export declare const ENHANCE_DELAY_PRESETS: number[];
|
|
@@ -70,7 +70,6 @@ export declare const MODE_DESC: Record<SettingsMode, string>;
|
|
|
70
70
|
export declare const SETTINGS_FIELD_COUNT: number;
|
|
71
71
|
export declare const THINKING_WORD_FIELD = 22;
|
|
72
72
|
export declare const WRONGPROXY_URL_FIELD = 60;
|
|
73
|
-
export declare const MULTI_DIFF_SUMMARY_THRESHOLD_FIELD = 21;
|
|
74
73
|
export declare const THINKING_WORD_PRESETS: readonly ['thinking', 'random', 'working', 'cooking', 'vibing', 'pondering', 'brewing', 'crunching', 'computing', 'grinding', 'noodling', 'churning', 'hacking'];
|
|
75
74
|
export declare const CONFIG_SCOPES: readonly ['global', 'project'];
|
|
76
75
|
export type ConfigScope = (typeof CONFIG_SCOPES)[number];
|