@wrongstack/tui 1.0.1 → 1.0.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +3 -0
- package/dist/app-action-type.d.ts +27 -1
- package/dist/app-key-handler.d.ts +3 -1
- package/dist/app-settings-type.d.ts +3 -0
- package/dist/app-state.d.ts +29 -12
- package/dist/auth-panel-model.d.ts +12 -2
- package/dist/components/history/copy-geometry.d.ts +41 -0
- package/dist/components/history/copy-icon.d.ts +17 -0
- package/dist/components/history/copy-registry.d.ts +2 -0
- package/dist/components/history/entry-helpers.d.ts +7 -15
- package/dist/components/history/entry.d.ts +3 -1
- package/dist/components/history/index.d.ts +1 -1
- package/dist/components/history/sage-memory-block.d.ts +7 -9
- package/dist/components/history/scroll-controller-types.d.ts +16 -1
- package/dist/components/history/scrollbar-rail.d.ts +3 -4
- package/dist/components/history/stream-box.d.ts +7 -0
- package/dist/components/history/tool-card-geometry.d.ts +35 -0
- package/dist/components/history/tool-card.d.ts +3 -1
- package/dist/components/history/tool-entry.d.ts +3 -1
- package/dist/components/history/tool-group.d.ts +5 -3
- package/dist/components/history/types.d.ts +5 -0
- package/dist/components/history/use-history-controller.d.ts +2 -0
- package/dist/components/history/utils.d.ts +2 -2
- package/dist/components/history/visual-lines.d.ts +1 -1
- package/dist/components/history/wrap-geometry.d.ts +4 -4
- package/dist/components/history.d.ts +1 -1
- package/dist/components/input.d.ts +9 -1
- package/dist/components/inspect-overlay.d.ts +30 -0
- package/dist/components/provider-colors.d.ts +1 -1
- package/dist/components/scrollable-history.d.ts +4 -4
- package/dist/components/settings-picker-constants.d.ts +11 -0
- package/dist/components/settings-picker-model.d.ts +8 -0
- package/dist/components/settings-picker.d.ts +4 -7
- package/dist/components/status-bar-icons.d.ts +1 -0
- package/dist/components/status-bar-rails-common.d.ts +14 -6
- package/dist/components/status-bar-rails-safety.d.ts +2 -2
- package/dist/history-entry.d.ts +14 -2
- package/dist/hit-test.d.ts +5 -5
- package/dist/hooks/subagent-history-format.d.ts +12 -0
- package/dist/hooks/use-bug-hunt-loop.d.ts +1 -1
- package/dist/hooks/use-provider-quota.d.ts +32 -0
- package/dist/hooks/use-theme-state.d.ts +3 -9
- package/dist/index.d.ts +1 -1
- package/dist/index.js +3729 -3092
- package/dist/input-key-router.d.ts +1 -1
- package/dist/input-validation/action-types.d.ts +1 -1
- package/dist/reducers/composer.d.ts +1 -1
- package/dist/reducers/conversation.d.ts +1 -1
- package/dist/reducers/dialogs.d.ts +1 -1
- package/dist/reducers/helpers.d.ts +3 -1
- package/dist/settings-contracts.d.ts +4 -0
- package/dist/theme.d.ts +7 -0
- package/dist/tool-result-view-mode.d.ts +8 -0
- package/dist/ui-contracts.d.ts +2 -3
- package/package.json +7 -7
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
export { countLines, firstNonEmpty, fmtBytes, fmtDuration, fmtTok, formatMatchHit, numOf, scanNumberedRange, shortenPath, stringOf, truncMid, tryParseJson, } from './basic-format.js';
|
|
2
2
|
export { AssistantStreamBox, assistantStreamBoxHeight, MAX_STREAM_DISPLAY_CHARS, streamBoxRows, ToolStreamBox, tailForDisplay, toolStreamBoxHeight, } from './stream-box.js';
|
|
3
|
-
export { ToolOutputLines } from './visual-lines.js';
|
|
4
3
|
export type { ToolVisualLine, ToolVisualLineKind } from './tool-visual-types.js';
|
|
4
|
+
export { ToolOutputLines } from './visual-lines.js';
|
|
5
5
|
import type { ToolVisualLine } from './tool-visual-types.js';
|
|
6
|
+
export { extractSageBlock, type ParsedSageMemoryLine, parseSageMemoryLine, resolveEntrySage, type SageSplit, } from './sage-output-format.js';
|
|
6
7
|
export { formatToolArgs } from './tool-arg-format.js';
|
|
7
|
-
export { extractSageBlock, resolveEntrySage, type SageSplit, parseSageMemoryLine, type ParsedSageMemoryLine, } from './sage-output-format.js';
|
|
8
8
|
/**
|
|
9
9
|
* Like `formatToolOutput` but strips SAGE-injected memory lines first.
|
|
10
10
|
* Returns the tool output lines and any SAGE block lines separately.
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type React from 'react';
|
|
2
2
|
import type { ToolVisualLine } from './tool-visual-types.js';
|
|
3
|
-
export declare function ToolOutputLines({ lines,
|
|
3
|
+
export declare function ToolOutputLines({ lines, }: {
|
|
4
4
|
lines: ToolVisualLine[];
|
|
5
5
|
hasFollowingBlock?: boolean | undefined;
|
|
6
6
|
}): React.ReactElement;
|
|
@@ -2,9 +2,9 @@
|
|
|
2
2
|
* Inline render-chrome constants shared by the chat-history renderer.
|
|
3
3
|
*
|
|
4
4
|
* `USER_LABEL` is the inline label entry.tsx renders before a user card's
|
|
5
|
-
* text (`<Text bold
|
|
5
|
+
* text (`<Text bold>▸ USER </Text>` then the text, one Text node) and
|
|
6
6
|
* `INFO_PREFIX` is the inline icon before an info card's text
|
|
7
|
-
* (`<Text
|
|
7
|
+
* (`<Text>· </Text>` then the text). Both live here so entry.tsx consumes
|
|
8
8
|
* the single source (p3) — drift between the render and these constants
|
|
9
9
|
* would silently mis-offset any column math built on them.
|
|
10
10
|
*
|
|
@@ -17,7 +17,7 @@
|
|
|
17
17
|
* assumption both prefixes rely on is pinned by tests/wrap-geometry.test.ts.
|
|
18
18
|
*/
|
|
19
19
|
/** Inline label the renderer places before a user card's text. */
|
|
20
|
-
export declare const USER_LABEL = "\
|
|
20
|
+
export declare const USER_LABEL = "\u25B8 USER ";
|
|
21
21
|
/** Inline icon the renderer places before an info card's text. */
|
|
22
|
-
export declare const INFO_PREFIX = "\
|
|
22
|
+
export declare const INFO_PREFIX = "\u00B7 ";
|
|
23
23
|
//# sourceMappingURL=wrap-geometry.d.ts.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export { AssistantBody, AssistantStreamBox,
|
|
1
|
+
export { AssistantBody, AssistantStreamBox, type AutonomyAgentStatus, assistantContentWidth, assistantStreamBoxHeight, Banner, type BodySegment, CodeBlock, countLines, DiffBlock, DiffFileBlock, type DiffFilePreview, type DiffLineKind, type DiffLineRow, type DiffPreview, Entry, extractDiffPreview, extractMultiFileDiffs, extractReplaceDiffs, firstNonEmpty, fmtBytes, fmtDuration, fmtTok, formatMatchHit, formatMultiDiffSummary, formatToolArgs, formatToolOutput, formatToolVisualOutput, History, type HistoryEntry, type HistoryProps, MAX_STREAM_DISPLAY_CHARS, MESSAGE_PANEL_BORDER_WIDTH, MESSAGE_PANEL_CHROME_WIDTH, MULTI_DIFF_MAX_FILES, MULTI_DIFF_MAX_ROWS, MULTI_DIFF_SUMMARY_THRESHOLD, type MultiDiffSummary, numOf, parseUnifiedDiff, scanNumberedRange, shortenPath, splitFencedBlocks, streamBoxRows, stringOf, summarizeMultiFileDiffs, ToolOutputLines, ToolStreamBox, type ToolVisualLine, type ToolVisualLineKind, tailForDisplay, toolStreamBoxHeight, truncMid, tryParseJson, } from './history/index.js';
|
|
2
2
|
//# sourceMappingURL=history.d.ts.map
|
|
@@ -13,6 +13,14 @@ export interface InputProps {
|
|
|
13
13
|
hint?: string | undefined;
|
|
14
14
|
/** Label embedded in the composer's top rail. */
|
|
15
15
|
title?: string | undefined;
|
|
16
|
+
/** Glyph shown before the title in the top rail (defaults to the brand glyph). */
|
|
17
|
+
railIcon?: string | undefined;
|
|
18
|
+
/**
|
|
19
|
+
* Frame/prompt color override for a special composer mode (e.g. the warn
|
|
20
|
+
* color while bash mode is active). Defaults to the theme brand colors;
|
|
21
|
+
* `disabled` still wins with the error color.
|
|
22
|
+
*/
|
|
23
|
+
accent?: string | undefined;
|
|
16
24
|
/**
|
|
17
25
|
* Right-aligned live status descriptor for the composer's top rail. Renders
|
|
18
26
|
* as an animated {@link ComposerStatusChip} (the thinking word while working,
|
|
@@ -83,5 +91,5 @@ export interface KeyEvent {
|
|
|
83
91
|
fn?: number | undefined;
|
|
84
92
|
}
|
|
85
93
|
export declare const EMPTY_KEY: KeyEvent;
|
|
86
|
-
export declare const Input: React.MemoExoticComponent<({ prompt, value, cursor, disabled, hint, title, status, animationStyle, workingTime, footerHint, hidden, placeholderHeight, onKey, maxWidth, }: InputProps) => React.ReactElement>;
|
|
94
|
+
export declare const Input: React.MemoExoticComponent<({ prompt, value, cursor, disabled, hint, title, railIcon, accent, status, animationStyle, workingTime, footerHint, hidden, placeholderHeight, onKey, maxWidth, }: InputProps) => React.ReactElement>;
|
|
87
95
|
//# sourceMappingURL=input.d.ts.map
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import type React from 'react';
|
|
2
|
+
import type { HistoryEntry } from './history/types.js';
|
|
3
|
+
export declare const INSPECT_OVERLAY_MIN_ROWS = 15;
|
|
4
|
+
export declare function resolveInspectOverlayContent(overlay: {
|
|
5
|
+
entryId: number;
|
|
6
|
+
entryIds?: readonly number[] | undefined;
|
|
7
|
+
}, entries: readonly HistoryEntry[], toolStream: {
|
|
8
|
+
name: string;
|
|
9
|
+
text: string;
|
|
10
|
+
} | null): {
|
|
11
|
+
title: string;
|
|
12
|
+
body: string;
|
|
13
|
+
};
|
|
14
|
+
export declare function wrapInspectLines(text: string, width: number): string[];
|
|
15
|
+
export declare function inspectOverlaySize(termCols: number, viewportRows: number): {
|
|
16
|
+
width: number;
|
|
17
|
+
height: number;
|
|
18
|
+
};
|
|
19
|
+
interface InspectOverlayProps {
|
|
20
|
+
title: string;
|
|
21
|
+
body: string;
|
|
22
|
+
scroll: number;
|
|
23
|
+
termCols: number;
|
|
24
|
+
viewportRows: number;
|
|
25
|
+
onScroll: (delta: number) => void;
|
|
26
|
+
onClose: () => void;
|
|
27
|
+
}
|
|
28
|
+
export declare function InspectOverlay({ title, body, scroll, termCols, viewportRows, onScroll, onClose, }: InspectOverlayProps): React.ReactElement;
|
|
29
|
+
export {};
|
|
30
|
+
//# sourceMappingURL=inspect-overlay.d.ts.map
|
|
@@ -15,7 +15,7 @@ export declare function badgeForKind(kind: 'oauth' | 'api_key' | 'session_token'
|
|
|
15
15
|
label: string;
|
|
16
16
|
color: string;
|
|
17
17
|
} | undefined;
|
|
18
|
-
/**
|
|
18
|
+
/** Brand colors for known OAuth strategies; unknown plugin strategies use the fallback. */
|
|
19
19
|
export declare const OAUTH_KIND_COLORS: Record<string, string>;
|
|
20
20
|
/** Semantic UI colors used across auth / model panels. */
|
|
21
21
|
export declare const UI_COLORS: {
|
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
import type React from 'react';
|
|
2
2
|
import { type HistoryEntry } from './history.js';
|
|
3
|
+
export { type CopyHit, copyRegistryVisibleClip, findCopyHit, findInspectHit, LIVE_TOOL_STREAM_COPY_ID, liveToolStreamCopyHit, resolveCopyPayload, resolveInspectPayload, SELECTION_COPY_ID, } from './history/copy-geometry.js';
|
|
3
4
|
export type { HistoryScrollController } from './history/scroll-controller-types.js';
|
|
4
|
-
export {
|
|
5
|
-
export { type SelectionRect, normalizeSelection, isOutOfBand, selectionTouchedEntryIds, assembleSelectionText, } from './history/selection-helpers.js';
|
|
6
|
-
export { type MountedCardSpan, scrollbarThumb, scrollOffsetForTrackRow, buildMountedCardSpans, selectionHitAt, } from './history/scrollbar-geometry.js';
|
|
5
|
+
export { buildMountedCardSpans, type MountedCardSpan, scrollbarThumb, scrollOffsetForTrackRow, selectionHitAt, } from './history/scrollbar-geometry.js';
|
|
7
6
|
export { Scrollbar } from './history/scrollbar-rail.js';
|
|
7
|
+
export { assembleSelectionText, isOutOfBand, normalizeSelection, type SelectionRect, selectionTouchedEntryIds, } from './history/selection-helpers.js';
|
|
8
8
|
import type { ScrollableHistoryProps } from './history/scroll-controller-types.js';
|
|
9
9
|
/**
|
|
10
10
|
* Bounded history viewport with stable-anchor virtual scrolling.
|
|
11
11
|
*/
|
|
12
|
-
export declare const ScrollableHistory: React.MemoExoticComponent<({ entries, toolStream, streamingText, viewportRows, controllerRef, onScrollInfo, maxWidth, setSuggestions, autonomyMode, multiDiffSummaryThreshold, todos, showModelReasoning, showSageMemoryInject, layoutStore, copiedEntryId, onRequestOlderEntries, }: ScrollableHistoryProps) => React.ReactElement>;
|
|
12
|
+
export declare const ScrollableHistory: React.MemoExoticComponent<({ entries, toolStream, streamingText, viewportRows, controllerRef, onScrollInfo, maxWidth, setSuggestions, autonomyMode, multiDiffSummaryThreshold, todos, showModelReasoning, showSageMemoryInject, layoutStore, copiedEntryId, onRequestOlderEntries, toolResultViewMode, toolResultViewOverrides, onToolResultViewChange, }: ScrollableHistoryProps) => React.ReactElement>;
|
|
13
13
|
export type { HistoryEntry };
|
|
14
14
|
//# sourceMappingURL=scrollable-history.d.ts.map
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import type { ReasoningEffort as CoreReasoningEffort } from '@wrongstack/core/types';
|
|
2
|
+
export { DEFAULT_TOOL_RESULT_VIEW_MODE, TOOL_RESULT_VIEW_MODE_DESCS, TOOL_RESULT_VIEW_MODES, type ToolResultViewMode, } from '../tool-result-view-mode.js';
|
|
2
3
|
/** Selectable presets for the auto-proceed delay, so the field is fully
|
|
3
4
|
* keyboard-cyclable (←/→) instead of needing typed numeric input. */
|
|
4
5
|
export declare const DELAY_PRESETS_MS: number[];
|
|
@@ -43,6 +44,16 @@ export declare const ENHANCE_LANGUAGES: readonly ['original', 'english'];
|
|
|
43
44
|
export type EnhanceLanguage = (typeof ENHANCE_LANGUAGES)[number];
|
|
44
45
|
export declare const TOKEN_SAVING_TIERS: readonly ['auto', 'off', 'minimal', 'light', 'medium', 'aggressive'];
|
|
45
46
|
export type TokenSavingTierTui = (typeof TOKEN_SAVING_TIERS)[number];
|
|
47
|
+
/**
|
|
48
|
+
* Tier descriptions. Every tier moves BOTH halves together - the direct tool
|
|
49
|
+
* surface and the prompt shape - because the host resolves the tier once at
|
|
50
|
+
* boot and hands the same concrete value to the registry and to the prompt
|
|
51
|
+
* builder. `auto` used to be the exception (medium surface, window-resolved
|
|
52
|
+
* prompt); it no longer is.
|
|
53
|
+
*
|
|
54
|
+
* `minimal` and `aggressive` currently select the same Tier-1 tool set; the
|
|
55
|
+
* difference is how hard tool descriptions are trimmed.
|
|
56
|
+
*/
|
|
46
57
|
export declare const TOKEN_SAVING_TIER_DESCS: Record<TokenSavingTierTui, string>;
|
|
47
58
|
export declare const FLEET_CHAT_MODES: readonly ['off', 'full'];
|
|
48
59
|
export type FleetChatVerbosityTui = (typeof FLEET_CHAT_MODES)[number];
|
|
@@ -1,4 +1,7 @@
|
|
|
1
1
|
import type { SettingsPickerPatch } from '../settings-contracts.js';
|
|
2
|
+
import type { ToolResultViewMode } from '../tool-result-view-mode.js';
|
|
3
|
+
export type { ToolResultViewMode } from '../tool-result-view-mode.js';
|
|
4
|
+
export { cycleToolResultViewMode } from '../tool-result-view-mode.js';
|
|
2
5
|
export * from './settings-picker-constants.js';
|
|
3
6
|
export * from './settings-picker-resolver.js';
|
|
4
7
|
/**
|
|
@@ -46,6 +49,11 @@ export declare function formatAllSettingsSummary(values: SettingsPickerValues):
|
|
|
46
49
|
export declare const SAGE_THRESHOLD_PRESETS: number[];
|
|
47
50
|
/** Format the threshold value. All valid values are in {@link SAGE_THRESHOLD_PRESETS}. */
|
|
48
51
|
export declare function formatSageThreshold(t: number): string;
|
|
52
|
+
export declare function toolResultViewSettingRow(mode: ToolResultViewMode): {
|
|
53
|
+
label: string;
|
|
54
|
+
value: string;
|
|
55
|
+
detail: string;
|
|
56
|
+
};
|
|
49
57
|
/**
|
|
50
58
|
* Default values for all configurable settings fields, in the same
|
|
51
59
|
* shape as {@link SettingsPickerValues}. Extracted from the reducer's
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type React from 'react';
|
|
2
|
-
import type { AnimationStyleChoice, AuditLevel, CacheTtl, CompactorStrategy, ConfigScope, ContextMode, EnhanceLanguage, FleetChatVerbosityTui, LogLevel, ReasoningEffort, ReasoningMode, SettingsMode, StatuslineMode, TokenSavingTierTui } from './settings-picker-model.js';
|
|
2
|
+
import type { AnimationStyleChoice, AuditLevel, CacheTtl, CompactorStrategy, ConfigScope, ContextMode, EnhanceLanguage, FleetChatVerbosityTui, LogLevel, ReasoningEffort, ReasoningMode, SettingsMode, StatuslineMode, TokenSavingTierTui, ToolResultViewMode } from './settings-picker-model.js';
|
|
3
3
|
import { type SettingsPickerRowData } from './settings-picker-row-list.js';
|
|
4
4
|
export { SETTINGS_PICKER_JUMP_CHORDS, type SettingsPickerJumpChord, type SettingsPickerJumpMod, settingsPickerJumpByName, settingsPickerJumpField, settingsPickerJumpNames, } from './settings-picker-jumps.js';
|
|
5
5
|
export * from './settings-picker-model.js';
|
|
@@ -66,11 +66,8 @@ export interface SettingsPickerProps {
|
|
|
66
66
|
breakerAutoKillResetMs: number;
|
|
67
67
|
/** Show the "Model Reasoning" blocks in chat history. Default: true. */
|
|
68
68
|
showModelReasoning: boolean;
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
* lower-region FleetPanel is always visible when there is fleet activity;
|
|
72
|
-
* this toggle controls only the sidebar mission queue. Default: 'bottom'.
|
|
73
|
-
*/
|
|
69
|
+
toolResultViewMode: ToolResultViewMode;
|
|
70
|
+
/** Agent swarm placement. */
|
|
74
71
|
showAgentSwarmPanel: import('../app-settings-type.js').AgentSwarmPanelMode;
|
|
75
72
|
/** Right sidebar master toggle. */
|
|
76
73
|
showSidebar?: boolean | undefined;
|
|
@@ -137,5 +134,5 @@ export interface SettingsPickerProps {
|
|
|
137
134
|
fieldRowIndex: readonly number[];
|
|
138
135
|
}) => void) | undefined;
|
|
139
136
|
}
|
|
140
|
-
export declare function SettingsPicker({ field, filter, mode, delayMs, titleAnimation, yolo, fleetChat, chime, confirmExit, nextPrediction, featureMcp, featurePlugins, featureMemory, featureSkills, featureModelsRegistry, tokenSavingTier, allowOutsideProjectRoot, maxIterations, autoProceedMaxIterations, enhanceDelayMs, enhanceEnabled, enhanceLanguage, preRefineSeconds, indexOnStart, multiDiffSummaryThreshold, thinkingWord, thinkingWordEditing, thinkingWordDraft, wrongProxyUrlEditing, wrongProxyUrlDraft, reasoningMode, reasoningEffort, reasoningEffortLevels, reasoningPreserve, cacheTtl, contextAutoCompact, contextStrategy, contextMode, maxConcurrent, logLevel, auditLevel, debugStream, statuslineMode, configScope, profileConfigPath, animationStyle, breakerEnabled, breakerAutoKillResetMs, showModelReasoning, showAgentSwarmPanel, showSidebar, showSageMemoryInject, sageMemoryInjectThreshold, nextStepsTool, readSymbols, panelPositions, wrongProxyEnabled, wrongProxyUrl, inputHeight, hint, onLayoutComputed, }: SettingsPickerProps): React.ReactElement;
|
|
137
|
+
export declare function SettingsPicker({ field, filter, mode, delayMs, titleAnimation, yolo, fleetChat, chime, confirmExit, nextPrediction, featureMcp, featurePlugins, featureMemory, featureSkills, featureModelsRegistry, tokenSavingTier, allowOutsideProjectRoot, maxIterations, autoProceedMaxIterations, enhanceDelayMs, enhanceEnabled, enhanceLanguage, preRefineSeconds, indexOnStart, multiDiffSummaryThreshold, thinkingWord, thinkingWordEditing, thinkingWordDraft, wrongProxyUrlEditing, wrongProxyUrlDraft, reasoningMode, reasoningEffort, reasoningEffortLevels, reasoningPreserve, cacheTtl, contextAutoCompact, contextStrategy, contextMode, maxConcurrent, logLevel, auditLevel, debugStream, statuslineMode, configScope, profileConfigPath, animationStyle, breakerEnabled, breakerAutoKillResetMs, showModelReasoning, toolResultViewMode, showAgentSwarmPanel, showSidebar, showSageMemoryInject, sageMemoryInjectThreshold, nextStepsTool, readSymbols, panelPositions, wrongProxyEnabled, wrongProxyUrl, inputHeight, hint, onLayoutComputed, }: SettingsPickerProps): React.ReactElement;
|
|
141
138
|
//# sourceMappingURL=settings-picker.d.ts.map
|
|
@@ -1,9 +1,10 @@
|
|
|
1
|
-
import type { StatuslineDensity } from
|
|
2
|
-
import type React from
|
|
3
|
-
import type {
|
|
4
|
-
import type {
|
|
5
|
-
import type {
|
|
6
|
-
import type {
|
|
1
|
+
import type { StatuslineDensity } from '@wrongstack/core/statusline';
|
|
2
|
+
import type React from 'react';
|
|
3
|
+
import type { ProviderQuotaChip } from '../hooks/use-provider-quota.js';
|
|
4
|
+
import type { AnimationStyle } from './animation-style.js';
|
|
5
|
+
import type { RailSpanEntry } from './powerline-rail.js';
|
|
6
|
+
import type { FleetAgentDetail, MailboxStatus, StatusBarProps } from './status-bar-types.js';
|
|
7
|
+
import type { StatuslineItem } from './statusline-picker.js';
|
|
7
8
|
export interface StatusBarRailBuildParams {
|
|
8
9
|
showChip: (item: StatuslineItem) => boolean;
|
|
9
10
|
/** Resolved density for a chip ('auto' unless the user pinned one). */
|
|
@@ -38,6 +39,13 @@ export interface StatusBarRailBuildParams {
|
|
|
38
39
|
queueCount?: number | undefined;
|
|
39
40
|
hint?: string | undefined;
|
|
40
41
|
breakerCountdown?: StatusBarProps['breakerCountdown'];
|
|
42
|
+
/**
|
|
43
|
+
* Most-consumed subscription window across every metered provider, or
|
|
44
|
+
* undefined until one has reported. Resolved inside `<StatusBar />` from the
|
|
45
|
+
* provider-neutral quota store, not threaded from app state: the value is
|
|
46
|
+
* push-driven and belongs to no single session.
|
|
47
|
+
*/
|
|
48
|
+
quota?: ProviderQuotaChip | undefined;
|
|
41
49
|
projectName?: string | undefined;
|
|
42
50
|
workingDir?: string | undefined;
|
|
43
51
|
git?: StatusBarProps['git'];
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import type { RailSpanEntry } from
|
|
2
|
-
import { type StatusBarRailBuildParams } from
|
|
1
|
+
import type { RailSpanEntry } from './powerline-rail.js';
|
|
2
|
+
import { type StatusBarRailBuildParams } from './status-bar-rails-common.js';
|
|
3
3
|
/**
|
|
4
4
|
* Standing posture (is this session dangerous? is it throttled?) followed by
|
|
5
5
|
* the work in flight. A reader scans this rail left-to-right to answer
|
package/dist/history-entry.d.ts
CHANGED
|
@@ -117,6 +117,13 @@ export type HistoryEntry = {
|
|
|
117
117
|
ok: boolean;
|
|
118
118
|
input?: unknown | undefined;
|
|
119
119
|
output?: string | undefined;
|
|
120
|
+
/**
|
|
121
|
+
* Canonical result text used only for clipboard operations. `output`
|
|
122
|
+
* belongs to the bounded display cache and may be shortened by history
|
|
123
|
+
* retention or by the visual renderer; this field must keep the exact
|
|
124
|
+
* tool_result content that was sent back to the model.
|
|
125
|
+
*/
|
|
126
|
+
copyOutput?: string | undefined;
|
|
120
127
|
/**
|
|
121
128
|
* SAGE Memory Injector block for this call — `--- SAGE: … ---` header
|
|
122
129
|
* plus one line per injected memory — carried beside `output` because
|
|
@@ -136,8 +143,9 @@ export type HistoryEntry = {
|
|
|
136
143
|
*/
|
|
137
144
|
sageStats?: string | undefined;
|
|
138
145
|
/** Full byte length of the result body the model actually received
|
|
139
|
-
* (post-cap, post-scrub). Carried separately because
|
|
140
|
-
*
|
|
146
|
+
* (post-cap, post-scrub). Carried separately because rendering and
|
|
147
|
+
* display retention may shorten `output`; this is what the model paid
|
|
148
|
+
* for. */
|
|
141
149
|
outputBytes?: number | undefined;
|
|
142
150
|
/** ~3.5 chars/token estimate over `outputBytes`. Cheap to render in
|
|
143
151
|
* the chip; the authoritative count lives in provider.response.usage. */
|
|
@@ -189,6 +197,10 @@ export type HistoryEntry = {
|
|
|
189
197
|
requestTokens?: number | undefined;
|
|
190
198
|
/** The leader run was active when the switch was requested. */
|
|
191
199
|
runActive?: boolean | undefined;
|
|
200
|
+
/** Automatic hop after a failed primary (rate-limit / overload). */
|
|
201
|
+
cause?: 'fallback' | undefined;
|
|
202
|
+
/** HTTP status that triggered a fallback hop, when known. */
|
|
203
|
+
status?: number | undefined;
|
|
192
204
|
} | {
|
|
193
205
|
id: number;
|
|
194
206
|
kind: 'memory-activation';
|
package/dist/hit-test.d.ts
CHANGED
|
@@ -3,7 +3,8 @@
|
|
|
3
3
|
*
|
|
4
4
|
* Ink exposes no absolute terminal coordinates, but the mouse-mode layout is
|
|
5
5
|
* deterministic top-down: the chat history occupies the first `viewportRows`
|
|
6
|
-
* rows of the terminal (its managed
|
|
6
|
+
* rows of the terminal (its managed copy/inspect/scroll rail is the last
|
|
7
|
+
* columns of that band),
|
|
7
8
|
* and everything below it (rows viewportRows+1 .. termRows) is the bottom region
|
|
8
9
|
* — input, pickers, confirm prompt, status bar, panels. That is enough to map a
|
|
9
10
|
* 1-based SGR mouse report (x,y) onto a coarse region without any DOM measuring.
|
|
@@ -39,11 +40,10 @@ type HitRegion =
|
|
|
39
40
|
row: number;
|
|
40
41
|
};
|
|
41
42
|
/**
|
|
42
|
-
* Columns at the right edge of the history viewport reserved for the
|
|
43
|
-
*
|
|
44
|
-
* scrollbar track in the last column.
|
|
43
|
+
* Columns at the right edge of the history viewport reserved for the rail.
|
|
44
|
+
* Layout: copy · gap · inspect · selection band · scrollbar track.
|
|
45
45
|
*/
|
|
46
|
-
export declare const SCROLLBAR_HIT_WIDTH =
|
|
46
|
+
export declare const SCROLLBAR_HIT_WIDTH = 5;
|
|
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
|
/**
|
|
@@ -6,6 +6,18 @@
|
|
|
6
6
|
* - Duration that reads as 12s / 2m 51s rather than 171s
|
|
7
7
|
* - Delegate start shows a tight task preview, not a paragraph
|
|
8
8
|
*/
|
|
9
|
+
/** `provider / model` for history chips. Empty parts are dropped. */
|
|
10
|
+
export declare function formatModelRef(provider: string | undefined, model: string | undefined): string;
|
|
11
|
+
/** One-line subagent fallback hop. */
|
|
12
|
+
export declare function formatSubagentFallbackText(from: {
|
|
13
|
+
providerId?: string | undefined;
|
|
14
|
+
model?: string | undefined;
|
|
15
|
+
} | undefined, to: {
|
|
16
|
+
providerId: string;
|
|
17
|
+
model: string;
|
|
18
|
+
}): string;
|
|
19
|
+
/** One-line recoverable model failure (the hop usually follows). */
|
|
20
|
+
export declare function formatSubagentModelFailedText(description: string | undefined): string;
|
|
9
21
|
/** Format a duration for a history chip. */
|
|
10
22
|
export declare function formatHistoryDuration(ms: number): string;
|
|
11
23
|
/** Collapse whitespace and hard-cap a task/description for a single history line. */
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { Action } from '../app-reducer.js';
|
|
2
|
-
/** Coordinates
|
|
2
|
+
/** Coordinates single-round or explicitly bounded `/bughunt` runs in the TUI. */
|
|
3
3
|
export declare function useBugHuntLoop(dispatch: (action: Action) => void, submit: (command: string) => void, historyGen?: number): {
|
|
4
4
|
onBugHuntStarted: (command: string, totalRounds?: number) => void;
|
|
5
5
|
onRunFinished: (status: 'done' | 'aborted' | 'failed' | 'max_iterations') => void;
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* useProviderQuota — the one quota number a status bar has room for.
|
|
3
|
+
*
|
|
4
|
+
* Subscription-metered providers report their remaining plan budget into the
|
|
5
|
+
* provider-neutral store in `@wrongstack/core/quota`. A statusline chip cannot
|
|
6
|
+
* show every window of every provider, so this hook reduces the store to the
|
|
7
|
+
* single reading that would change what the user does next: the most-consumed
|
|
8
|
+
* window anywhere, with its countdown.
|
|
9
|
+
*
|
|
10
|
+
* It subscribes rather than polling. Quota changes only when a request
|
|
11
|
+
* completes, so a timer would either lag the reading or repaint a quiet
|
|
12
|
+
* terminal for nothing — and this terminal stays quiet by directive.
|
|
13
|
+
*
|
|
14
|
+
* The countdown is deliberately NOT re-rendered every second. A reset is hours
|
|
15
|
+
* away; ticking it once a second would repaint the whole status bar 3,600 times
|
|
16
|
+
* to move one digit. The value is recomputed whenever a new reading lands,
|
|
17
|
+
* which is exactly when it can have meaningfully changed.
|
|
18
|
+
*/
|
|
19
|
+
/** What the chip renders. Absent until some provider has reported. */
|
|
20
|
+
export interface ProviderQuotaChip {
|
|
21
|
+
/** Provider that reported this window, e.g. `openai-codex`. */
|
|
22
|
+
providerId: string;
|
|
23
|
+
/** Window name: `5h`, `7d`, or the provider's own label. */
|
|
24
|
+
windowLabel: string;
|
|
25
|
+
usedPercent: number;
|
|
26
|
+
/** `4h 12m`, when the provider published a reset time. */
|
|
27
|
+
resetIn?: string | undefined;
|
|
28
|
+
/** True when this window is the one currently cutting the account off. */
|
|
29
|
+
reached: boolean;
|
|
30
|
+
}
|
|
31
|
+
export declare function useProviderQuota(): ProviderQuotaChip | undefined;
|
|
32
|
+
//# sourceMappingURL=use-provider-quota.d.ts.map
|
|
@@ -1,14 +1,8 @@
|
|
|
1
1
|
import type { ConfigStore } from '@wrongstack/core/types';
|
|
2
2
|
/**
|
|
3
|
-
* Boot-time theme wiring:
|
|
4
|
-
*
|
|
5
|
-
*
|
|
6
|
-
* into the visible palette immediately.
|
|
7
|
-
*
|
|
8
|
-
* Falls back to the current preset (catppuccin at first mount) if the config
|
|
9
|
-
* has no `themePreset` set — that's the legacy behaviour for users without an
|
|
10
|
-
* explicit choice, and it makes the picker UI immediately meaningful on first
|
|
11
|
-
* run because the active row is highlighted.
|
|
3
|
+
* Boot-time theme wiring: applies a configured `themePreset`, or enters random
|
|
4
|
+
* mode when none is configured. Random mode chooses a palette at startup and
|
|
5
|
+
* rotates it every 15 minutes; a later explicit config update stops rotation.
|
|
12
6
|
*/
|
|
13
7
|
export declare function useThemeState({ configStore }: {
|
|
14
8
|
configStore: ConfigStore | undefined;
|
package/dist/index.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
export type { Settings } from './app.js';
|
|
2
2
|
export { buildGoalPreamble } from './app.js';
|
|
3
|
-
export type { AuthCatalogRow, AuthFlowIo, AuthFlowResult, AuthKeyEdit, AuthKeyRow, AuthLocalPresetRow, AuthModelEdit, AuthOAuthKind, AuthPanelHost, AuthProviderEdit, AuthProviderRow, AuthProviderSetup, } from './auth-panel-model.js';
|
|
3
|
+
export type { AuthCatalogRow, AuthFlowIo, AuthFlowResult, AuthKeyEdit, AuthKeyRow, AuthLocalPresetRow, AuthModelEdit, AuthOAuthKind, AuthOAuthStrategyRow, AuthPanelHost, AuthProviderEdit, AuthProviderRow, AuthProviderSetup, } from './auth-panel-model.js';
|
|
4
4
|
export type { BrainDenyIsTerminal, BrainHeuristicKey, BrainPanelHeuristics, BrainPanelHost, BrainPanelPersona, BrainPanelSettings, BrainPanelVoter, BrainTerminalPolicyValue, BrainTraceContent, } from './brain-panel-model.js';
|
|
5
5
|
export { replaySessionMessages } from './components/history/replay.js';
|
|
6
6
|
export type { ProviderOption } from './components/model-picker.js';
|