@workerdeck/ui 0.12.0 → 0.13.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-NQ8ksCfj.mjs → SessionPanel-CKQa4i0Y.mjs} +113 -110
- package/build/SessionPanel-CKQa4i0Y.mjs.map +1 -0
- package/build/{SessionPanel-Dy9lQrOV.d.mts → SessionPanel-CZMA44NM.d.mts} +30 -1
- package/build/index.d.mts +66 -7
- package/build/index.mjs +283 -152
- package/build/index.mjs.map +1 -1
- package/build/workspace.d.mts +9 -1
- package/build/workspace.mjs +4 -2
- package/build/workspace.mjs.map +1 -1
- package/package.json +4 -4
- package/src/components/agent/Composer.tsx +18 -10
- package/src/components/agent/EngineIcon.tsx +97 -0
- package/src/components/agent/Loader.tsx +4 -1
- package/src/components/agent/Message.tsx +10 -6
- package/src/components/agent/QuestionPrompt.tsx +1 -1
- package/src/components/agent/SessionBrowser.tsx +235 -117
- package/src/components/agent/SessionPanel.tsx +61 -13
- package/src/components/agent/SessionWorkspace.tsx +10 -0
- package/src/components/agent/StatusBar.tsx +9 -2
- package/src/components/agent/Transcript.tsx +2 -3
- package/src/components/agent/line-prompt.tsx +2 -2
- package/src/components/ui/Menu.tsx +1 -1
- package/src/components/ui/Select.tsx +1 -1
- package/src/components/ui/Tooltip.tsx +1 -1
- package/src/index.ts +9 -1
- package/src/styles/theme.css +45 -15
- package/build/SessionPanel-NQ8ksCfj.mjs.map +0 -1
|
@@ -172,6 +172,17 @@ interface SessionPanelProps {
|
|
|
172
172
|
* take the menu, or it has nowhere left to go.
|
|
173
173
|
*/
|
|
174
174
|
statusSurface?: 'internal' | 'external';
|
|
175
|
+
/**
|
|
176
|
+
* Which end of the panel the status bar sits at. Default `top`.
|
|
177
|
+
*
|
|
178
|
+
* `bottom` is the editor convention — VS Code's status bar runs along the
|
|
179
|
+
* foot of the window — and suits a host where the panel *is* the editor area
|
|
180
|
+
* and the chrome above it already belongs to the app. Placement only; the bar
|
|
181
|
+
* is the same bar, with the same `⋯` menu in its trailing slot, so this
|
|
182
|
+
* composes with {@link statusSurface} rather than competing with it (external
|
|
183
|
+
* still means "there isn't one").
|
|
184
|
+
*/
|
|
185
|
+
statusPlacement?: 'top' | 'bottom';
|
|
175
186
|
/** Where `panelSurface: 'external'` routes opens. Absent = the affordances
|
|
176
187
|
* (status-bar clicks, `/mcp`) become inert rather than half-working. */
|
|
177
188
|
onOpenPanel?: (panel: SessionSurfacePanel) => void;
|
|
@@ -238,6 +249,22 @@ interface SessionPanelProps {
|
|
|
238
249
|
itemCount: number;
|
|
239
250
|
since?: number;
|
|
240
251
|
};
|
|
252
|
+
/**
|
|
253
|
+
* A viewer, not a seat at the session: transcript, status bar and panels as
|
|
254
|
+
* usual, but no composer and no approval prompts.
|
|
255
|
+
*
|
|
256
|
+
* For a surface that is *about* a run rather than in it — the dashboard's job
|
|
257
|
+
* detail, where the session belongs to the queue and typing into it would be a
|
|
258
|
+
* second operator arriving mid-run. Deliberately not "disabled controls": a
|
|
259
|
+
* greyed-out composer says the session is busy, an absent one says this screen
|
|
260
|
+
* does not drive it. The attach is still live and read paths are untouched,
|
|
261
|
+
* so the transcript streams and the file tree browses.
|
|
262
|
+
*
|
|
263
|
+
* It does **not** claim to be an authorization boundary. Anything holding this
|
|
264
|
+
* client can still send; what it removes is the affordance, and the honest
|
|
265
|
+
* enforcement lives on the gateway.
|
|
266
|
+
*/
|
|
267
|
+
readOnly?: boolean;
|
|
241
268
|
className?: string;
|
|
242
269
|
}
|
|
243
270
|
/** What an embedder needs to *change* a session it doesn't own the attach for. */
|
|
@@ -304,6 +331,7 @@ declare function SessionPanel({
|
|
|
304
331
|
header,
|
|
305
332
|
panelSurface,
|
|
306
333
|
statusSurface,
|
|
334
|
+
statusPlacement,
|
|
307
335
|
onOpenPanel,
|
|
308
336
|
onVitals,
|
|
309
337
|
transcriptVariant,
|
|
@@ -312,8 +340,9 @@ declare function SessionPanel({
|
|
|
312
340
|
onControls,
|
|
313
341
|
focusComposerOnClick,
|
|
314
342
|
unseen,
|
|
343
|
+
readOnly,
|
|
315
344
|
className
|
|
316
345
|
}: SessionPanelProps): _$react.JSX.Element;
|
|
317
346
|
//#endregion
|
|
318
347
|
export { permissionModeChoices as _, SessionVitals as a, TranscriptVariant as c, useTranscriptVariant as d, PERMISSION_MODES as f, PermissionModeSelectProps as g, PermissionModeSelect as h, SessionSurfacePanel as i, TranscriptVariantProvider as l, PermissionModeMeta as m, SessionPanel as n, TranscriptDensity as o, PermissionModeChoice as p, SessionPanelProps as r, TranscriptDensityProvider as s, SessionControls as t, useTranscriptDensity as u, permissionModeMeta as v };
|
|
319
|
-
//# sourceMappingURL=SessionPanel-
|
|
348
|
+
//# sourceMappingURL=SessionPanel-CZMA44NM.d.mts.map
|
package/build/index.d.mts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { a as formatDuration, c as formatRelativeTime, d as rateLimitWindowSeconds, f as toolInputPreview, i as formatCountdown, l as formatTokens, n as formatBytes, o as formatRateLimitWindow, r as formatCost, s as formatRateLimitWindowLong, t as formatAgoPrecise, u as friendlyModel } from "./format-ljc3lKpA.mjs";
|
|
2
|
-
import { _ as permissionModeChoices, a as SessionVitals, c as TranscriptVariant, d as useTranscriptVariant, f as PERMISSION_MODES, g as PermissionModeSelectProps, h as PermissionModeSelect, i as SessionSurfacePanel, l as TranscriptVariantProvider, m as PermissionModeMeta, n as SessionPanel, o as TranscriptDensity, p as PermissionModeChoice, r as SessionPanelProps, s as TranscriptDensityProvider, t as SessionControls, u as useTranscriptDensity, v as permissionModeMeta } from "./SessionPanel-
|
|
2
|
+
import { _ as permissionModeChoices, a as SessionVitals, c as TranscriptVariant, d as useTranscriptVariant, f as PERMISSION_MODES, g as PermissionModeSelectProps, h as PermissionModeSelect, i as SessionSurfacePanel, l as TranscriptVariantProvider, m as PermissionModeMeta, n as SessionPanel, o as TranscriptDensity, p as PermissionModeChoice, r as SessionPanelProps, s as TranscriptDensityProvider, t as SessionControls, u as useTranscriptDensity, v as permissionModeMeta } from "./SessionPanel-CZMA44NM.mjs";
|
|
3
3
|
import * as _$react from "react";
|
|
4
4
|
import { ButtonHTMLAttributes, FunctionComponent, HTMLAttributes, InputHTMLAttributes, ReactElement, ReactNode, Ref, RefObject, TextareaHTMLAttributes } from "react";
|
|
5
5
|
import { VariantProps } from "class-variance-authority";
|
|
@@ -22,7 +22,7 @@ import { WorkerDeckClient } from "@workerdeck/client";
|
|
|
22
22
|
|
|
23
23
|
//#region src/components/ui/Button.d.ts
|
|
24
24
|
declare const buttonVariants: (props?: ({
|
|
25
|
-
variant?: "default" | "
|
|
25
|
+
variant?: "default" | "outline" | "secondary" | "ghost" | "destructive" | "link" | null | undefined;
|
|
26
26
|
size?: "default" | "xs" | "sm" | "lg" | "icon" | "icon-sm" | null | undefined;
|
|
27
27
|
} & _$class_variance_authority_types0.ClassProp) | undefined) => string;
|
|
28
28
|
interface ButtonProps extends ButtonHTMLAttributes<HTMLButtonElement>, VariantProps<typeof buttonVariants> {}
|
|
@@ -815,9 +815,12 @@ interface MessageProps extends HTMLAttributes<HTMLDivElement> {
|
|
|
815
815
|
/**
|
|
816
816
|
* One chat turn row.
|
|
817
817
|
*
|
|
818
|
-
* `cards`: user messages sit
|
|
819
|
-
* full-width
|
|
820
|
-
*
|
|
818
|
+
* `cards`: user messages sit in a bubble, assistant content is flat and
|
|
819
|
+
* full-width. Both are **left-aligned**: the transcript is a log read top to
|
|
820
|
+
* bottom, and an editor-shaped host (a full-width session view beside a sessions
|
|
821
|
+
* rail) has no right edge to anchor to — a bubble drifting right in a 1600px
|
|
822
|
+
* column separates a prompt from the reply it produced. The bubble alone is
|
|
823
|
+
* enough to say who spoke.
|
|
821
824
|
*
|
|
822
825
|
* `lines`: both are left-aligned full-width line items behind a gutter glyph —
|
|
823
826
|
* `❯` for what was typed, `●` for what the model said. No bubble: a prompt is
|
|
@@ -1144,8 +1147,11 @@ interface StatusBarProps {
|
|
|
1144
1147
|
onOpenStatus?: () => void;
|
|
1145
1148
|
onOpenContext?: () => void;
|
|
1146
1149
|
onOpenUsage?: () => void;
|
|
1147
|
-
/** Trailing slot — the session-actions menu,
|
|
1150
|
+
/** Trailing slot — the session-actions menu, at the bar's trailing edge. */
|
|
1148
1151
|
actions?: ReactNode;
|
|
1152
|
+
/** Which edge the bar sits on, so its separating rule goes on the other side.
|
|
1153
|
+
* Placement is the panel's decision; this only styles it. */
|
|
1154
|
+
placement?: 'top' | 'bottom';
|
|
1149
1155
|
className?: string;
|
|
1150
1156
|
}
|
|
1151
1157
|
declare function StatusBar({
|
|
@@ -1156,6 +1162,7 @@ declare function StatusBar({
|
|
|
1156
1162
|
onOpenContext,
|
|
1157
1163
|
onOpenUsage,
|
|
1158
1164
|
actions,
|
|
1165
|
+
placement,
|
|
1159
1166
|
className
|
|
1160
1167
|
}: StatusBarProps): _$react.JSX.Element;
|
|
1161
1168
|
//#endregion
|
|
@@ -1394,8 +1401,37 @@ interface SessionBrowserProps {
|
|
|
1394
1401
|
onRename?: (row: SessionRow, title: string) => void;
|
|
1395
1402
|
/** Rendered when nothing at all exists (as opposed to nothing matching). */
|
|
1396
1403
|
emptyState?: React.ReactNode;
|
|
1404
|
+
/**
|
|
1405
|
+
* Whether the search + facet bar is shown. Defaults to `true` — a list that
|
|
1406
|
+
* *is* the screen shows its controls.
|
|
1407
|
+
*
|
|
1408
|
+
* A host with somewhere better to put the toggle (a view title bar) passes
|
|
1409
|
+
* `false` and owns the boolean itself, the way the VS Code extension does: the
|
|
1410
|
+
* key lives where the commands do. Two rules come with it, and they are why
|
|
1411
|
+
* this hides only the bar and nothing else — **closing the bar never clears
|
|
1412
|
+
* the filters**, and the subset line below it renders either way, so a list
|
|
1413
|
+
* filtered by a control you can't currently see still says so.
|
|
1414
|
+
*/
|
|
1415
|
+
showControls?: boolean;
|
|
1397
1416
|
className?: string;
|
|
1398
1417
|
}
|
|
1418
|
+
/**
|
|
1419
|
+
* How a list row is drawn, in one place, so `SidebarRow` in `web` matches this
|
|
1420
|
+
* exactly rather than approximating it — the dashboard's other three sidebars
|
|
1421
|
+
* are that component, and a sessions list that hovered differently from the
|
|
1422
|
+
* gateways list beside it would read as a different product.
|
|
1423
|
+
*
|
|
1424
|
+
* Two rules are load-bearing:
|
|
1425
|
+
*
|
|
1426
|
+
* - **Fill means hover, and only hover.** It stays on the row whether or not
|
|
1427
|
+
* the row is selected, because a selected row still has to answer the
|
|
1428
|
+
* pointer. Selection gets the gutter instead.
|
|
1429
|
+
* - **`ml-0` on the selected row is not cosmetic.** It hands the accent border
|
|
1430
|
+
* the 4px the margin was holding, so the text does not shift sideways as a
|
|
1431
|
+
* row becomes the selected one. The squared left corners are what let the bar
|
|
1432
|
+
* sit flush against the sidebar edge.
|
|
1433
|
+
*/
|
|
1434
|
+
declare function rowShapeClass(active: boolean): string;
|
|
1399
1435
|
declare function SessionBrowser({
|
|
1400
1436
|
rows,
|
|
1401
1437
|
config,
|
|
@@ -1406,8 +1442,31 @@ declare function SessionBrowser({
|
|
|
1406
1442
|
onDelete,
|
|
1407
1443
|
onRename,
|
|
1408
1444
|
emptyState,
|
|
1445
|
+
showControls,
|
|
1409
1446
|
className
|
|
1410
1447
|
}: SessionBrowserProps): _$react.JSX.Element;
|
|
1448
|
+
/**
|
|
1449
|
+
* State as one glyph on the right edge — a ringing bell when it wants a human, a
|
|
1450
|
+
* spinner while it works, a moon when it is only sleeping. Replaces the text
|
|
1451
|
+
* badge: in a sidebar the word costs more room than it earns, and the states
|
|
1452
|
+
* that matter are the two you can recognise without reading.
|
|
1453
|
+
*/
|
|
1454
|
+
declare function SessionStatusIcon({
|
|
1455
|
+
row
|
|
1456
|
+
}: {
|
|
1457
|
+
row: SessionRow;
|
|
1458
|
+
}): _$react.JSX.Element;
|
|
1459
|
+
//#endregion
|
|
1460
|
+
//#region src/components/agent/EngineIcon.d.ts
|
|
1461
|
+
declare function EngineIcon({
|
|
1462
|
+
engine,
|
|
1463
|
+
model,
|
|
1464
|
+
className
|
|
1465
|
+
}: {
|
|
1466
|
+
engine: string;
|
|
1467
|
+
model?: string;
|
|
1468
|
+
className?: string;
|
|
1469
|
+
}): _$react.JSX.Element;
|
|
1411
1470
|
//#endregion
|
|
1412
1471
|
//#region src/components/agent/SessionEmptyState.d.ts
|
|
1413
1472
|
interface SessionEmptyStateProps {
|
|
@@ -1511,5 +1570,5 @@ declare function toolIcon(toolName: string): LucideIcon;
|
|
|
1511
1570
|
*/
|
|
1512
1571
|
declare function isMutatingTool(toolName: string): boolean;
|
|
1513
1572
|
//#endregion
|
|
1514
|
-
export { AlertDialog, AlertDialogClose, AlertDialogContent, AlertDialogDescription, AlertDialogTitle, AlertDialogTrigger, Badge, type BadgeProps, Button, type ButtonProps, Card, CardContent, CardHeader, CardTitle, type ChipSegment, CodeBlock, type CodeBlockProps, Composer, type ComposerFileMatch, type ComposerHandle, type ComposerProps, ContextDialog, type ContextDialogProps, Conversation, ConversationContent, type ConversationProps, ConversationScrollButton, CopyButton, type CopyButtonProps, Dialog, DialogBody, DialogClose, DialogContent, DialogHeader, DialogRow, DialogTrigger, FileCard, type FileCardProps, type FileDeliveredItem, HostFilesDialog, type HostFilesDialogProps, Input, Loader, McpDialog, type McpDialogProps, Menu, MenuContent, MenuItem, MenuSeparator, MenuTrigger, Message, MessageContent, type MessageProps, ModelSelect, type ModelSelectProps, PERMISSION_MODES, type PermissionModeChoice, type PermissionModeMeta, PermissionModeSelect, type PermissionModeSelectProps, PermissionPrompt, type PermissionPromptProps, ProgressRing, type ProgressRingProps, PromptArea, type PromptAreaHandle, type PromptAreaProps, PromptTokenText, QUESTION_BEHAVIORS, type QuestionBehaviorMeta, QuestionPrompt, type QuestionPromptProps, Reasoning, type ReasoningProps, Response, type ResponseProps, STATUS_META, type Segment, Select, SelectContent, SelectItem, SelectItemText, SelectTrigger, SelectValue, SessionBrowser, type SessionBrowserProps, type SessionControls, SessionEmptyState, type SessionEmptyStateProps, SessionInfoDialog, type SessionInfoDialogProps, SessionList, SessionListItem, type SessionListItemProps, type SessionListProps, SessionPanel, type SessionPanelProps, type SessionSurfacePanel, type SessionVitals, SkillsDialog, type SkillsDialogProps, Spinner, Splitter, type SplitterProps, StatusBar, type StatusBarProps, type TextSegment, Textarea, Tip, Toaster, ToolCallCard, type ToolCallCardProps, type ToolCallItem, TooltipContent, TooltipProvider, Transcript, type TranscriptDensity, TranscriptDensityProvider, type TranscriptProps, type TranscriptVariant, TranscriptVariantProvider, type TriggerConfig, type TriggerSuggestion, UsageDialog, type UsageDialogProps, badgeVariants, buttonVariants, cn, commandTrigger, copyText, formatAgoPrecise, formatBytes, formatCost, formatCountdown, formatDuration, formatRateLimitWindow, formatRateLimitWindowLong, formatRelativeTime, formatTokens, friendlyModel, getChipsByTrigger, hashtagTrigger, isMutatingTool, isSegmentsEmpty, mentionTrigger, parseUserQuestions, permissionModeChoices, permissionModeMeta, plainTextToSegments, rateLimitWindowSeconds, segmentsToPlainText, skillPrompt, toast, toolIcon, toolInputPreview, usePromptAreaState, useTranscriptDensity, useTranscriptVariant };
|
|
1573
|
+
export { AlertDialog, AlertDialogClose, AlertDialogContent, AlertDialogDescription, AlertDialogTitle, AlertDialogTrigger, Badge, type BadgeProps, Button, type ButtonProps, Card, CardContent, CardHeader, CardTitle, type ChipSegment, CodeBlock, type CodeBlockProps, Composer, type ComposerFileMatch, type ComposerHandle, type ComposerProps, ContextDialog, type ContextDialogProps, Conversation, ConversationContent, type ConversationProps, ConversationScrollButton, CopyButton, type CopyButtonProps, Dialog, DialogBody, DialogClose, DialogContent, DialogHeader, DialogRow, DialogTrigger, EngineIcon, FileCard, type FileCardProps, type FileDeliveredItem, HostFilesDialog, type HostFilesDialogProps, Input, Loader, McpDialog, type McpDialogProps, Menu, MenuContent, MenuItem, MenuSeparator, MenuTrigger, Message, MessageContent, type MessageProps, ModelSelect, type ModelSelectProps, PERMISSION_MODES, type PermissionModeChoice, type PermissionModeMeta, PermissionModeSelect, type PermissionModeSelectProps, PermissionPrompt, type PermissionPromptProps, ProgressRing, type ProgressRingProps, PromptArea, type PromptAreaHandle, type PromptAreaProps, PromptTokenText, QUESTION_BEHAVIORS, type QuestionBehaviorMeta, QuestionPrompt, type QuestionPromptProps, Reasoning, type ReasoningProps, Response, type ResponseProps, STATUS_META, type Segment, Select, SelectContent, SelectItem, SelectItemText, SelectTrigger, SelectValue, SessionBrowser, type SessionBrowserProps, type SessionControls, SessionEmptyState, type SessionEmptyStateProps, SessionInfoDialog, type SessionInfoDialogProps, SessionList, SessionListItem, type SessionListItemProps, type SessionListProps, SessionPanel, type SessionPanelProps, SessionStatusIcon, type SessionSurfacePanel, type SessionVitals, SkillsDialog, type SkillsDialogProps, Spinner, Splitter, type SplitterProps, StatusBar, type StatusBarProps, type TextSegment, Textarea, Tip, Toaster, ToolCallCard, type ToolCallCardProps, type ToolCallItem, TooltipContent, TooltipProvider, Transcript, type TranscriptDensity, TranscriptDensityProvider, type TranscriptProps, type TranscriptVariant, TranscriptVariantProvider, type TriggerConfig, type TriggerSuggestion, UsageDialog, type UsageDialogProps, badgeVariants, buttonVariants, cn, commandTrigger, copyText, formatAgoPrecise, formatBytes, formatCost, formatCountdown, formatDuration, formatRateLimitWindow, formatRateLimitWindowLong, formatRelativeTime, formatTokens, friendlyModel, getChipsByTrigger, hashtagTrigger, isMutatingTool, isSegmentsEmpty, mentionTrigger, parseUserQuestions, permissionModeChoices, permissionModeMeta, plainTextToSegments, rateLimitWindowSeconds, rowShapeClass, segmentsToPlainText, skillPrompt, toast, toolIcon, toolInputPreview, usePromptAreaState, useTranscriptDensity, useTranscriptVariant };
|
|
1515
1574
|
//# sourceMappingURL=index.d.mts.map
|