@wrongstack/tui 0.306.4 → 0.307.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/app-view-pickers.d.ts +13 -0
- package/dist/app-view-sidebar.d.ts +19 -0
- package/dist/app.d.ts +1 -1
- package/dist/components/context-panel.d.ts +18 -0
- package/dist/components/history/copy-registry.d.ts +28 -0
- package/dist/components/history/entry-helpers.d.ts +63 -0
- package/dist/components/history/entry.d.ts +1 -15
- package/dist/components/history/sage-memory-block.d.ts +44 -0
- package/dist/components/history/tool-entry.d.ts +11 -0
- package/dist/components/history/use-history-controller.d.ts +66 -0
- package/dist/components/scrollable-history.d.ts +0 -24
- package/dist/components/sidebar-content.d.ts +15 -1
- package/dist/components/sidebar-panels-shared.d.ts +20 -0
- package/dist/components/sidebar-panels-task.d.ts +65 -0
- package/dist/components/sidebar-panels-workspace.d.ts +50 -0
- package/dist/components/sidebar-panels.d.ts +3 -139
- package/dist/components/status-bar-icons.d.ts +45 -0
- package/dist/components/status-bar-rails.d.ts +89 -0
- package/dist/components/status-bar.d.ts +1 -2
- package/dist/hooks/use-active-theme.d.ts +1 -1
- package/dist/hooks/use-app-event-bridges.d.ts +46 -0
- package/dist/hooks/use-app-execution-pipeline.d.ts +24 -0
- package/dist/hooks/use-app-panels-state.d.ts +34 -0
- package/dist/hooks/use-app-pipeline-builders.d.ts +101 -0
- package/dist/hooks/use-picker-keys-auth-model.d.ts +4 -0
- package/dist/hooks/use-picker-keys-tools-settings.d.ts +4 -0
- package/dist/hooks/use-session-rewind.d.ts +14 -0
- package/dist/hooks/use-status-sync-interval.d.ts +23 -0
- package/dist/hooks/use-statusbar-view-model.d.ts +25 -1
- package/dist/hooks/use-theme-picker-handler.d.ts +13 -0
- package/dist/index.js +29438 -28740
- package/dist/input-tokens.d.ts +1 -1
- package/dist/memory-slash-gather.d.ts +8 -0
- package/dist/memory-slash-render.d.ts +62 -0
- package/dist/memory-slash-renderers.d.ts +16 -0
- package/dist/memory-slash-types.d.ts +91 -0
- package/dist/memory-slash-write.d.ts +38 -0
- package/dist/theme-presets.d.ts +6 -0
- package/dist/theme-types.d.ts +42 -0
- package/dist/theme-utils.d.ts +63 -0
- package/dist/theme.d.ts +5 -215
- package/package.json +11 -11
|
@@ -0,0 +1,13 @@
|
|
|
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
|
+
routedToSidebar: (id: PanelId) => boolean;
|
|
10
|
+
panelPositions: Record<PanelId, 'bottom' | 'sidebar'>;
|
|
11
|
+
}
|
|
12
|
+
export declare function AppViewPickers({ host, runtime, mainColumnWidth, pickerMaxRows, routedToSidebar, panelPositions, }: AppViewPickersProps): React.ReactElement;
|
|
13
|
+
//# 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
|
+
import type { useSidebarConnections, useSidebarKanban, useSidebarProcessList } from './hooks/use-sidebar-panel-data.js';
|
|
5
|
+
import type { usePlanPanelData } from './components/plan-panel.js';
|
|
6
|
+
export interface AppViewSidebarProps {
|
|
7
|
+
host: AppViewProps['host'];
|
|
8
|
+
runtime: AppViewProps['runtime'];
|
|
9
|
+
sidebarWidth: number;
|
|
10
|
+
sidebarContentWidth: number;
|
|
11
|
+
sidebarSlotVisible: (id: PanelId) => boolean;
|
|
12
|
+
hiddenSidebarPanelCount: number;
|
|
13
|
+
sidebarProcessData: ReturnType<typeof useSidebarProcessList>;
|
|
14
|
+
sidebarConnectionsData: ReturnType<typeof useSidebarConnections>;
|
|
15
|
+
sidebarKanbanData: ReturnType<typeof useSidebarKanban>;
|
|
16
|
+
sidebarPlanData: ReturnType<typeof usePlanPanelData>;
|
|
17
|
+
}
|
|
18
|
+
export declare function AppViewSidebar({ host, runtime, sidebarWidth, sidebarContentWidth, sidebarSlotVisible, hiddenSidebarPanelCount, sidebarProcessData, sidebarConnectionsData, sidebarKanbanData, sidebarPlanData, }: AppViewSidebarProps): React.ReactElement | null;
|
|
19
|
+
//# sourceMappingURL=app-view-sidebar.d.ts.map
|
package/dist/app.d.ts
CHANGED
|
@@ -3,9 +3,9 @@ export { type Action, type FleetEntry, type QueueItem, type ResumeSessionEntry,
|
|
|
3
3
|
export { nextInputWordStart, previousInputWordStart } from './input-editing.js';
|
|
4
4
|
export { renderRunningTools } from './running-tools.js';
|
|
5
5
|
export { selectedSlashCommandLine } from './slash-command-search.js';
|
|
6
|
-
import type { AppProps } from './app-props.js';
|
|
7
6
|
export { buildGoalPreamble } from '@wrongstack/core/execution';
|
|
8
7
|
export type { AppProps } from './app-props.js';
|
|
9
8
|
export { buildSteeringPreamble } from './steering-preamble.js';
|
|
9
|
+
import type { AppProps } from './app-props.js';
|
|
10
10
|
export declare function App(props: AppProps): React.ReactElement;
|
|
11
11
|
//# sourceMappingURL=app.d.ts.map
|
|
@@ -9,6 +9,24 @@ export interface ContextPanelData {
|
|
|
9
9
|
model: string;
|
|
10
10
|
mode: string;
|
|
11
11
|
uptime: string;
|
|
12
|
+
/**
|
|
13
|
+
* Cumulative prompt-cache stats from the per-session TokenCounter.
|
|
14
|
+
* Surfaced in the panel so `/context` answers "how much of my spend
|
|
15
|
+
* is hitting the cache" without asking the user to chase the CLI
|
|
16
|
+
* `/context cache` subcommand.
|
|
17
|
+
*/
|
|
18
|
+
cacheStats?: {
|
|
19
|
+
readTokens: number;
|
|
20
|
+
writeTokens: number;
|
|
21
|
+
hitRatio: number;
|
|
22
|
+
savedUsd: number;
|
|
23
|
+
} | undefined;
|
|
24
|
+
/**
|
|
25
|
+
* How far the cached prefix reaches through the live request, in
|
|
26
|
+
* tokens. Drawn on the per-request coverage meter so users see the
|
|
27
|
+
* exact extent of the cache, not just a percentage.
|
|
28
|
+
*/
|
|
29
|
+
cacheCoverageTokens?: number | undefined;
|
|
12
30
|
/**
|
|
13
31
|
* Real, measured per-category token accounting for the live request. When
|
|
14
32
|
* present the Composition tab shows honest numbers; when absent (no request
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import type { EntryHeightCache } from '../../height-cache.js';
|
|
2
|
+
import type { CopyHit } from './copy-geometry.js';
|
|
3
|
+
import { type RenderGroup } from './tool-group.js';
|
|
4
|
+
export interface CopyRegistry {
|
|
5
|
+
hits: CopyHit[];
|
|
6
|
+
liveHit: CopyHit | null;
|
|
7
|
+
}
|
|
8
|
+
/**
|
|
9
|
+
* Resolve copy icons into the already-reserved scrollbar gap column.
|
|
10
|
+
*
|
|
11
|
+
* Copy affordances must not alter card width: changing the width changes
|
|
12
|
+
* wrapped row counts, which invalidates the prefix sums that map scrollbar
|
|
13
|
+
* positions to virtual entry slices. This helper derives icon rows from the
|
|
14
|
+
* same cached heights used by the mount plan while leaving entry geometry
|
|
15
|
+
* untouched.
|
|
16
|
+
*/
|
|
17
|
+
export declare function buildCopyRegistry(opts: {
|
|
18
|
+
renderGroups: readonly RenderGroup[];
|
|
19
|
+
heightCache: EntryHeightCache;
|
|
20
|
+
scrolled: boolean;
|
|
21
|
+
clip: number;
|
|
22
|
+
tailRows: number;
|
|
23
|
+
viewportRows: number;
|
|
24
|
+
iconCol: number;
|
|
25
|
+
showModelReasoning?: boolean | undefined;
|
|
26
|
+
liveToolVisible: boolean;
|
|
27
|
+
}): CopyRegistry;
|
|
28
|
+
//# sourceMappingURL=copy-registry.d.ts.map
|
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
import type React from 'react';
|
|
2
|
+
import type { HistoryEntry } from './types.js';
|
|
3
|
+
/**
|
|
4
|
+
* Per-memory proof costs two rows each, so an 8-hint run would push a 20-row
|
|
5
|
+
* card into the transcript. Show the top few (the list arrives score-sorted)
|
|
6
|
+
* and count the rest; the side panel keeps the full set.
|
|
7
|
+
*/
|
|
8
|
+
export declare const MAX_MEMORY_PROOF_ROWS = 4;
|
|
9
|
+
/**
|
|
10
|
+
* Render the signed score contributions as `metadata 0.72×0.48 +0.34 │ …`.
|
|
11
|
+
* Uses U+2212 for negatives so a minus is not mistaken for a hyphen inside
|
|
12
|
+
* the labels, which themselves contain `×` and digits.
|
|
13
|
+
*/
|
|
14
|
+
export declare function formatScoreTerms(terms: ReadonlyArray<{
|
|
15
|
+
label: string;
|
|
16
|
+
value: number;
|
|
17
|
+
}>): string;
|
|
18
|
+
export declare function brainStatusStyle(status: Extract<HistoryEntry, {
|
|
19
|
+
kind: 'brain';
|
|
20
|
+
}>['status']): {
|
|
21
|
+
icon: string;
|
|
22
|
+
color: string;
|
|
23
|
+
};
|
|
24
|
+
/**
|
|
25
|
+
* One-line summary of how a council resolved.
|
|
26
|
+
*
|
|
27
|
+
* `distinctTargetCount` is on the headline on purpose: a panel where several
|
|
28
|
+
* seats resolved to the SAME model produces a perfectly normal-looking verdict
|
|
29
|
+
* while adding cost without adding independence, and that is invisible unless
|
|
30
|
+
* the count is shown next to the seat count.
|
|
31
|
+
*/
|
|
32
|
+
export declare function councilHeadline(council: NonNullable<Extract<HistoryEntry, {
|
|
33
|
+
kind: 'brain';
|
|
34
|
+
}>['council']>): string;
|
|
35
|
+
/** One seat's line under the council headline. */
|
|
36
|
+
export declare function councilSeatLine(seat: NonNullable<Extract<HistoryEntry, {
|
|
37
|
+
kind: 'brain';
|
|
38
|
+
}>['council']>['seats'][number]): string;
|
|
39
|
+
export declare function memoryLifecycleStyle(action: Extract<HistoryEntry, {
|
|
40
|
+
kind: 'memory-lifecycle';
|
|
41
|
+
}>['action']): {
|
|
42
|
+
icon: string;
|
|
43
|
+
color: string;
|
|
44
|
+
};
|
|
45
|
+
export declare function brainRiskColor(risk: Extract<HistoryEntry, {
|
|
46
|
+
kind: 'brain';
|
|
47
|
+
}>['risk']): string;
|
|
48
|
+
/**
|
|
49
|
+
* Full-bordered notice card for `warn`/`error` entries. A rounded box with an
|
|
50
|
+
* icon + label header in the accent color and the message body below, wrapped
|
|
51
|
+
* to the terminal width and split across lines so multi-line diagnostics stay
|
|
52
|
+
* readable instead of overflowing a single-line strip. Slash-command output
|
|
53
|
+
* is normalized before it reaches Ink so cursor/control sequences can never
|
|
54
|
+
* paint outside the notice card's measured geometry.
|
|
55
|
+
*/
|
|
56
|
+
export declare function NoticeCard({ icon, label, color, text, termWidth, }: {
|
|
57
|
+
icon: string;
|
|
58
|
+
label: string;
|
|
59
|
+
color: string;
|
|
60
|
+
text: string;
|
|
61
|
+
termWidth: number;
|
|
62
|
+
}): React.ReactElement;
|
|
63
|
+
//# sourceMappingURL=entry-helpers.d.ts.map
|
|
@@ -1,21 +1,7 @@
|
|
|
1
1
|
import type { TodoItem } from '@wrongstack/core/agent';
|
|
2
2
|
import React from 'react';
|
|
3
3
|
import type { HistoryEntry } from './types.js';
|
|
4
|
-
|
|
5
|
-
* One-line summary of how a council resolved.
|
|
6
|
-
*
|
|
7
|
-
* `distinctTargetCount` is on the headline on purpose: a panel where several
|
|
8
|
-
* seats resolved to the SAME model produces a perfectly normal-looking verdict
|
|
9
|
-
* while adding cost without adding independence, and that is invisible unless
|
|
10
|
-
* the count is shown next to the seat count.
|
|
11
|
-
*/
|
|
12
|
-
export declare function councilHeadline(council: NonNullable<Extract<HistoryEntry, {
|
|
13
|
-
kind: 'brain';
|
|
14
|
-
}>['council']>): string;
|
|
15
|
-
/** One seat's line under the council headline. */
|
|
16
|
-
export declare function councilSeatLine(seat: NonNullable<Extract<HistoryEntry, {
|
|
17
|
-
kind: 'brain';
|
|
18
|
-
}>['council']>['seats'][number]): string;
|
|
4
|
+
export { councilHeadline, councilSeatLine } from './entry-helpers.js';
|
|
19
5
|
export declare const Entry: React.MemoExoticComponent<({ entry, termWidth, termHeight, setSuggestions, autonomyMode, multiDiffSummaryThreshold, todos, showModelReasoning, showSageMemoryInject, }: {
|
|
20
6
|
entry: HistoryEntry;
|
|
21
7
|
termWidth: number;
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
import type React from 'react';
|
|
2
|
+
import { type ParsedSageMemoryLine } from './utils.js';
|
|
3
|
+
/**
|
|
4
|
+
* Compact magenta-bordered panel rendering SAGE memory-injection lines
|
|
5
|
+
* appended to a tool result. Renders nothing when `sageLines` is empty.
|
|
6
|
+
*
|
|
7
|
+
* Layout:
|
|
8
|
+
*
|
|
9
|
+
* ┌ 🧠 SAGE MEMORY INJECTED · <tool> N memories ────────────────┐
|
|
10
|
+
* │ [kind][importance] │
|
|
11
|
+
* │ text body (wrapped to panel width) │
|
|
12
|
+
* │ id: mem_… anchor: pkg/path relation: about_file │
|
|
13
|
+
* │ tags: t1, t2, t3 │
|
|
14
|
+
* │ [next memory …] │
|
|
15
|
+
* └────────────────────────────────────────────────────────────────────┘
|
|
16
|
+
*
|
|
17
|
+
* Each memory is parsed by `parseSageMemoryLine` and rendered as key/value
|
|
18
|
+
* rows instead of the raw `[kind] <memory id="…">text</memory> (anchor) […]`
|
|
19
|
+
* blob. Lines that fail to parse fall back to the literal text so a future
|
|
20
|
+
* SAGE format change cannot silently drop data.
|
|
21
|
+
*/
|
|
22
|
+
export declare function SageMemoryBlock({ sageLines, toolName, stats, compact, }: {
|
|
23
|
+
sageLines?: string[] | undefined;
|
|
24
|
+
toolName: string;
|
|
25
|
+
stats?: string | undefined;
|
|
26
|
+
/**
|
|
27
|
+
* Compact (opt-in): one magenta chip with count + first preview.
|
|
28
|
+
* Full (default): bordered panel with every memory row. The bordered form
|
|
29
|
+
* is the canonical SAGE surface and is asserted by every render test in
|
|
30
|
+
* `tests/glob-sage-render.test.tsx` and `tests/sage-memory-block-render.test.tsx`.
|
|
31
|
+
*/
|
|
32
|
+
compact?: boolean | undefined;
|
|
33
|
+
}): React.ReactElement | null;
|
|
34
|
+
/** One parsed memory, rendered as a structured key/value row block. */
|
|
35
|
+
export declare function SageMemoryRow({ parsed, index, }: {
|
|
36
|
+
parsed: ParsedSageMemoryLine;
|
|
37
|
+
index: number;
|
|
38
|
+
}): React.ReactElement;
|
|
39
|
+
/** Compact key/value row used inside `SageMemoryRow`. */
|
|
40
|
+
export declare function SageKv({ label, value }: {
|
|
41
|
+
label: string;
|
|
42
|
+
value: string;
|
|
43
|
+
}): React.ReactElement;
|
|
44
|
+
//# sourceMappingURL=sage-memory-block.d.ts.map
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import type { HistoryEntry } from './types.js';
|
|
3
|
+
export declare function ToolEntry({ entry, termWidth, multiDiffSummaryThreshold, showSageMemoryInject, }: {
|
|
4
|
+
entry: Extract<HistoryEntry, {
|
|
5
|
+
kind: 'tool';
|
|
6
|
+
}>;
|
|
7
|
+
termWidth: number;
|
|
8
|
+
multiDiffSummaryThreshold?: number | undefined;
|
|
9
|
+
showSageMemoryInject?: boolean | undefined;
|
|
10
|
+
}): React.ReactElement;
|
|
11
|
+
//# sourceMappingURL=tool-entry.d.ts.map
|
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
import { type ScrollAnchor, type ScrollGeometry } from '../../scroll-anchor.js';
|
|
2
|
+
import type { CopyHit } from './copy-geometry.js';
|
|
3
|
+
import type { MountedCardSpan } from './scrollbar-geometry.js';
|
|
4
|
+
import type { HistoryScrollController } from './scroll-controller-types.js';
|
|
5
|
+
import type { HistoryEntry } from './types.js';
|
|
6
|
+
export interface UseHistoryControllerOptions {
|
|
7
|
+
geometry: ScrollGeometry;
|
|
8
|
+
effectiveAnchor: ScrollAnchor | null;
|
|
9
|
+
groupIds: readonly number[];
|
|
10
|
+
termWidth: number;
|
|
11
|
+
vp: number;
|
|
12
|
+
copyHitsRef: {
|
|
13
|
+
current: CopyHit[];
|
|
14
|
+
};
|
|
15
|
+
liveToolCopyHitRef: {
|
|
16
|
+
current: CopyHit | null;
|
|
17
|
+
};
|
|
18
|
+
mountedGroupSpansRef: {
|
|
19
|
+
current: readonly MountedCardSpan[];
|
|
20
|
+
};
|
|
21
|
+
selectionRef: {
|
|
22
|
+
current: {
|
|
23
|
+
anchor: {
|
|
24
|
+
row: number;
|
|
25
|
+
col: number;
|
|
26
|
+
} | null;
|
|
27
|
+
head: {
|
|
28
|
+
row: number;
|
|
29
|
+
col: number;
|
|
30
|
+
} | null;
|
|
31
|
+
inProgress: boolean;
|
|
32
|
+
};
|
|
33
|
+
};
|
|
34
|
+
entriesByIdRef: {
|
|
35
|
+
current: Map<number, HistoryEntry>;
|
|
36
|
+
};
|
|
37
|
+
toolStreamRef: {
|
|
38
|
+
current: {
|
|
39
|
+
name: string;
|
|
40
|
+
text: string;
|
|
41
|
+
startedAt: number;
|
|
42
|
+
} | null | undefined;
|
|
43
|
+
};
|
|
44
|
+
setAnchor: (anchor: {
|
|
45
|
+
id: number;
|
|
46
|
+
clip: number;
|
|
47
|
+
} | null) => void;
|
|
48
|
+
setMountBump: (bump: number) => void;
|
|
49
|
+
controllerRef?: {
|
|
50
|
+
current: HistoryScrollController | null;
|
|
51
|
+
} | undefined;
|
|
52
|
+
}
|
|
53
|
+
export declare function useHistoryController(opts: UseHistoryControllerOptions): {
|
|
54
|
+
controller: HistoryScrollController;
|
|
55
|
+
applyAnchor: (next: ScrollAnchor | null) => void;
|
|
56
|
+
effectiveAnchorRef: {
|
|
57
|
+
current: ScrollAnchor | null;
|
|
58
|
+
};
|
|
59
|
+
geometryRef: {
|
|
60
|
+
current: ScrollGeometry;
|
|
61
|
+
};
|
|
62
|
+
groupIdsRef: {
|
|
63
|
+
current: readonly number[];
|
|
64
|
+
};
|
|
65
|
+
};
|
|
66
|
+
//# sourceMappingURL=use-history-controller.d.ts.map
|
|
@@ -8,30 +8,6 @@ export { Scrollbar } from './history/scrollbar-rail.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
|
-
*
|
|
12
|
-
* Instead of streaming entries into the terminal's native scrollback via
|
|
13
|
-
* `<Static>`, retained entries render into a fixed-height `overflowY:'hidden'`
|
|
14
|
-
* viewport the app scrolls itself. Wheel, PageUp/PageDown, and Ctrl+U/D scroll
|
|
15
|
-
* it in every mode; full mouse mode additionally enables scrollbar interaction.
|
|
16
|
-
* All paths use the {@link HistoryScrollController} this component owns.
|
|
17
|
-
*
|
|
18
|
-
* Positioning model (Ink-7 verified against real yoga layout):
|
|
19
|
-
* - Pinned (`anchor:null`): `justifyContent:'flex-end'` + enough trailing
|
|
20
|
-
* groups mounted to overfill the viewport. Ink clips the overflow at the
|
|
21
|
-
* TOP, so the newest output hugs the input line with zero position math.
|
|
22
|
-
* - Scrolled: wheel, page keys, and scrollbar gestures all resolve to the
|
|
23
|
-
* render-group id at the viewport top plus a row clipped inside that group.
|
|
24
|
-
* Groups mount from that stable anchor and `marginTop:-clip` hides preceding
|
|
25
|
-
* rows. Height corrections above the anchor can refine the scrollbar extent
|
|
26
|
-
* without changing which content is visible.
|
|
27
|
-
*
|
|
28
|
-
* The {@link EntryHeightCache} seeds the global row space and decides how many
|
|
29
|
-
* groups to mount. A post-render `measureElement` pass promotes mounted groups
|
|
30
|
-
* to real heights and persists them. Only the mounted virtual window is
|
|
31
|
-
* measured; a long transcript is never mounted wholesale for calibration.
|
|
32
|
-
*
|
|
33
|
-
* Wrapped in `React.memo` so keystrokes in the input buffer don't trigger a
|
|
34
|
-
* full managed-viewport re-layout.
|
|
35
11
|
*/
|
|
36
12
|
export declare const ScrollableHistory: React.MemoExoticComponent<({ entries, toolStream, viewportRows, controllerRef, onScrollInfo, maxWidth, setSuggestions, autonomyMode, multiDiffSummaryThreshold, todos, showModelReasoning, showSageMemoryInject, layoutStore, copiedEntryId, onRequestOlderEntries, }: ScrollableHistoryProps) => React.ReactElement>;
|
|
37
13
|
export type { HistoryEntry };
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import type { TodoItem } from '@wrongstack/core/agent';
|
|
2
|
+
import type { CacheStats } from '@wrongstack/core/types';
|
|
2
3
|
import type { ContextBreakdown } from '@wrongstack/core/utils';
|
|
3
4
|
import type React from 'react';
|
|
4
5
|
import type { ResumeSessionEntry } from '../app-state.js';
|
|
@@ -13,6 +14,19 @@ export interface SidebarContentProps {
|
|
|
13
14
|
} | undefined;
|
|
14
15
|
/** Honest per-category accounting behind the context window display. */
|
|
15
16
|
contextBreakdown?: ContextBreakdown | undefined;
|
|
17
|
+
/**
|
|
18
|
+
* Live prompt-cache hit ratio + token counts for the sidebar card.
|
|
19
|
+
* Surfaced so a user staring at the right rail can see how much of
|
|
20
|
+
* the spend is hitting the prompt cache without opening `/context`.
|
|
21
|
+
*/
|
|
22
|
+
cacheStats?: CacheStats | undefined;
|
|
23
|
+
/**
|
|
24
|
+
* How far the cached prefix reaches into the live request, in tokens.
|
|
25
|
+
* Drawn as an overlay marker on the context-window spectrum bar so
|
|
26
|
+
* "exactly how far the cache extends" is answerable at a glance.
|
|
27
|
+
* Zero hides the marker — no prompt cached this request.
|
|
28
|
+
*/
|
|
29
|
+
cacheCoverageTokens?: number | undefined;
|
|
16
30
|
/** Fleet entries (leader + subagents) from useStatusbarViewModel. */
|
|
17
31
|
entries: Record<string, FleetEntry>;
|
|
18
32
|
/** Fleet counts summary. */
|
|
@@ -88,6 +102,6 @@ export declare function contextSpectrum(breakdown: ContextBreakdown | undefined,
|
|
|
88
102
|
} | undefined, width: number): Array<ContextSegment & {
|
|
89
103
|
cells: number;
|
|
90
104
|
}>;
|
|
91
|
-
export declare function SidebarContent({ contextWindow, contextBreakdown, entries, fleetCounts, provider, model, width, scrollOffset, focused, todos, showSwarmSection, liveSessions, resumeSessions, currentSessionId, processMemory, cpuPercent, cpuHistory, rssHistory, heapHistory, totalMem, }: SidebarContentProps): React.ReactElement;
|
|
105
|
+
export declare function SidebarContent({ contextWindow, contextBreakdown, cacheStats, cacheCoverageTokens, entries, fleetCounts, provider, model, width, scrollOffset, focused, todos, showSwarmSection, liveSessions, resumeSessions, currentSessionId, processMemory, cpuPercent, cpuHistory, rssHistory, heapHistory, totalMem, }: SidebarContentProps): React.ReactElement;
|
|
92
106
|
export {};
|
|
93
107
|
//# sourceMappingURL=sidebar-content.d.ts.map
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import type React from 'react';
|
|
2
|
+
import type { FleetEntry } from '../app-state.js';
|
|
3
|
+
export declare function fleetStatusVisual(status: FleetEntry['status']): {
|
|
4
|
+
glyph: string;
|
|
5
|
+
color: string;
|
|
6
|
+
};
|
|
7
|
+
export declare function liveSessionGlyph(status: string): string;
|
|
8
|
+
export declare function liveSessionColor(status: string): string;
|
|
9
|
+
export declare function fmtRelative(iso: string | undefined, now?: number): string;
|
|
10
|
+
export declare function fmtShortDuration(ms: number): string;
|
|
11
|
+
export declare function SidebarWorklistRow({ icon, iconColor, label, labelColor, innerWidth, dim, strikethrough, }: {
|
|
12
|
+
icon: string;
|
|
13
|
+
iconColor: string;
|
|
14
|
+
label: string;
|
|
15
|
+
labelColor: string;
|
|
16
|
+
innerWidth: number;
|
|
17
|
+
dim?: boolean | undefined;
|
|
18
|
+
strikethrough?: boolean | undefined;
|
|
19
|
+
}): React.ReactElement;
|
|
20
|
+
//# sourceMappingURL=sidebar-panels-shared.d.ts.map
|
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
import type { TodoItem } from '@wrongstack/core/agent';
|
|
2
|
+
import type React from 'react';
|
|
3
|
+
import type { GoalSummary, ResumeSessionEntry } from '../app-state.js';
|
|
4
|
+
import type { QueueItem } from '../app-state-core-types.js';
|
|
5
|
+
import type { LiveSessionEntry } from './sessions-panel.js';
|
|
6
|
+
export interface PlanPanelSidebarProps {
|
|
7
|
+
openCount: number;
|
|
8
|
+
inProgressCount: number;
|
|
9
|
+
doneCount: number;
|
|
10
|
+
items: readonly {
|
|
11
|
+
id: string;
|
|
12
|
+
title: string;
|
|
13
|
+
status: 'open' | 'in_progress' | 'done';
|
|
14
|
+
}[];
|
|
15
|
+
title?: string | undefined;
|
|
16
|
+
width: number;
|
|
17
|
+
}
|
|
18
|
+
export declare function PlanPanelSidebar({ openCount, inProgressCount, doneCount, items, title, width, }: PlanPanelSidebarProps): React.ReactElement;
|
|
19
|
+
export interface TodosPanelSidebarProps {
|
|
20
|
+
todos: readonly TodoItem[];
|
|
21
|
+
width: number;
|
|
22
|
+
}
|
|
23
|
+
export declare function TodosPanelSidebar({ todos, width }: TodosPanelSidebarProps): React.ReactElement;
|
|
24
|
+
export interface QueuePanelSidebarProps {
|
|
25
|
+
items: readonly QueueItem[];
|
|
26
|
+
width: number;
|
|
27
|
+
}
|
|
28
|
+
export declare function QueuePanelSidebar({ items, width }: QueuePanelSidebarProps): React.ReactElement;
|
|
29
|
+
export interface ProcessListPanelSidebarProps {
|
|
30
|
+
activeCount: number;
|
|
31
|
+
totalCount: number;
|
|
32
|
+
processes: readonly {
|
|
33
|
+
pid: number;
|
|
34
|
+
name: string;
|
|
35
|
+
status?: string;
|
|
36
|
+
}[];
|
|
37
|
+
width: number;
|
|
38
|
+
}
|
|
39
|
+
export declare function ProcessListPanelSidebar({ activeCount, totalCount, processes, width, }: ProcessListPanelSidebarProps): React.ReactElement;
|
|
40
|
+
export interface GoalPanelSidebarProps {
|
|
41
|
+
goal: GoalSummary | null;
|
|
42
|
+
coordinatorRunning: boolean;
|
|
43
|
+
width: number;
|
|
44
|
+
}
|
|
45
|
+
export declare function GoalPanelSidebar({ goal, coordinatorRunning, width, }: GoalPanelSidebarProps): React.ReactElement;
|
|
46
|
+
export interface SessionsPanelSidebarProps {
|
|
47
|
+
liveSessions?: readonly LiveSessionEntry[] | undefined;
|
|
48
|
+
resumeSessions?: readonly ResumeSessionEntry[] | undefined;
|
|
49
|
+
currentSessionId?: string | undefined;
|
|
50
|
+
now?: number | undefined;
|
|
51
|
+
width: number;
|
|
52
|
+
}
|
|
53
|
+
export declare function SessionsPanelSidebar({ liveSessions, resumeSessions, currentSessionId, now, width, }: SessionsPanelSidebarProps): React.ReactElement;
|
|
54
|
+
export interface KanbanPanelSidebarProps {
|
|
55
|
+
columns: readonly {
|
|
56
|
+
name: string;
|
|
57
|
+
count: number;
|
|
58
|
+
wip?: number;
|
|
59
|
+
}[];
|
|
60
|
+
totalActive: number;
|
|
61
|
+
activeCardTitles: readonly string[];
|
|
62
|
+
width: number;
|
|
63
|
+
}
|
|
64
|
+
export declare function KanbanPanelSidebar({ columns, totalActive, activeCardTitles, width, }: KanbanPanelSidebarProps): React.ReactElement;
|
|
65
|
+
//# sourceMappingURL=sidebar-panels-task.d.ts.map
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
import type React from 'react';
|
|
2
|
+
import type { FleetEntry } from '../app-state.js';
|
|
3
|
+
import type { WorktreeRow } from '../ui-contracts.js';
|
|
4
|
+
import type { ProjectPickerItem } from './project-picker.js';
|
|
5
|
+
export interface ProjectPickerSidebarProps {
|
|
6
|
+
items: readonly ProjectPickerItem[];
|
|
7
|
+
selected: number;
|
|
8
|
+
filter: string;
|
|
9
|
+
hint?: string | undefined;
|
|
10
|
+
currentProject?: string | undefined;
|
|
11
|
+
width: number;
|
|
12
|
+
}
|
|
13
|
+
export declare function ProjectPickerSidebar({ items, selected, filter, hint, currentProject, width, }: ProjectPickerSidebarProps): React.ReactElement;
|
|
14
|
+
export interface FleetPanelSidebarProps {
|
|
15
|
+
entries: Record<string, FleetEntry>;
|
|
16
|
+
runningCount: number;
|
|
17
|
+
width: number;
|
|
18
|
+
}
|
|
19
|
+
export declare function FleetPanelSidebar({ entries, runningCount, width, }: FleetPanelSidebarProps): React.ReactElement;
|
|
20
|
+
export interface AgentsPanelSidebarProps {
|
|
21
|
+
entries: Record<string, FleetEntry>;
|
|
22
|
+
totalCost: number;
|
|
23
|
+
nowTick: number;
|
|
24
|
+
width: number;
|
|
25
|
+
}
|
|
26
|
+
export declare function AgentsPanelSidebar({ entries, totalCost, nowTick, width, }: AgentsPanelSidebarProps): React.ReactElement;
|
|
27
|
+
export interface WorktreePanelSidebarProps {
|
|
28
|
+
worktrees: Record<string, WorktreeRow>;
|
|
29
|
+
width: number;
|
|
30
|
+
}
|
|
31
|
+
export declare function WorktreePanelSidebar({ worktrees, width, }: WorktreePanelSidebarProps): React.ReactElement;
|
|
32
|
+
export interface CoordinatorPanelSidebarProps {
|
|
33
|
+
running: boolean;
|
|
34
|
+
activePhases: number;
|
|
35
|
+
completedPhases: number;
|
|
36
|
+
phaseNames: readonly string[];
|
|
37
|
+
elapsedMs: number;
|
|
38
|
+
width: number;
|
|
39
|
+
}
|
|
40
|
+
export declare function CoordinatorPanelSidebar({ running, activePhases, completedPhases, phaseNames, elapsedMs, width, }: CoordinatorPanelSidebarProps): React.ReactElement;
|
|
41
|
+
export interface ConnectionsPanelSidebarProps {
|
|
42
|
+
connections: readonly {
|
|
43
|
+
name: string;
|
|
44
|
+
status: 'ok' | 'warn' | 'down' | 'unknown';
|
|
45
|
+
latencyMs?: number | undefined;
|
|
46
|
+
}[];
|
|
47
|
+
width: number;
|
|
48
|
+
}
|
|
49
|
+
export declare function ConnectionsPanelSidebar({ connections, width, }: ConnectionsPanelSidebarProps): React.ReactElement;
|
|
50
|
+
//# sourceMappingURL=sidebar-panels-workspace.d.ts.map
|
|
@@ -1,140 +1,4 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
import type { QueueItem } from '../app-state-core-types.js';
|
|
5
|
-
import type { WorktreeRow } from '../ui-contracts.js';
|
|
6
|
-
import type { ProjectPickerItem } from './project-picker.js';
|
|
7
|
-
import type { LiveSessionEntry } from './sessions-panel.js';
|
|
8
|
-
export interface ProjectPickerSidebarProps {
|
|
9
|
-
/** Already-filtered picker items. Navigation indices target this list directly. */
|
|
10
|
-
items: readonly ProjectPickerItem[];
|
|
11
|
-
/** Index into `items`. */
|
|
12
|
-
selected: number;
|
|
13
|
-
/** Current filter text. */
|
|
14
|
-
filter: string;
|
|
15
|
-
/** Optional status/error hint shown below the list. */
|
|
16
|
-
hint?: string | undefined;
|
|
17
|
-
/** Current project name to highlight. */
|
|
18
|
-
currentProject?: string | undefined;
|
|
19
|
-
/** Width of the sidebar in columns. */
|
|
20
|
-
width: number;
|
|
21
|
-
}
|
|
22
|
-
export declare function ProjectPickerSidebar({ items, selected, filter, hint, currentProject, width, }: ProjectPickerSidebarProps): React.ReactElement;
|
|
23
|
-
export interface FleetPanelSidebarProps {
|
|
24
|
-
entries: Record<string, FleetEntry>;
|
|
25
|
-
/** Active (running) subagent count. */
|
|
26
|
-
runningCount: number;
|
|
27
|
-
/** Width of the sidebar in columns. */
|
|
28
|
-
width: number;
|
|
29
|
-
}
|
|
30
|
-
export declare function FleetPanelSidebar({ entries, runningCount, width, }: FleetPanelSidebarProps): React.ReactElement;
|
|
31
|
-
export interface AgentsPanelSidebarProps {
|
|
32
|
-
entries: Record<string, FleetEntry>;
|
|
33
|
-
totalCost: number;
|
|
34
|
-
nowTick: number;
|
|
35
|
-
width: number;
|
|
36
|
-
}
|
|
37
|
-
export declare function AgentsPanelSidebar({ entries, totalCost, nowTick, width, }: AgentsPanelSidebarProps): React.ReactElement;
|
|
38
|
-
export interface WorktreePanelSidebarProps {
|
|
39
|
-
worktrees: Record<string, WorktreeRow>;
|
|
40
|
-
/** Width of the sidebar in columns. */
|
|
41
|
-
width: number;
|
|
42
|
-
}
|
|
43
|
-
export declare function WorktreePanelSidebar({ worktrees, width, }: WorktreePanelSidebarProps): React.ReactElement;
|
|
44
|
-
export interface PlanPanelSidebarProps {
|
|
45
|
-
/** Plan items grouped by status. */
|
|
46
|
-
openCount: number;
|
|
47
|
-
inProgressCount: number;
|
|
48
|
-
doneCount: number;
|
|
49
|
-
/** Up to N plan item titles to display. */
|
|
50
|
-
items: readonly {
|
|
51
|
-
id: string;
|
|
52
|
-
title: string;
|
|
53
|
-
status: 'open' | 'in_progress' | 'done';
|
|
54
|
-
}[];
|
|
55
|
-
/** Title of the plan (if any). */
|
|
56
|
-
title?: string | undefined;
|
|
57
|
-
width: number;
|
|
58
|
-
}
|
|
59
|
-
export declare function PlanPanelSidebar({ openCount, inProgressCount, doneCount, items, title, width, }: PlanPanelSidebarProps): React.ReactElement;
|
|
60
|
-
export interface TodosPanelSidebarProps {
|
|
61
|
-
todos: readonly TodoItem[];
|
|
62
|
-
width: number;
|
|
63
|
-
}
|
|
64
|
-
export declare function TodosPanelSidebar({ todos, width }: TodosPanelSidebarProps): React.ReactElement;
|
|
65
|
-
export interface QueuePanelSidebarProps {
|
|
66
|
-
items: readonly QueueItem[];
|
|
67
|
-
width: number;
|
|
68
|
-
}
|
|
69
|
-
export declare function QueuePanelSidebar({ items, width }: QueuePanelSidebarProps): React.ReactElement;
|
|
70
|
-
export interface ProcessListPanelSidebarProps {
|
|
71
|
-
/** Active process count and a few process summaries. */
|
|
72
|
-
activeCount: number;
|
|
73
|
-
/** Total process count. */
|
|
74
|
-
totalCount: number;
|
|
75
|
-
/** Up to 8 process rows: name + pid. */
|
|
76
|
-
processes: readonly {
|
|
77
|
-
pid: number;
|
|
78
|
-
name: string;
|
|
79
|
-
status?: string;
|
|
80
|
-
}[];
|
|
81
|
-
width: number;
|
|
82
|
-
}
|
|
83
|
-
export declare function ProcessListPanelSidebar({ activeCount, totalCount, processes, width, }: ProcessListPanelSidebarProps): React.ReactElement;
|
|
84
|
-
export interface GoalPanelSidebarProps {
|
|
85
|
-
goal: GoalSummary | null;
|
|
86
|
-
coordinatorRunning: boolean;
|
|
87
|
-
width: number;
|
|
88
|
-
}
|
|
89
|
-
export declare function GoalPanelSidebar({ goal, coordinatorRunning, width, }: GoalPanelSidebarProps): React.ReactElement;
|
|
90
|
-
export interface SessionsPanelSidebarProps {
|
|
91
|
-
liveSessions?: readonly LiveSessionEntry[] | undefined;
|
|
92
|
-
resumeSessions?: readonly ResumeSessionEntry[] | undefined;
|
|
93
|
-
currentSessionId?: string | undefined;
|
|
94
|
-
/**
|
|
95
|
-
* Reference timestamp for relative-time labels (e.g. "2d"). Defaults to
|
|
96
|
-
* `Date.now()` at render time. Accepts an injected value so visual snapshots
|
|
97
|
-
* stay deterministic across calendar-day boundaries.
|
|
98
|
-
*/
|
|
99
|
-
now?: number | undefined;
|
|
100
|
-
width: number;
|
|
101
|
-
}
|
|
102
|
-
export declare function SessionsPanelSidebar({ liveSessions, resumeSessions, currentSessionId, now, width, }: SessionsPanelSidebarProps): React.ReactElement;
|
|
103
|
-
export interface CoordinatorPanelSidebarProps {
|
|
104
|
-
running: boolean;
|
|
105
|
-
/** Active phase count. */
|
|
106
|
-
activePhases: number;
|
|
107
|
-
/** Completed phase count. */
|
|
108
|
-
completedPhases: number;
|
|
109
|
-
/** Up to 5 active phase names. */
|
|
110
|
-
phaseNames: readonly string[];
|
|
111
|
-
/** Elapsed ms since coordinator started. */
|
|
112
|
-
elapsedMs: number;
|
|
113
|
-
width: number;
|
|
114
|
-
}
|
|
115
|
-
export declare function CoordinatorPanelSidebar({ running, activePhases, completedPhases, phaseNames, elapsedMs, width, }: CoordinatorPanelSidebarProps): React.ReactElement;
|
|
116
|
-
export interface KanbanPanelSidebarProps {
|
|
117
|
-
/** Per-column counts: Backlog / Up Next / In Progress / Review / Done. */
|
|
118
|
-
columns: readonly {
|
|
119
|
-
name: string;
|
|
120
|
-
count: number;
|
|
121
|
-
wip?: number;
|
|
122
|
-
}[];
|
|
123
|
-
/** Active card count (total cards across all columns). */
|
|
124
|
-
totalActive: number;
|
|
125
|
-
/** Up to 6 active card titles. */
|
|
126
|
-
activeCardTitles: readonly string[];
|
|
127
|
-
width: number;
|
|
128
|
-
}
|
|
129
|
-
export declare function KanbanPanelSidebar({ columns, totalActive, activeCardTitles, width, }: KanbanPanelSidebarProps): React.ReactElement;
|
|
130
|
-
export interface ConnectionsPanelSidebarProps {
|
|
131
|
-
/** Connection summaries: name + status badge. */
|
|
132
|
-
connections: readonly {
|
|
133
|
-
name: string;
|
|
134
|
-
status: 'ok' | 'warn' | 'down' | 'unknown';
|
|
135
|
-
latencyMs?: number | undefined;
|
|
136
|
-
}[];
|
|
137
|
-
width: number;
|
|
138
|
-
}
|
|
139
|
-
export declare function ConnectionsPanelSidebar({ connections, width, }: ConnectionsPanelSidebarProps): React.ReactElement;
|
|
1
|
+
export { fleetStatusVisual, fmtRelative, fmtShortDuration, liveSessionColor, liveSessionGlyph, SidebarWorklistRow, } from './sidebar-panels-shared.js';
|
|
2
|
+
export { type AgentsPanelSidebarProps, AgentsPanelSidebar, type ConnectionsPanelSidebarProps, ConnectionsPanelSidebar, type CoordinatorPanelSidebarProps, CoordinatorPanelSidebar, type FleetPanelSidebarProps, FleetPanelSidebar, type ProjectPickerSidebarProps, ProjectPickerSidebar, type WorktreePanelSidebarProps, WorktreePanelSidebar, } from './sidebar-panels-workspace.js';
|
|
3
|
+
export { type GoalPanelSidebarProps, GoalPanelSidebar, type KanbanPanelSidebarProps, KanbanPanelSidebar, type PlanPanelSidebarProps, PlanPanelSidebar, type ProcessListPanelSidebarProps, ProcessListPanelSidebar, type QueuePanelSidebarProps, QueuePanelSidebar, type SessionsPanelSidebarProps, SessionsPanelSidebar, type TodosPanelSidebarProps, TodosPanelSidebar, } from './sidebar-panels-task.js';
|
|
140
4
|
//# sourceMappingURL=sidebar-panels.d.ts.map
|