@workerdeck/ui 1.4.0 → 2.0.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-DQp2oStr.mjs → SessionPanel-CE5AVkg6.mjs} +147 -36
- package/build/SessionPanel-CE5AVkg6.mjs.map +1 -0
- package/build/{SessionPanel-BSwUJDwg.d.mts → SessionPanel-CUpq2yO-.d.mts} +6 -4
- package/build/index.d.mts +32 -11
- package/build/index.mjs +24 -41
- package/build/index.mjs.map +1 -1
- package/build/scoped.css +7 -0
- package/build/workspace.d.mts +3 -2
- package/build/workspace.mjs +3 -2
- package/build/workspace.mjs.map +1 -1
- package/package.json +4 -4
- package/src/components/agent/SessionBrowser.tsx +0 -6
- package/src/components/agent/SessionItem.tsx +2 -9
- package/src/components/agent/SessionPanel.tsx +33 -2
- package/src/components/agent/SessionSteps.tsx +18 -32
- package/src/components/agent/SessionWorkspace.tsx +3 -0
- package/src/components/agent/StatusBar.tsx +14 -1
- package/src/components/agent/TaskList.tsx +89 -0
- package/src/components/agent/TasksDialog.tsx +46 -0
- package/src/components/terminal/todos.ts +7 -38
- package/src/index.ts +2 -0
- package/build/SessionPanel-DQp2oStr.mjs.map +0 -1
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { ReactNode } from "react";
|
|
2
2
|
import { LucideIcon } from "lucide-react";
|
|
3
|
-
import { ModelOption, PermissionMode, SkillInfo } from "@workerdeck/protocol";
|
|
3
|
+
import { ModelOption, PermissionMode, SessionTask, SkillInfo, SubagentInfo } from "@workerdeck/protocol";
|
|
4
4
|
import { ClientToolHandler, ConnectionState, TranscriptState, UseToolCallHostOptions } from "@workerdeck/react";
|
|
5
5
|
import { WorkerDeckClient } from "@workerdeck/client";
|
|
6
6
|
//#region src/components/agent/PermissionModeSelect.d.ts
|
|
@@ -95,6 +95,7 @@ interface SessionPanelProps {
|
|
|
95
95
|
nonce: number;
|
|
96
96
|
};
|
|
97
97
|
onSubagentChange?: (toolUseId: string | undefined) => void;
|
|
98
|
+
subagents?: SubagentInfo[];
|
|
98
99
|
stickyPrompt?: boolean;
|
|
99
100
|
transcriptDensity?: TranscriptDensity;
|
|
100
101
|
transcriptFont?: TranscriptFont;
|
|
@@ -122,7 +123,7 @@ type SessionControls = {
|
|
|
122
123
|
focusComposer: () => void;
|
|
123
124
|
insertComposerText: (text: string) => void;
|
|
124
125
|
};
|
|
125
|
-
type SessionSurfacePanel = 'info' | 'context' | 'usage' | 'mcp' | 'files' | 'skills';
|
|
126
|
+
type SessionSurfacePanel = 'info' | 'context' | 'usage' | 'mcp' | 'files' | 'skills' | 'tasks';
|
|
126
127
|
type SessionVitals = {
|
|
127
128
|
status: TranscriptState['status'];
|
|
128
129
|
connection: ConnectionState;
|
|
@@ -135,12 +136,13 @@ type SessionVitals = {
|
|
|
135
136
|
skills: SkillInfo[] | undefined;
|
|
136
137
|
cwd: TranscriptState['cwd'];
|
|
137
138
|
contextUsage: TranscriptState['contextUsage'];
|
|
139
|
+
tasks: SessionTask[];
|
|
138
140
|
rateLimits: TranscriptState['rateLimits'];
|
|
139
141
|
rateLimitsUpdatedAt: number | undefined;
|
|
140
142
|
itemCount: number;
|
|
141
143
|
totalCostUsd: number;
|
|
142
144
|
};
|
|
143
|
-
declare function SessionPanel({ client, sessionId, header, panelSurface, statusSurface, statusPlacement, onOpenPanel, onVitals, transcriptVariant, transcriptDensity, transcriptFont, midTurnSend, 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;
|
|
145
|
+
declare function SessionPanel({ client, sessionId, header, panelSurface, statusSurface, statusPlacement, onOpenPanel, onVitals, transcriptVariant, transcriptDensity, transcriptFont, midTurnSend, affordances, terminalMetrics, scrubber, bookmarks, onToggleBookmark, reveal, subagents, openSubagent, onSubagentChange, stickyPrompt, controlsSurface, onControls, focusComposerOnClick, unseen, readOnly, toolHost, clientTools, cacheTranscript, emptyState, onLinkClick, fontSize, className }: SessionPanelProps): import("react").JSX.Element;
|
|
144
146
|
//#endregion
|
|
145
147
|
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 };
|
|
146
|
-
//# sourceMappingURL=SessionPanel-
|
|
148
|
+
//# sourceMappingURL=SessionPanel-CUpq2yO-.d.mts.map
|
package/build/index.d.mts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
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, u as formatTokens } from "./format-TVRJzYUj.mjs";
|
|
2
|
-
import { C as permissionModeChoices, S as PermissionModeSelectProps, _ as useAffordances, a as SessionVitals, b as PermissionModeMeta, c as TranscriptDensityProvider, d as TranscriptVariantProvider, f as useTranscriptDensity, g as WithActions, h as TerminalAffordances, i as SessionSurfacePanel, l as TranscriptFont, m as CopyAction, n as SessionPanel, o as TerminalMetrics, p as useTranscriptVariant, r as SessionPanelProps, s as TranscriptDensity, t as SessionControls, u as TranscriptVariant, v as PERMISSION_MODES, w as permissionModeMeta, x as PermissionModeSelect, y as PermissionModeChoice } from "./SessionPanel-
|
|
2
|
+
import { C as permissionModeChoices, S as PermissionModeSelectProps, _ as useAffordances, a as SessionVitals, b as PermissionModeMeta, c as TranscriptDensityProvider, d as TranscriptVariantProvider, f as useTranscriptDensity, g as WithActions, h as TerminalAffordances, i as SessionSurfacePanel, l as TranscriptFont, m as CopyAction, n as SessionPanel, o as TerminalMetrics, p as useTranscriptVariant, r as SessionPanelProps, s as TranscriptDensity, t as SessionControls, u as TranscriptVariant, v as PERMISSION_MODES, w as permissionModeMeta, x as PermissionModeSelect, y as PermissionModeChoice } from "./SessionPanel-CUpq2yO-.mjs";
|
|
3
3
|
import { ButtonHTMLAttributes, FunctionComponent, HTMLAttributes, InputHTMLAttributes, ReactElement, ReactNode, Ref, RefObject, TextareaHTMLAttributes } from "react";
|
|
4
4
|
import { VariantProps } from "class-variance-authority";
|
|
5
5
|
import { ClassValue } from "clsx";
|
|
@@ -10,7 +10,7 @@ import { Menu as Menu$1 } from "@base-ui/react/menu";
|
|
|
10
10
|
import { Dialog as Dialog$1 } from "@base-ui/react/dialog";
|
|
11
11
|
import { Tooltip } from "@base-ui/react/tooltip";
|
|
12
12
|
import { toast } from "sonner";
|
|
13
|
-
import { ContextReading, ContextUsage, FilePatch, ModelOption, PermissionRequest, ProfileEngine, ProjectIcon as ProjectIcon$1, QuestionBehavior, RateLimitInfo, SessionInfo, SessionRow, SessionStatus, SkillInfo, SlashCommandInfo, UsageWindowRow, UserQuestion, ViewConfig, WorkspaceScope } from "@workerdeck/protocol";
|
|
13
|
+
import { ContextReading, ContextUsage, FilePatch, ModelOption, PermissionRequest, ProfileEngine, ProjectIcon as ProjectIcon$1, QuestionBehavior, RateLimitInfo, SessionInfo, SessionRow, SessionStatus, SessionTask, SkillInfo, SlashCommandInfo, UsageWindowRow, UserQuestion, ViewConfig, WorkspaceScope } from "@workerdeck/protocol";
|
|
14
14
|
import { ConnectionState, TranscriptItem, TranscriptState, UseAttachmentsResult } from "@workerdeck/react";
|
|
15
15
|
import { WorkerDeckClient } from "@workerdeck/client";
|
|
16
16
|
//#region src/components/ui/Button.d.ts
|
|
@@ -946,12 +946,14 @@ interface StatusBarProps {
|
|
|
946
946
|
onOpenStatus?: () => void;
|
|
947
947
|
onOpenContext?: () => void;
|
|
948
948
|
onOpenUsage?: () => void;
|
|
949
|
+
tasks?: readonly SessionTask[];
|
|
950
|
+
onOpenTasks?: () => void;
|
|
949
951
|
controls?: ReactNode;
|
|
950
952
|
actions?: ReactNode;
|
|
951
953
|
placement?: 'top' | 'bottom';
|
|
952
954
|
className?: string;
|
|
953
955
|
}
|
|
954
|
-
declare function StatusBar({ state, rateLimits, connected, connection, onOpenStatus, onOpenContext, onOpenUsage, controls, actions, placement, className }: StatusBarProps): import("react").JSX.Element;
|
|
956
|
+
declare function StatusBar({ state, rateLimits, connected, connection, onOpenStatus, onOpenContext, onOpenUsage, tasks, onOpenTasks, controls, actions, placement, className }: StatusBarProps): import("react").JSX.Element;
|
|
955
957
|
//#endregion
|
|
956
958
|
//#region src/components/agent/ContextDialog.d.ts
|
|
957
959
|
interface ContextDialogProps {
|
|
@@ -976,6 +978,28 @@ interface UsageDialogProps {
|
|
|
976
978
|
}
|
|
977
979
|
declare function UsageDialog({ rateLimits, subscriptionType, engine, totalCostUsd, updatedAt, open, onOpenChange, className }: UsageDialogProps): import("react").JSX.Element;
|
|
978
980
|
//#endregion
|
|
981
|
+
//#region src/components/agent/TaskList.d.ts
|
|
982
|
+
interface TaskListProps {
|
|
983
|
+
tasks: readonly SessionTask[];
|
|
984
|
+
showCompleted: boolean;
|
|
985
|
+
onShowCompletedChange?: (showCompleted: boolean) => void;
|
|
986
|
+
onSelectTask?: (task: SessionTask) => void;
|
|
987
|
+
className?: string;
|
|
988
|
+
}
|
|
989
|
+
declare function TaskList({ tasks, showCompleted, onShowCompletedChange, onSelectTask, className }: TaskListProps): import("react").JSX.Element;
|
|
990
|
+
//#endregion
|
|
991
|
+
//#region src/components/agent/TasksDialog.d.ts
|
|
992
|
+
interface TasksDialogProps {
|
|
993
|
+
tasks: readonly SessionTask[];
|
|
994
|
+
showCompleted: boolean;
|
|
995
|
+
onShowCompletedChange: (showCompleted: boolean) => void;
|
|
996
|
+
onSelectTask?: (task: SessionTask) => void;
|
|
997
|
+
open: boolean;
|
|
998
|
+
onOpenChange: (open: boolean) => void;
|
|
999
|
+
className?: string;
|
|
1000
|
+
}
|
|
1001
|
+
declare function TasksDialog({ tasks, showCompleted, onShowCompletedChange, onSelectTask, open, onOpenChange, className }: TasksDialogProps): import("react").JSX.Element;
|
|
1002
|
+
//#endregion
|
|
979
1003
|
//#region src/components/agent/UsageMeters.d.ts
|
|
980
1004
|
declare function useMinuteClock(active?: boolean): number;
|
|
981
1005
|
declare function UsageMeters({ windows, now, className }: {
|
|
@@ -1062,14 +1086,13 @@ interface SessionBrowserProps {
|
|
|
1062
1086
|
onRename?: (row: SessionRow, title: string) => void;
|
|
1063
1087
|
onClearContext?: (row: SessionRow) => void;
|
|
1064
1088
|
onSelectSubagent?: (row: SessionRow, toolUseId: string) => void;
|
|
1065
|
-
onRevealStep?: (row: SessionRow, toolUseId: string) => void;
|
|
1066
1089
|
emptyState?: React.ReactNode;
|
|
1067
1090
|
showControls?: boolean;
|
|
1068
1091
|
projectIcons?: Record<string, string>;
|
|
1069
1092
|
className?: string;
|
|
1070
1093
|
}
|
|
1071
1094
|
declare function rowShapeClass(active: boolean): string;
|
|
1072
|
-
declare function SessionBrowser({ rows, config, onConfigChange, scope, activeId, activeSubagentId, onSelect, onDelete, onRename, onClearContext, onSelectSubagent,
|
|
1095
|
+
declare function SessionBrowser({ rows, config, onConfigChange, scope, activeId, activeSubagentId, onSelect, onDelete, onRename, onClearContext, onSelectSubagent, emptyState, showControls, projectIcons, className }: SessionBrowserProps): import("react").JSX.Element;
|
|
1073
1096
|
//#endregion
|
|
1074
1097
|
//#region src/components/agent/SessionItem.d.ts
|
|
1075
1098
|
interface SessionItemProps {
|
|
@@ -1083,7 +1106,6 @@ interface SessionItemProps {
|
|
|
1083
1106
|
onExpandedChange?: (expanded: boolean) => void;
|
|
1084
1107
|
onSelect?: () => void;
|
|
1085
1108
|
onSelectSubagent?: (toolUseId: string) => void;
|
|
1086
|
-
onRevealStep?: (toolUseId: string) => void;
|
|
1087
1109
|
onRename?: (title: string) => void;
|
|
1088
1110
|
renameOn?: 'doubleClick' | 'external';
|
|
1089
1111
|
editing?: boolean;
|
|
@@ -1091,7 +1113,7 @@ interface SessionItemProps {
|
|
|
1091
1113
|
actions?: ReactNode;
|
|
1092
1114
|
className?: string;
|
|
1093
1115
|
}
|
|
1094
|
-
declare function SessionItem({ row, active, activeStepKey, showGateway, showProject, projectIcons, expanded, onExpandedChange, onSelect, onSelectSubagent,
|
|
1116
|
+
declare function SessionItem({ row, active, activeStepKey, showGateway, showProject, projectIcons, expanded, onExpandedChange, onSelect, onSelectSubagent, onRename, renameOn, editing, onEditingChange, actions, className }: SessionItemProps): import("react").JSX.Element;
|
|
1095
1117
|
//#endregion
|
|
1096
1118
|
//#region src/components/agent/EngineIcon.d.ts
|
|
1097
1119
|
declare function engineMark(engine: string, model?: string): string | undefined;
|
|
@@ -1108,13 +1130,12 @@ type Step = {
|
|
|
1108
1130
|
key: string;
|
|
1109
1131
|
label: string;
|
|
1110
1132
|
noun: string;
|
|
1111
|
-
|
|
1112
|
-
state: 'done' | 'running' | 'pending' | 'failed';
|
|
1133
|
+
state: 'done' | 'running' | 'failed';
|
|
1113
1134
|
detail?: string;
|
|
1114
1135
|
title: string;
|
|
1115
1136
|
onSelect: () => void;
|
|
1116
1137
|
};
|
|
1117
|
-
declare function sessionSteps(info: SessionInfo, onSelect: (toolUseId: string
|
|
1138
|
+
declare function sessionSteps(info: SessionInfo, onSelect: (toolUseId: string) => void): Step[];
|
|
1118
1139
|
declare function runningSteps(steps: readonly Step[]): number;
|
|
1119
1140
|
declare function StepToggle({ expanded, running, total, noun, onToggle }: {
|
|
1120
1141
|
expanded: boolean;
|
|
@@ -1189,5 +1210,5 @@ declare function copyText(value: string): Promise<boolean>;
|
|
|
1189
1210
|
declare function toolIcon(toolName: string): LucideIcon;
|
|
1190
1211
|
declare function isMutatingTool(toolName: string): boolean;
|
|
1191
1212
|
//#endregion
|
|
1192
|
-
export { AlertDialog, AlertDialogClose, AlertDialogContent, AlertDialogDescription, AlertDialogTitle, AlertDialogTrigger, Badge, type BadgeProps, Band, Blank, Button, type ButtonProps, Card, CardContent, CardHeader, CardTitle, type ChipSegment, CodeBlock, type CodeBlockProps, Composer, type ComposerFileMatch, type ComposerHandle, type ComposerProps, ContextDialog, type ContextDialogProps, ContextRing, Conversation, ConversationContent, type ConversationProps, ConversationScrollButton, CopyAction, CopyButton, type CopyButtonProps, Dialog, DialogBody, DialogClose, DialogContent, DialogHeader, DialogRow, DialogTrigger, Empty, EmptyKey, EngineIcon, FileCard, type FileCardProps, type FileDeliveredItem, type HeldSend, type HeldSends, HeldSendsBar, HostFilesDialog, type HostFilesDialogProps, Ink, 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, ProjectIcon, PromptArea, type PromptAreaHandle, type PromptAreaProps, PromptTokenText, QUESTION_BEHAVIORS, type QuestionBehaviorMeta, QuestionPrompt, type QuestionPromptProps, Reasoning, type ReasoningProps, Response, type ResponseProps, Row, type RowProps, STATUS_META, type Segment, Select, SelectContent, SelectItem, SelectItemText, SelectTrigger, SelectValue, SessionBrowser, type SessionBrowserProps, type SessionControls, SessionEmptyState, type SessionEmptyStateProps, SessionInfoDialog, type SessionInfoDialogProps, SessionItem, type SessionItemProps, 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 Step, StepRow, StepToggle, SubagentStrip, type TerminalAffordances, TerminalDiff, TerminalItemView, TerminalMarkdown, type TerminalMarkdownProps, type TerminalMetrics, TerminalPermissionPrompt, type TerminalPermissionPromptProps, TerminalQuestionPrompt, type TerminalQuestionPromptProps, TerminalStatusLine, type TerminalStatusLineProps, TerminalSurface, type TerminalSurfaceProps, TerminalTranscript, type TerminalTranscriptProps, type TextSegment, Textarea, Tip, Toaster, type Tone, ToolCallCard, type ToolCallCardProps, type ToolCallItem, ToolTitleProvider, TooltipContent, TooltipProvider, Transcript, type TranscriptDensity, TranscriptDensityProvider, type TranscriptFont, type TranscriptProps, type TranscriptVariant, TranscriptVariantProvider, type TriggerConfig, type TriggerSuggestion, UsageDialog, type UsageDialogProps, UsageMeters, WithActions, badgeVariants, buttonVariants, cn, commandTrigger, copyText, engineMark, formatAgoPrecise, formatBytes, formatCost, formatCountdown, formatDuration, formatRateLimitWindow, formatRateLimitWindowLong, formatRelativeTime, formatTokens, friendlyModel, getChipsByTrigger, hashtagTrigger, isMutatingTool, isSegmentsEmpty, mentionTrigger, parseUserQuestions, permissionModeChoices, permissionModeMeta, plainTextToSegments, previewPatch, rateLimitWindowSeconds, rowShapeClass, runningSteps, segmentsToPlainText, sessionSteps, skillPrompt, toast, toolIcon, toolInputPreview, useAffordances, useHeldSends, useMinuteClock, usePromptAreaState, useToolTitle, useTranscriptDensity, useTranscriptVariant, vendorMarkClass, vendorTextClass };
|
|
1213
|
+
export { AlertDialog, AlertDialogClose, AlertDialogContent, AlertDialogDescription, AlertDialogTitle, AlertDialogTrigger, Badge, type BadgeProps, Band, Blank, Button, type ButtonProps, Card, CardContent, CardHeader, CardTitle, type ChipSegment, CodeBlock, type CodeBlockProps, Composer, type ComposerFileMatch, type ComposerHandle, type ComposerProps, ContextDialog, type ContextDialogProps, ContextRing, Conversation, ConversationContent, type ConversationProps, ConversationScrollButton, CopyAction, CopyButton, type CopyButtonProps, Dialog, DialogBody, DialogClose, DialogContent, DialogHeader, DialogRow, DialogTrigger, Empty, EmptyKey, EngineIcon, FileCard, type FileCardProps, type FileDeliveredItem, type HeldSend, type HeldSends, HeldSendsBar, HostFilesDialog, type HostFilesDialogProps, Ink, 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, ProjectIcon, PromptArea, type PromptAreaHandle, type PromptAreaProps, PromptTokenText, QUESTION_BEHAVIORS, type QuestionBehaviorMeta, QuestionPrompt, type QuestionPromptProps, Reasoning, type ReasoningProps, Response, type ResponseProps, Row, type RowProps, STATUS_META, type Segment, Select, SelectContent, SelectItem, SelectItemText, SelectTrigger, SelectValue, SessionBrowser, type SessionBrowserProps, type SessionControls, SessionEmptyState, type SessionEmptyStateProps, SessionInfoDialog, type SessionInfoDialogProps, SessionItem, type SessionItemProps, 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 Step, StepRow, StepToggle, SubagentStrip, TaskList, type TaskListProps, TasksDialog, type TasksDialogProps, type TerminalAffordances, TerminalDiff, TerminalItemView, TerminalMarkdown, type TerminalMarkdownProps, type TerminalMetrics, TerminalPermissionPrompt, type TerminalPermissionPromptProps, TerminalQuestionPrompt, type TerminalQuestionPromptProps, TerminalStatusLine, type TerminalStatusLineProps, TerminalSurface, type TerminalSurfaceProps, TerminalTranscript, type TerminalTranscriptProps, type TextSegment, Textarea, Tip, Toaster, type Tone, ToolCallCard, type ToolCallCardProps, type ToolCallItem, ToolTitleProvider, TooltipContent, TooltipProvider, Transcript, type TranscriptDensity, TranscriptDensityProvider, type TranscriptFont, type TranscriptProps, type TranscriptVariant, TranscriptVariantProvider, type TriggerConfig, type TriggerSuggestion, UsageDialog, type UsageDialogProps, UsageMeters, WithActions, badgeVariants, buttonVariants, cn, commandTrigger, copyText, engineMark, formatAgoPrecise, formatBytes, formatCost, formatCountdown, formatDuration, formatRateLimitWindow, formatRateLimitWindowLong, formatRelativeTime, formatTokens, friendlyModel, getChipsByTrigger, hashtagTrigger, isMutatingTool, isSegmentsEmpty, mentionTrigger, parseUserQuestions, permissionModeChoices, permissionModeMeta, plainTextToSegments, previewPatch, rateLimitWindowSeconds, rowShapeClass, runningSteps, segmentsToPlainText, sessionSteps, skillPrompt, toast, toolIcon, toolInputPreview, useAffordances, useHeldSends, useMinuteClock, usePromptAreaState, useToolTitle, useTranscriptDensity, useTranscriptVariant, vendorMarkClass, vendorTextClass };
|
|
1193
1214
|
//# sourceMappingURL=index.d.mts.map
|
package/build/index.mjs
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { $ as
|
|
1
|
+
import { $ as Band, A as PermissionPrompt, At as DialogClose, Bt as Select, C as SessionInfoDialog, Ct as CopyButton, D as QuestionPrompt, Dt as TooltipProvider, E as QUESTION_BEHAVIORS, Et as TooltipContent, F as permissionModeMeta, Ft as Menu, G as Composer, Gt as SelectValue, H as TaskList, Ht as SelectItem, I as ModelSelect, It as MenuContent, J as ToolTitleProvider, Jt as Badge, K as skillPrompt, Kt as PortalScope, L as SkillsDialog, Lt as MenuItem, M as PERMISSION_MODES, Mt as DialogHeader, N as PermissionModeSelect, Nt as DialogRow, O as parseUserQuestions, Ot as Dialog, P as permissionModeChoices, Pt as DialogTrigger, Q as previewPatch, Qt as cn, R as McpDialog, Rt as MenuSeparator, S as STATUS_META, St as Spinner, T as TerminalPermissionPrompt, Tt as Tip, U as ContextDialog, Ut as SelectItemText, V as TasksDialog, Vt as SelectContent, W as contextNote, Wt as SelectTrigger, X as TerminalMarkdown, Xt as Button, Y as useToolTitle, Yt as badgeVariants, Z as TerminalDiff, Zt as buttonVariants, _ as Loader, _t as plainTextToSegments, a as HeldSendsBar, at as useAffordances, b as ConversationScrollButton, bt as Splitter, c as ToolCallCard, ct as TranscriptDensityProvider, d as Message, dt as useTranscriptVariant, et as Blank, f as MessageContent, ft as commandTrigger, g as SessionEmptyState, gt as PromptArea, h as TerminalTranscript, ht as usePromptAreaState, i as useMinuteClock, it as WithActions, j as Response, jt as DialogContent, k as SubagentStrip, kt as DialogBody, l as Reasoning, lt as TranscriptVariantProvider, m as TerminalItemView, mt as mentionTrigger, n as UsageDialog, nt as Row, o as useHeldSends, ot as isMutatingTool, p as FileCard, pt as hashtagTrigger, q as TerminalSurface, qt as Input, r as UsageMeters, rt as CopyAction, s as Transcript, st as toolIcon, t as SessionPanel, tt as Ink, u as PromptTokenText, ut as useTranscriptDensity, v as Conversation, vt as segmentsToPlainText, w as TerminalQuestionPrompt, wt as copyText, x as StatusBar, xt as CodeBlock, y as ConversationContent, yt as ProgressRing, z as HostFilesDialog, zt as MenuTrigger } from "./SessionPanel-CE5AVkg6.mjs";
|
|
2
2
|
import { C as toolInputPreview, S as rateLimitWindowSeconds, _ as formatRateLimitWindow, b as formatTokens, c as tightestWindow, f as formatAgoPrecise, g as formatDuration, h as formatCountdown, i as meterSeverity, m as formatCost, 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-C4TAgVSc.mjs";
|
|
3
3
|
import { Fragment, forwardRef, useEffect, useMemo, useRef, useState } from "react";
|
|
4
4
|
import { Fragment as Fragment$1, jsx, jsxs } from "react/jsx-runtime";
|
|
5
|
-
import { Anchor, ArrowRight, Atom, Beaker, BellRing, Bike, Binary, Blocks, Bot, Box, Brain, Briefcase, Brush, Bug, Building2, Cable, Camera, Car, Cat, Check, ChevronDown, ChevronRight, CircleAlert, CircleSlash, CircuitBoard, Cloud, Code, Coffee, Cog, Compass, Container, Cpu, CreditCard, Database, Diamond, Dog,
|
|
5
|
+
import { Anchor, ArrowRight, Atom, Beaker, BellRing, Bike, Binary, Blocks, Bot, Box, Brain, Briefcase, Brush, Bug, Building2, Cable, Camera, Car, Cat, Check, ChevronDown, ChevronRight, CircleAlert, CircleSlash, CircuitBoard, Cloud, Code, Coffee, Cog, Compass, Container, Cpu, CreditCard, Database, Diamond, Dog, Eraser, Feather, Film, Flame, FlaskConical, Folder, Gamepad2, Gauge, Gem, Ghost, Gift, GitBranch, Globe, GraduationCap, Hammer, Hexagon, House, Image, Key, Landmark, Laptop, Layers, Leaf, Library, Lightbulb, Lock, Mail, Map as Map$1, MessageCircle, Mic, Monitor, Moon, Mountain, Music, Network, Newspaper, Notebook, Orbit, Package, Palette, PauseCircle, PenTool, Pencil, Phone, PiggyBank, Plane, Plug, Puzzle, Radar, Radio, Receipt, Rocket, Ruler, Satellite, Scale, Scissors, Search, SearchX, Server, Shield, Ship, ShoppingCart, Signal, Smartphone, Sparkles, Sprout, Square, Star, Sun, Table, Tag, Target, Telescope, Terminal, TestTube, Trash2, TreePine, Trophy, Truck, Umbrella, Users, Wallet, Wand, Waves, Webhook, Wifi, Wrench, X, Zap } from "lucide-react";
|
|
6
6
|
import { AlertDialog as AlertDialog$1 } from "@base-ui/react/alert-dialog";
|
|
7
7
|
import { Toaster as Toaster$1, toast } from "sonner";
|
|
8
8
|
import { STATE_LABELS, STATE_ORDER, adaptersOf, clearFilters, filterRows, groupRows, hasFacetFilter, isAgentRecord, projectLabel, projectSubpath, projectsOf, sessionLabel, subagentLabel, subsetSummary } from "@workerdeck/protocol";
|
|
@@ -522,20 +522,15 @@ function SessionStatusIcon({ row, className }) {
|
|
|
522
522
|
//#endregion
|
|
523
523
|
//#region src/components/agent/SessionSteps.tsx
|
|
524
524
|
function sessionSteps(info, onSelect) {
|
|
525
|
-
|
|
526
|
-
|
|
527
|
-
|
|
528
|
-
|
|
529
|
-
|
|
530
|
-
|
|
531
|
-
|
|
532
|
-
|
|
533
|
-
|
|
534
|
-
title: `${subagentLabel(sub)} · ${sub.toolCount} tool${sub.toolCount === 1 ? "" : "s"}`,
|
|
535
|
-
onSelect: () => onSelect(sub.toolUseId, kind)
|
|
536
|
-
};
|
|
537
|
-
});
|
|
538
|
-
return [...steps.filter((s) => s.kind === "agent"), ...steps.filter((s) => s.kind === "task")];
|
|
525
|
+
return (info.subagents ?? []).filter(isAgentRecord).map((sub) => ({
|
|
526
|
+
key: sub.toolUseId,
|
|
527
|
+
label: subagentLabel(sub),
|
|
528
|
+
noun: "agent",
|
|
529
|
+
state: stepState(sub.status),
|
|
530
|
+
detail: sub.toolCount > 0 ? String(sub.toolCount) : void 0,
|
|
531
|
+
title: `${subagentLabel(sub)} · ${sub.toolCount} tool${sub.toolCount === 1 ? "" : "s"}`,
|
|
532
|
+
onSelect: () => onSelect(sub.toolUseId)
|
|
533
|
+
}));
|
|
539
534
|
}
|
|
540
535
|
function stepState(status) {
|
|
541
536
|
switch (status) {
|
|
@@ -568,23 +563,18 @@ function StepToggle({ expanded, running, total, noun, onToggle }) {
|
|
|
568
563
|
});
|
|
569
564
|
}
|
|
570
565
|
function StepRow({ step, active = false, onSelect }) {
|
|
571
|
-
const
|
|
572
|
-
const selected = active && agent;
|
|
573
|
-
const body = step.state === "failed" ? "text-danger" : agent ? "text-success" : "text-fg-4";
|
|
566
|
+
const body = step.state === "failed" ? "text-danger" : "text-success";
|
|
574
567
|
return /* @__PURE__ */ jsxs("button", {
|
|
575
568
|
type: "button",
|
|
576
569
|
title: step.title,
|
|
577
|
-
"aria-current":
|
|
570
|
+
"aria-current": active || void 0,
|
|
578
571
|
onClick: (e) => {
|
|
579
572
|
e.stopPropagation();
|
|
580
573
|
onSelect();
|
|
581
574
|
},
|
|
582
|
-
className: cn("flex w-full items-center gap-1.5 rounded-[4px] py-1 pr-2.5 pl-3.5", "text-left text-micro outline-none",
|
|
575
|
+
className: cn("flex w-full items-center gap-1.5 rounded-[4px] py-1 pr-2.5 pl-3.5", "text-left text-micro outline-none", active ? "bg-row-selected" : "hover:bg-row-active", body),
|
|
583
576
|
children: [
|
|
584
|
-
/* @__PURE__ */ jsx(StepIcon, {
|
|
585
|
-
state: step.state,
|
|
586
|
-
kind: step.kind
|
|
587
|
-
}),
|
|
577
|
+
/* @__PURE__ */ jsx(StepIcon, { state: step.state }),
|
|
588
578
|
/* @__PURE__ */ jsx("span", {
|
|
589
579
|
className: "min-w-0 flex-1 truncate",
|
|
590
580
|
children: step.label
|
|
@@ -593,22 +583,20 @@ function StepRow({ step, active = false, onSelect }) {
|
|
|
593
583
|
className: "shrink-0 tabular-nums text-fg-4",
|
|
594
584
|
children: step.detail
|
|
595
585
|
}) : null,
|
|
596
|
-
|
|
586
|
+
/* @__PURE__ */ jsx(ArrowRight, { className: "size-3.5 shrink-0 text-fg-4" })
|
|
597
587
|
]
|
|
598
588
|
});
|
|
599
589
|
}
|
|
600
|
-
function StepIcon({ state
|
|
601
|
-
if (kind === "task" && state !== "running" && state !== "failed") return /* @__PURE__ */ jsx(Dot, { className: "size-[11px] shrink-0" });
|
|
590
|
+
function StepIcon({ state }) {
|
|
602
591
|
switch (state) {
|
|
603
592
|
case "running": return /* @__PURE__ */ jsx(Spinner, { className: "size-[11px] shrink-0" });
|
|
604
593
|
case "failed": return /* @__PURE__ */ jsx(CircleAlert, { className: "size-[11px] shrink-0" });
|
|
605
|
-
case "pending": return /* @__PURE__ */ jsx(PauseCircle, { className: "size-[11px] shrink-0" });
|
|
606
594
|
default: return /* @__PURE__ */ jsx(Check, { className: "size-[11px] shrink-0" });
|
|
607
595
|
}
|
|
608
596
|
}
|
|
609
597
|
//#endregion
|
|
610
598
|
//#region src/components/agent/SessionItem.tsx
|
|
611
|
-
function SessionItem({ row, active = false, activeStepKey, showGateway, showProject = true, projectIcons, expanded, onExpandedChange, onSelect, onSelectSubagent,
|
|
599
|
+
function SessionItem({ row, active = false, activeStepKey, showGateway, showProject = true, projectIcons, expanded, onExpandedChange, onSelect, onSelectSubagent, onRename, renameOn = "doubleClick", editing, onEditingChange, actions, className }) {
|
|
612
600
|
const { info } = row;
|
|
613
601
|
const [ownExpanded, setOwnExpanded] = useState(false);
|
|
614
602
|
const open = expanded ?? ownExpanded;
|
|
@@ -645,11 +633,8 @@ function SessionItem({ row, active = false, activeStepKey, showGateway, showProj
|
|
|
645
633
|
className: "mr-1.5 size-4 align-[-0.3em]"
|
|
646
634
|
}), project] }, "project"));
|
|
647
635
|
for (const extra of extras) parts.push(/* @__PURE__ */ jsx("span", { children: extra }, extra));
|
|
648
|
-
const steps = sessionSteps(info, (toolUseId
|
|
649
|
-
|
|
650
|
-
return onRevealStep ? onRevealStep(toolUseId) : onSelect?.();
|
|
651
|
-
});
|
|
652
|
-
const holdsOpenAgent = steps.some((s) => s.kind === "agent" && s.key === activeStepKey);
|
|
636
|
+
const steps = sessionSteps(info, (toolUseId) => onSelectSubagent ? onSelectSubagent(toolUseId) : onSelect?.());
|
|
637
|
+
const holdsOpenAgent = steps.some((s) => s.key === activeStepKey);
|
|
653
638
|
return /* @__PURE__ */ jsxs("div", {
|
|
654
639
|
"data-slot": "session-item",
|
|
655
640
|
"data-active": active || void 0,
|
|
@@ -783,7 +768,7 @@ function NameEditor({ initial, onCommit, onCancel }) {
|
|
|
783
768
|
function rowShapeClass(active) {
|
|
784
769
|
return cn("px-2 py-1.5 hover:bg-row-hover", active ? "mr-1 ml-0 rounded-r-md border-l-4 border-l-accent" : "mx-1 rounded-md");
|
|
785
770
|
}
|
|
786
|
-
function SessionBrowser({ rows, config, onConfigChange, scope, activeId, activeSubagentId, onSelect, onDelete, onRename, onClearContext, onSelectSubagent,
|
|
771
|
+
function SessionBrowser({ rows, config, onConfigChange, scope, activeId, activeSubagentId, onSelect, onDelete, onRename, onClearContext, onSelectSubagent, emptyState, showControls = true, projectIcons, className }) {
|
|
787
772
|
const visible = useMemo(() => filterRows(rows, config, scope), [
|
|
788
773
|
rows,
|
|
789
774
|
config,
|
|
@@ -991,8 +976,7 @@ function SessionBrowser({ rows, config, onConfigChange, scope, activeId, activeS
|
|
|
991
976
|
onDelete,
|
|
992
977
|
onRename,
|
|
993
978
|
onClearContext,
|
|
994
|
-
onSelectSubagent
|
|
995
|
-
onRevealStep
|
|
979
|
+
onSelectSubagent
|
|
996
980
|
}, `${row.hostId}:${row.info.id}`))]
|
|
997
981
|
}, group.key))
|
|
998
982
|
})
|
|
@@ -1003,7 +987,7 @@ function iconSrcOf(row, icons) {
|
|
|
1003
987
|
const icon = row?.info.project?.icon;
|
|
1004
988
|
return icon?.type === "image" ? icons?.[icon.hash] : void 0;
|
|
1005
989
|
}
|
|
1006
|
-
function SessionRowItem({ row, active, activeSubagentId, showGateway, showProject = true, projectIcons, onSelect, onDelete, onRename, onClearContext, onSelectSubagent
|
|
990
|
+
function SessionRowItem({ row, active, activeSubagentId, showGateway, showProject = true, projectIcons, onSelect, onDelete, onRename, onClearContext, onSelectSubagent }) {
|
|
1007
991
|
const { info } = row;
|
|
1008
992
|
const [editing, setEditing] = useState(false);
|
|
1009
993
|
return /* @__PURE__ */ jsx(SessionItem, {
|
|
@@ -1015,7 +999,6 @@ function SessionRowItem({ row, active, activeSubagentId, showGateway, showProjec
|
|
|
1015
999
|
projectIcons,
|
|
1016
1000
|
onSelect: () => onSelect?.(row),
|
|
1017
1001
|
onSelectSubagent: onSelectSubagent ? (id) => onSelectSubagent(row, id) : void 0,
|
|
1018
|
-
onRevealStep: onRevealStep ? (id) => onRevealStep(row, id) : void 0,
|
|
1019
1002
|
onRename: onRename ? (title) => onRename(row, title) : void 0,
|
|
1020
1003
|
renameOn: "external",
|
|
1021
1004
|
editing,
|
|
@@ -1106,6 +1089,6 @@ function OneOfSelect({ label, value, options, onChange }) {
|
|
|
1106
1089
|
});
|
|
1107
1090
|
}
|
|
1108
1091
|
//#endregion
|
|
1109
|
-
export { AlertDialog, AlertDialogClose, AlertDialogContent, AlertDialogDescription, AlertDialogTitle, AlertDialogTrigger, Badge, Band, Blank, Button, Card, CardContent, CardHeader, CardTitle, CodeBlock, Composer, ContextDialog, ContextRing, Conversation, ConversationContent, ConversationScrollButton, CopyAction, CopyButton, Dialog, DialogBody, DialogClose, DialogContent, DialogHeader, DialogRow, DialogTrigger, Empty, EmptyKey, EngineIcon, FileCard, HeldSendsBar, HostFilesDialog, Ink, Input, Loader, McpDialog, Menu, MenuContent, MenuItem, MenuSeparator, MenuTrigger, Message, MessageContent, ModelSelect, PERMISSION_MODES, PermissionModeSelect, PermissionPrompt, ProgressRing, ProjectIcon, PromptArea, PromptTokenText, QUESTION_BEHAVIORS, QuestionPrompt, Reasoning, Response, Row, STATUS_META, Select, SelectContent, SelectItem, SelectItemText, SelectTrigger, SelectValue, SessionBrowser, SessionEmptyState, SessionInfoDialog, SessionItem, SessionList, SessionListItem, SessionPanel, SessionStatusIcon, SkillsDialog, Spinner, Splitter, StatusBar, StepRow, StepToggle, SubagentStrip, TerminalDiff, TerminalItemView, TerminalMarkdown, TerminalPermissionPrompt, TerminalQuestionPrompt, TerminalStatusLine, TerminalSurface, TerminalTranscript, Textarea, Tip, Toaster, ToolCallCard, ToolTitleProvider, TooltipContent, TooltipProvider, Transcript, TranscriptDensityProvider, TranscriptVariantProvider, UsageDialog, UsageMeters, WithActions, badgeVariants, buttonVariants, cn, commandTrigger, copyText, engineMark, formatAgoPrecise, formatBytes, formatCost, formatCountdown, formatDuration, formatRateLimitWindow, formatRateLimitWindowLong, formatRelativeTime, formatTokens, friendlyModel, getChipsByTrigger, hashtagTrigger, isMutatingTool, isSegmentsEmpty, mentionTrigger, parseUserQuestions, permissionModeChoices, permissionModeMeta, plainTextToSegments, previewPatch, rateLimitWindowSeconds, rowShapeClass, runningSteps, segmentsToPlainText, sessionSteps, skillPrompt, toast, toolIcon, toolInputPreview, useAffordances, useHeldSends, useMinuteClock, usePromptAreaState, useToolTitle, useTranscriptDensity, useTranscriptVariant, vendorMarkClass, vendorTextClass };
|
|
1092
|
+
export { AlertDialog, AlertDialogClose, AlertDialogContent, AlertDialogDescription, AlertDialogTitle, AlertDialogTrigger, Badge, Band, Blank, Button, Card, CardContent, CardHeader, CardTitle, CodeBlock, Composer, ContextDialog, ContextRing, Conversation, ConversationContent, ConversationScrollButton, CopyAction, CopyButton, Dialog, DialogBody, DialogClose, DialogContent, DialogHeader, DialogRow, DialogTrigger, Empty, EmptyKey, EngineIcon, FileCard, HeldSendsBar, HostFilesDialog, Ink, Input, Loader, McpDialog, Menu, MenuContent, MenuItem, MenuSeparator, MenuTrigger, Message, MessageContent, ModelSelect, PERMISSION_MODES, PermissionModeSelect, PermissionPrompt, ProgressRing, ProjectIcon, PromptArea, PromptTokenText, QUESTION_BEHAVIORS, QuestionPrompt, Reasoning, Response, Row, STATUS_META, Select, SelectContent, SelectItem, SelectItemText, SelectTrigger, SelectValue, SessionBrowser, SessionEmptyState, SessionInfoDialog, SessionItem, SessionList, SessionListItem, SessionPanel, SessionStatusIcon, SkillsDialog, Spinner, Splitter, StatusBar, StepRow, StepToggle, SubagentStrip, TaskList, TasksDialog, TerminalDiff, TerminalItemView, TerminalMarkdown, TerminalPermissionPrompt, TerminalQuestionPrompt, TerminalStatusLine, TerminalSurface, TerminalTranscript, Textarea, Tip, Toaster, ToolCallCard, ToolTitleProvider, TooltipContent, TooltipProvider, Transcript, TranscriptDensityProvider, TranscriptVariantProvider, UsageDialog, UsageMeters, WithActions, badgeVariants, buttonVariants, cn, commandTrigger, copyText, engineMark, formatAgoPrecise, formatBytes, formatCost, formatCountdown, formatDuration, formatRateLimitWindow, formatRateLimitWindowLong, formatRelativeTime, formatTokens, friendlyModel, getChipsByTrigger, hashtagTrigger, isMutatingTool, isSegmentsEmpty, mentionTrigger, parseUserQuestions, permissionModeChoices, permissionModeMeta, plainTextToSegments, previewPatch, rateLimitWindowSeconds, rowShapeClass, runningSteps, segmentsToPlainText, sessionSteps, skillPrompt, toast, toolIcon, toolInputPreview, useAffordances, useHeldSends, useMinuteClock, usePromptAreaState, useToolTitle, useTranscriptDensity, useTranscriptVariant, vendorMarkClass, vendorTextClass };
|
|
1110
1093
|
|
|
1111
1094
|
//# sourceMappingURL=index.mjs.map
|