@workerdeck/ui 1.0.0 → 1.2.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/build/{SessionPanel-DDgBkHsi.mjs → SessionPanel-DVhnUwXw.mjs} +81 -33
- package/build/SessionPanel-DVhnUwXw.mjs.map +1 -0
- package/build/{SessionPanel-E_L_ldQ5.d.mts → SessionPanel-yNO60Tzw.d.mts} +11 -67
- package/build/format-C4h4jZL_.d.mts +25 -0
- package/build/format.d.mts +2 -3
- package/build/format.mjs +2 -2
- package/build/index.d.mts +257 -586
- package/build/index.mjs +4 -3
- package/build/index.mjs.map +1 -1
- package/build/scoped.css +21 -0
- package/build/{status-C0HSLZas.mjs → status-BW2xj79g.mjs} +14 -5
- package/build/status-BW2xj79g.mjs.map +1 -0
- package/build/workspace.d.mts +6 -64
- package/build/workspace.mjs +4 -3
- package/build/workspace.mjs.map +1 -1
- package/package.json +24 -24
- package/src/components/agent/TranscriptItemView.tsx +19 -1
- package/src/components/terminal/TerminalTranscript.tsx +4 -1
- package/src/components/terminal/height.ts +6 -1
- package/src/components/terminal/items.tsx +14 -1
- package/src/lib/format.ts +10 -0
- package/build/SessionPanel-DDgBkHsi.mjs.map +0 -1
- package/build/format-B8ZM9LPy.d.mts +0 -16
- package/build/status-C0HSLZas.mjs.map +0 -1
|
@@ -1,10 +1,8 @@
|
|
|
1
|
-
import * as _$react from "react";
|
|
2
1
|
import { ReactNode } from "react";
|
|
3
2
|
import { LucideIcon } from "lucide-react";
|
|
4
3
|
import { ModelOption, PermissionMode, SkillInfo } from "@workerdeck/protocol";
|
|
5
4
|
import { ClientToolHandler, ConnectionState, TranscriptState, UseToolCallHostOptions } from "@workerdeck/react";
|
|
6
5
|
import { WorkerDeckClient } from "@workerdeck/client";
|
|
7
|
-
|
|
8
6
|
//#region src/components/agent/PermissionModeSelect.d.ts
|
|
9
7
|
type PermissionModeMeta = {
|
|
10
8
|
value: PermissionMode;
|
|
@@ -33,15 +31,7 @@ interface PermissionModeSelectProps {
|
|
|
33
31
|
disabled?: boolean;
|
|
34
32
|
className?: string;
|
|
35
33
|
}
|
|
36
|
-
declare function PermissionModeSelect({
|
|
37
|
-
mode,
|
|
38
|
-
onModeChange,
|
|
39
|
-
modes,
|
|
40
|
-
canBypass,
|
|
41
|
-
variant,
|
|
42
|
-
disabled,
|
|
43
|
-
className
|
|
44
|
-
}: PermissionModeSelectProps): _$react.JSX.Element;
|
|
34
|
+
declare function PermissionModeSelect({ mode, onModeChange, modes, canBypass, variant, disabled, className }: PermissionModeSelectProps): import("react").JSX.Element;
|
|
45
35
|
//#endregion
|
|
46
36
|
//#region src/components/terminal/affordances.d.ts
|
|
47
37
|
type TerminalAffordances = {
|
|
@@ -49,41 +39,28 @@ type TerminalAffordances = {
|
|
|
49
39
|
actions?: boolean;
|
|
50
40
|
};
|
|
51
41
|
declare function useAffordances(): Required<TerminalAffordances>;
|
|
52
|
-
declare function WithActions({
|
|
53
|
-
actions,
|
|
54
|
-
children,
|
|
55
|
-
className
|
|
56
|
-
}: {
|
|
42
|
+
declare function WithActions({ actions, children, className }: {
|
|
57
43
|
actions: ReactNode;
|
|
58
44
|
children: ReactNode;
|
|
59
45
|
className?: string;
|
|
60
|
-
}):
|
|
61
|
-
declare function CopyAction({
|
|
62
|
-
text,
|
|
63
|
-
label
|
|
64
|
-
}: {
|
|
46
|
+
}): import("react").JSX.Element;
|
|
47
|
+
declare function CopyAction({ text, label }: {
|
|
65
48
|
text: string;
|
|
66
49
|
label?: string;
|
|
67
|
-
}):
|
|
50
|
+
}): import("react").JSX.Element;
|
|
68
51
|
//#endregion
|
|
69
52
|
//#region src/components/agent/transcript-variant.d.ts
|
|
70
53
|
type TranscriptVariant = 'cards' | 'terminal';
|
|
71
|
-
declare function TranscriptVariantProvider({
|
|
72
|
-
value,
|
|
73
|
-
children
|
|
74
|
-
}: {
|
|
54
|
+
declare function TranscriptVariantProvider({ value, children }: {
|
|
75
55
|
value: TranscriptVariant;
|
|
76
56
|
children: ReactNode;
|
|
77
|
-
}):
|
|
57
|
+
}): import("react").JSX.Element;
|
|
78
58
|
declare function useTranscriptVariant(): TranscriptVariant;
|
|
79
59
|
type TranscriptDensity = 'comfortable' | 'compact';
|
|
80
|
-
declare function TranscriptDensityProvider({
|
|
81
|
-
value,
|
|
82
|
-
children
|
|
83
|
-
}: {
|
|
60
|
+
declare function TranscriptDensityProvider({ value, children }: {
|
|
84
61
|
value: TranscriptDensity;
|
|
85
62
|
children: ReactNode;
|
|
86
|
-
}):
|
|
63
|
+
}): import("react").JSX.Element;
|
|
87
64
|
declare function useTranscriptDensity(): TranscriptDensity;
|
|
88
65
|
type TranscriptFont = 'sans' | 'mono';
|
|
89
66
|
//#endregion
|
|
@@ -168,40 +145,7 @@ type SessionVitals = {
|
|
|
168
145
|
itemCount: number;
|
|
169
146
|
totalCostUsd: number;
|
|
170
147
|
};
|
|
171
|
-
declare function SessionPanel({
|
|
172
|
-
client,
|
|
173
|
-
sessionId,
|
|
174
|
-
header,
|
|
175
|
-
panelSurface,
|
|
176
|
-
statusSurface,
|
|
177
|
-
statusPlacement,
|
|
178
|
-
onOpenPanel,
|
|
179
|
-
onVitals,
|
|
180
|
-
transcriptVariant,
|
|
181
|
-
transcriptDensity,
|
|
182
|
-
transcriptFont,
|
|
183
|
-
affordances,
|
|
184
|
-
terminalMetrics,
|
|
185
|
-
scrubber,
|
|
186
|
-
bookmarks,
|
|
187
|
-
onToggleBookmark,
|
|
188
|
-
reveal,
|
|
189
|
-
openSubagent,
|
|
190
|
-
onSubagentChange,
|
|
191
|
-
stickyPrompt,
|
|
192
|
-
controlsSurface,
|
|
193
|
-
onControls,
|
|
194
|
-
focusComposerOnClick,
|
|
195
|
-
unseen,
|
|
196
|
-
readOnly,
|
|
197
|
-
toolHost,
|
|
198
|
-
clientTools,
|
|
199
|
-
cacheTranscript,
|
|
200
|
-
emptyState,
|
|
201
|
-
onLinkClick,
|
|
202
|
-
fontSize,
|
|
203
|
-
className
|
|
204
|
-
}: SessionPanelProps): _$react.JSX.Element;
|
|
148
|
+
declare function SessionPanel({ client, sessionId, header, panelSurface, statusSurface, statusPlacement, onOpenPanel, onVitals, transcriptVariant, transcriptDensity, transcriptFont, affordances, terminalMetrics, scrubber, bookmarks, onToggleBookmark, reveal, openSubagent, onSubagentChange, stickyPrompt, controlsSurface, onControls, focusComposerOnClick, unseen, readOnly, toolHost, clientTools, cacheTranscript, emptyState, onLinkClick, fontSize, className }: SessionPanelProps): import("react").JSX.Element;
|
|
205
149
|
//#endregion
|
|
206
150
|
export { permissionModeChoices as C, PermissionModeSelectProps as S, useAffordances as _, SessionVitals as a, PermissionModeMeta as b, TranscriptDensityProvider as c, TranscriptVariantProvider as d, useTranscriptDensity as f, WithActions as g, TerminalAffordances as h, SessionSurfacePanel as i, TranscriptFont as l, CopyAction as m, SessionPanel as n, TerminalMetrics as o, useTranscriptVariant as p, SessionPanelProps as r, TranscriptDensity as s, SessionControls as t, TranscriptVariant as u, PERMISSION_MODES as v, permissionModeMeta as w, PermissionModeSelect as x, PermissionModeChoice as y };
|
|
207
|
-
//# sourceMappingURL=SessionPanel-
|
|
151
|
+
//# sourceMappingURL=SessionPanel-yNO60Tzw.d.mts.map
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
//#region src/lib/format.d.ts
|
|
2
|
+
/**
|
|
3
|
+
* The whole payload of a `compaction` row. The wire event carries no summary because codex's
|
|
4
|
+
* `contextCompaction` item carries none, so the sentence *is* the content.
|
|
5
|
+
*
|
|
6
|
+
* It lives here, in a pure module, because the renderer (`terminal/items.tsx`) and the height book
|
|
7
|
+
* (`terminal/height.ts`) must measure and draw the same string — height.ts cannot import the
|
|
8
|
+
* `.tsx` without pulling React into a module the tests require to stay pure.
|
|
9
|
+
*/
|
|
10
|
+
declare const COMPACTION_TEXT = "context compacted · earlier turns summarised to fit the window";
|
|
11
|
+
declare function formatCost(usd: number | undefined): string;
|
|
12
|
+
declare function formatDuration(ms: number): string;
|
|
13
|
+
declare function formatTokens(tokens: number): string;
|
|
14
|
+
declare function formatBytes(bytes: number): string;
|
|
15
|
+
declare function formatCountdown(untilEpochMs: number, now?: number): string;
|
|
16
|
+
declare function formatRelativeTime(epochMs: number | undefined, now?: number): string;
|
|
17
|
+
declare function formatRateLimitWindow(key: string): string;
|
|
18
|
+
declare function formatRateLimitWindowLong(key: string): string;
|
|
19
|
+
declare function rateLimitWindowSeconds(key: string): number | undefined;
|
|
20
|
+
declare function formatAgoPrecise(epochMs: number, now?: number): string;
|
|
21
|
+
declare function toolInputPreview(input: unknown, max?: number): string;
|
|
22
|
+
declare function friendlyModel(id: string | undefined): string | undefined;
|
|
23
|
+
//#endregion
|
|
24
|
+
export { formatCountdown as a, formatRateLimitWindowLong as c, friendlyModel as d, rateLimitWindowSeconds as f, formatCost as i, formatRelativeTime as l, formatAgoPrecise as n, formatDuration as o, toolInputPreview as p, formatBytes as r, formatRateLimitWindow as s, COMPACTION_TEXT as t, formatTokens as u };
|
|
25
|
+
//# sourceMappingURL=format-C4h4jZL_.d.mts.map
|
package/build/format.d.mts
CHANGED
|
@@ -1,6 +1,5 @@
|
|
|
1
|
-
import { a as
|
|
1
|
+
import { a as formatCountdown, c as formatRateLimitWindowLong, d as friendlyModel, f as rateLimitWindowSeconds, i as formatCost, l as formatRelativeTime, n as formatAgoPrecise, o as formatDuration, p as toolInputPreview, r as formatBytes, s as formatRateLimitWindow, t as COMPACTION_TEXT, u as formatTokens } from "./format-C4h4jZL_.mjs";
|
|
2
2
|
import { ModelOption, RateLimitInfo, SessionStatus } from "@workerdeck/protocol";
|
|
3
|
-
|
|
4
3
|
//#region src/lib/status.d.ts
|
|
5
4
|
type StatusSeverity = 'none' | 'warning' | 'error';
|
|
6
5
|
type StatusPresentation = {
|
|
@@ -41,5 +40,5 @@ declare function meterColorClass(pct: number | undefined): string;
|
|
|
41
40
|
*/
|
|
42
41
|
declare function meterTintClass(pct: number): string;
|
|
43
42
|
//#endregion
|
|
44
|
-
export { ModelReadings, StatusPresentation, StatusReadings, StatusSeverity, UsageLane, contextSeverity, currentModel, formatAgoPrecise, formatBytes, formatCost, formatCountdown, formatDuration, formatRateLimitWindow, formatRateLimitWindowLong, formatRelativeTime, formatTokens, friendlyModel, meterColorClass, meterSeverity, meterTintClass, modelLabel, rateLimitWindowSeconds, statusPresentation, tightestWindow, toolInputPreview, usageWindow, windowLabel };
|
|
43
|
+
export { COMPACTION_TEXT, ModelReadings, StatusPresentation, StatusReadings, StatusSeverity, UsageLane, contextSeverity, currentModel, formatAgoPrecise, formatBytes, formatCost, formatCountdown, formatDuration, formatRateLimitWindow, formatRateLimitWindowLong, formatRelativeTime, formatTokens, friendlyModel, meterColorClass, meterSeverity, meterTintClass, modelLabel, rateLimitWindowSeconds, statusPresentation, tightestWindow, toolInputPreview, usageWindow, windowLabel };
|
|
45
44
|
//# sourceMappingURL=format.d.mts.map
|
package/build/format.mjs
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import {
|
|
2
|
-
export { contextSeverity, currentModel, formatAgoPrecise, formatBytes, formatCost, formatCountdown, formatDuration, formatRateLimitWindow, formatRateLimitWindowLong, formatRelativeTime, formatTokens, friendlyModel, meterColorClass, meterSeverity, meterTintClass, modelLabel, rateLimitWindowSeconds, statusPresentation, tightestWindow, toolInputPreview, usageWindow, windowLabel };
|
|
1
|
+
import { C as toolInputPreview, S as rateLimitWindowSeconds, _ as formatRateLimitWindow, a as meterTintClass, b as formatTokens, c as tightestWindow, d as COMPACTION_TEXT, f as formatAgoPrecise, g as formatDuration, h as formatCountdown, i as meterSeverity, l as usageWindow, m as formatCost, n as currentModel, o as modelLabel, p as formatBytes, r as meterColorClass, s as statusPresentation, t as contextSeverity, u as windowLabel, v as formatRateLimitWindowLong, x as friendlyModel, y as formatRelativeTime } from "./status-BW2xj79g.mjs";
|
|
2
|
+
export { COMPACTION_TEXT, contextSeverity, currentModel, formatAgoPrecise, formatBytes, formatCost, formatCountdown, formatDuration, formatRateLimitWindow, formatRateLimitWindowLong, formatRelativeTime, formatTokens, friendlyModel, meterColorClass, meterSeverity, meterTintClass, modelLabel, rateLimitWindowSeconds, statusPresentation, tightestWindow, toolInputPreview, usageWindow, windowLabel };
|