@wrongstack/tui 1.0.37 → 1.1.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/components/context-panel-residency.d.ts +8 -0
- package/dist/components/context-panel-sections.d.ts +3 -2
- package/dist/components/context-panel-types.d.ts +13 -1
- package/dist/components/status-bar-rails-common.d.ts +3 -0
- package/dist/hooks/use-statusbar-view-model.d.ts +5 -1
- package/dist/index.js +3385 -3156
- package/dist/use-app-controller.d.ts +2 -0
- package/dist/use-controller-key-pipeline.d.ts +2 -0
- package/package.json +7 -7
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { type HistoryRetention, type RequestResidency } from '@wrongstack/core/utils';
|
|
2
|
+
import type React from 'react';
|
|
3
|
+
export declare function ResidencySection({ residency, retention, contentWidth, }: {
|
|
4
|
+
residency: RequestResidency | undefined;
|
|
5
|
+
retention: HistoryRetention | undefined;
|
|
6
|
+
contentWidth: number;
|
|
7
|
+
}): React.ReactElement;
|
|
8
|
+
//# sourceMappingURL=context-panel-residency.d.ts.map
|
|
@@ -35,8 +35,9 @@ export declare function MetricsSection({ data }: {
|
|
|
35
35
|
}): React.ReactElement;
|
|
36
36
|
/**
|
|
37
37
|
* Cache coverage section — answers "exactly how far does the prompt cache
|
|
38
|
-
* extend into the live request?" Renders the
|
|
39
|
-
*
|
|
38
|
+
* extend into the live request?" Renders the last request's hit ratio (the
|
|
39
|
+
* session-cumulative one next to it lags: it carries the cold first request
|
|
40
|
+
* forever) plus a per-request coverage meter that visibly marks where the cached
|
|
40
41
|
* prefix ends. Hidden when nothing has been cached yet so the panel does
|
|
41
42
|
* not advertise a 0% figure as if it were meaningful.
|
|
42
43
|
*/
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { ContextBreakdown } from '@wrongstack/core/utils';
|
|
1
|
+
import type { ContextBreakdown, HistoryRetention, RequestResidency } from '@wrongstack/core/utils';
|
|
2
2
|
import type { MemoryContextMonitorState } from '../memory-context-monitor.js';
|
|
3
3
|
export interface ContextPanelData {
|
|
4
4
|
ctxPct: number | undefined;
|
|
@@ -28,6 +28,10 @@ export interface ContextPanelData {
|
|
|
28
28
|
cacheWrite1h?: number | undefined;
|
|
29
29
|
hitRatio: number;
|
|
30
30
|
savedUsd: number;
|
|
31
|
+
/** Last provider-reported request on its own; `hitRatio` is cumulative. */
|
|
32
|
+
last?: {
|
|
33
|
+
hitRatio: number;
|
|
34
|
+
} | undefined;
|
|
31
35
|
} | undefined;
|
|
32
36
|
/**
|
|
33
37
|
* How far the cached prefix reaches through the live request, in
|
|
@@ -52,6 +56,14 @@ export interface ContextPanelData {
|
|
|
52
56
|
* percentages.
|
|
53
57
|
*/
|
|
54
58
|
breakdown: ContextBreakdown | undefined;
|
|
59
|
+
/**
|
|
60
|
+
* Cache residency of the last request — which segments were served from the
|
|
61
|
+
* prompt cache, written, or never cached, and what broke the cache. Absent
|
|
62
|
+
* before the first request.
|
|
63
|
+
*/
|
|
64
|
+
residency?: RequestResidency | undefined;
|
|
65
|
+
/** Which history survives the next compaction (preserve window, elision). */
|
|
66
|
+
retention?: HistoryRetention | undefined;
|
|
55
67
|
fleetEntries: Array<{
|
|
56
68
|
name: string;
|
|
57
69
|
status: string;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { CacheStats } from '@wrongstack/core/types';
|
|
2
|
-
import { type ContextBreakdown } from '@wrongstack/core/utils';
|
|
2
|
+
import { type ContextBreakdown, type HistoryRetention, type RequestResidency } from '@wrongstack/core/utils';
|
|
3
3
|
import type { AppProps } from '../app-props.js';
|
|
4
4
|
import type { FleetEntry, State } from '../app-state.js';
|
|
5
5
|
import type { StatuslineItem } from '../components/statusline-picker.js';
|
|
@@ -49,6 +49,10 @@ export interface TaskCounts {
|
|
|
49
49
|
/** Builds status-bar projections without coupling them to the root App render. */
|
|
50
50
|
export declare function useStatusbarViewModel({ agent, tokenCounter, activeMaxContext, effectiveMaxContext, liveProvider, liveModel, liveTodos, sidebarVisible, state, hiddenItems, tokenRefresh, }: StatusbarViewModelOptions): {
|
|
51
51
|
contextBreakdown: ContextBreakdown | undefined;
|
|
52
|
+
/** Last request's cache residency — computed only while the context panel is open. */
|
|
53
|
+
contextResidency: RequestResidency | undefined;
|
|
54
|
+
/** What the next compaction keeps — computed only while the context panel is open. */
|
|
55
|
+
historyRetention: HistoryRetention | undefined;
|
|
52
56
|
currentContextTokens: number;
|
|
53
57
|
contextWindow: {
|
|
54
58
|
used: number;
|