@workerdeck/ui 2.10.0 → 2.12.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-BVbau2eR.d.mts → SessionPanel-CJwp5B3q.d.mts} +8 -3
- package/build/index.d.mts +39 -20
- package/build/index.mjs +119 -52
- package/build/index.mjs.map +1 -1
- package/build/scoped.css +60 -11
- package/build/{use-path-links-CvcxdUXL.mjs → use-path-links-CepFsMdW.mjs} +541 -254
- package/build/use-path-links-CepFsMdW.mjs.map +1 -0
- package/build/workspace.d.mts +1 -1
- package/build/workspace.mjs +1 -1
- package/package.json +4 -4
- package/src/components/agent/Composer.tsx +28 -5
- package/src/components/agent/PromptTokenText.tsx +9 -1
- package/src/components/agent/SessionBrowser.tsx +17 -1
- package/src/components/agent/SessionItem.tsx +10 -26
- package/src/components/agent/SessionPanel.tsx +12 -0
- package/src/components/agent/SessionSteps.tsx +15 -55
- package/src/components/agent/SubagentToggle.tsx +69 -0
- package/src/components/agent/Transcript.tsx +91 -80
- package/src/components/agent/TranscriptItemView.tsx +2 -0
- package/src/components/agent/TranscriptRows.tsx +60 -56
- package/src/components/agent/UsageDialog.tsx +19 -6
- package/src/components/agent/composer-commands.ts +18 -0
- package/src/components/agent/pulse.tsx +53 -16
- package/src/components/agent/use-transcript-jumps.ts +25 -0
- package/src/components/terminal/TerminalTranscript.tsx +31 -27
- package/src/components/terminal/blocks.ts +15 -7
- package/src/components/terminal/height.ts +14 -5
- package/src/components/terminal/items.tsx +97 -11
- package/src/components/terminal/peer-names.tsx +16 -0
- package/src/components/terminal/row.tsx +1 -1
- package/src/components/terminal/tool-run.ts +68 -0
- package/src/index.ts +10 -2
- package/src/lib/session-cost.ts +12 -2
- package/src/lib/tool-icon.ts +5 -1
- package/src/styles/terminal.css +102 -1
- package/src/styles/theme.css +1 -1
- package/build/use-path-links-CvcxdUXL.mjs.map +0 -1
|
@@ -39,6 +39,10 @@ declare function mergeComposerRows(sources: {
|
|
|
39
39
|
skills?: readonly SkillInfo[];
|
|
40
40
|
}): ComposerRow[];
|
|
41
41
|
declare function rankComposerRows(query: string, rows: readonly ComposerRow[]): ComposerRow[];
|
|
42
|
+
declare function rankPeerSessions<T extends {
|
|
43
|
+
slug: string;
|
|
44
|
+
label: string;
|
|
45
|
+
}>(query: string, peers: readonly T[]): T[];
|
|
42
46
|
declare function matchClientCommand(text: string, commands: readonly ClientCommand[]): {
|
|
43
47
|
command: ClientCommand;
|
|
44
48
|
args: string;
|
|
@@ -152,6 +156,7 @@ interface SessionPanelProps {
|
|
|
152
156
|
terminalMetrics?: TerminalMetrics;
|
|
153
157
|
scrubber?: boolean;
|
|
154
158
|
bookmarks?: readonly string[];
|
|
159
|
+
peerMentions?: boolean;
|
|
155
160
|
onToggleBookmark?: (itemId: string) => void;
|
|
156
161
|
onOpenFile?: FileLinkOpener;
|
|
157
162
|
reveal?: {
|
|
@@ -211,7 +216,7 @@ type SessionVitals = {
|
|
|
211
216
|
itemCount: number;
|
|
212
217
|
totalCostUsd: number;
|
|
213
218
|
};
|
|
214
|
-
declare function SessionPanel({ client, sessionId, header, panelSurface, statusSurface, statusPlacement, onOpenPanel, onVitals, transcriptVariant, transcriptDensity, transcriptFont, affordances, terminalMetrics, scrubber, bookmarks, onToggleBookmark, reveal, subagents, openSubagent, onSubagentChange, stickyPrompt, controlsSurface, onControls, focusComposerOnClick, unseen, readOnly, approvalPrompts, toolHost, clientTools, cacheTranscript, emptyState, onLinkClick, onOpenFile, fontSize, className }: SessionPanelProps): import("react").JSX.Element;
|
|
219
|
+
declare function SessionPanel({ client, sessionId, header, panelSurface, statusSurface, statusPlacement, onOpenPanel, onVitals, transcriptVariant, transcriptDensity, transcriptFont, affordances, terminalMetrics, scrubber, bookmarks, peerMentions, onToggleBookmark, reveal, subagents, openSubagent, onSubagentChange, stickyPrompt, controlsSurface, onControls, focusComposerOnClick, unseen, readOnly, approvalPrompts, toolHost, clientTools, cacheTranscript, emptyState, onLinkClick, onOpenFile, fontSize, className }: SessionPanelProps): import("react").JSX.Element;
|
|
215
220
|
//#endregion
|
|
216
|
-
export { ClientCommand as A, PERMISSION_MODES as C, PermissionModeSelectProps as D, PermissionModeSelect as E,
|
|
217
|
-
//# sourceMappingURL=SessionPanel-
|
|
221
|
+
export { ClientCommand as A, PERMISSION_MODES as C, PermissionModeSelectProps as D, PermissionModeSelect as E, rankPeerSessions as F, skillPrompt as I, matchClientCommand as M, mergeComposerRows as N, permissionModeChoices as O, rankComposerRows as P, useAffordances as S, PermissionModeMeta as T, FileLinkProvider as _, SessionSurfacePanel as a, TerminalAffordances as b, TranscriptDensity as c, TranscriptVariant as d, TranscriptVariantProvider as f, FileLinkOpener as g, FileLinkHandle as h, SessionPanelProps as i, ComposerRow as j, permissionModeMeta as k, TranscriptDensityProvider as l, useTranscriptVariant as m, SessionControls as n, SessionVitals as o, useTranscriptDensity as p, SessionPanel as r, TerminalMetrics as s, ApprovalPromptProps as t, TranscriptFont as u, useFileLinks as v, PermissionModeChoice as w, WithActions as x, CopyAction as y };
|
|
222
|
+
//# sourceMappingURL=SessionPanel-CJwp5B3q.d.mts.map
|
package/build/index.d.mts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { a as formatCost, c as formatRateLimitWindow, d as formatTokens, f as friendlyModel, i as formatBytes, l as formatRateLimitWindowLong, m as toolInputPreview, o as formatCountdown, p as rateLimitWindowSeconds, r as formatAgoPrecise, s as formatDuration, u as formatRelativeTime } from "./format-eS_oUry-.mjs";
|
|
2
|
-
import { A as ClientCommand, C as PERMISSION_MODES, D as PermissionModeSelectProps, E as PermissionModeSelect, F as skillPrompt, M as matchClientCommand, N as mergeComposerRows, O as permissionModeChoices, P as rankComposerRows, S as useAffordances, T as PermissionModeMeta, _ as FileLinkProvider, a as SessionSurfacePanel, b as TerminalAffordances, c as TranscriptDensity, d as TranscriptVariant, f as TranscriptVariantProvider, g as FileLinkOpener, h as FileLinkHandle, i as SessionPanelProps, j as ComposerRow, k as permissionModeMeta, l as TranscriptDensityProvider, m as useTranscriptVariant, n as SessionControls, o as SessionVitals, p as useTranscriptDensity, r as SessionPanel, s as TerminalMetrics, t as ApprovalPromptProps, u as TranscriptFont, v as useFileLinks, w as PermissionModeChoice, x as WithActions, y as CopyAction } from "./SessionPanel-
|
|
2
|
+
import { A as ClientCommand, C as PERMISSION_MODES, D as PermissionModeSelectProps, E as PermissionModeSelect, F as rankPeerSessions, I as skillPrompt, M as matchClientCommand, N as mergeComposerRows, O as permissionModeChoices, P as rankComposerRows, S as useAffordances, T as PermissionModeMeta, _ as FileLinkProvider, a as SessionSurfacePanel, b as TerminalAffordances, c as TranscriptDensity, d as TranscriptVariant, f as TranscriptVariantProvider, g as FileLinkOpener, h as FileLinkHandle, i as SessionPanelProps, j as ComposerRow, k as permissionModeMeta, l as TranscriptDensityProvider, m as useTranscriptVariant, n as SessionControls, o as SessionVitals, p as useTranscriptDensity, r as SessionPanel, s as TerminalMetrics, t as ApprovalPromptProps, u as TranscriptFont, v as useFileLinks, w as PermissionModeChoice, x as WithActions, y as CopyAction } from "./SessionPanel-CJwp5B3q.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,8 +10,8 @@ 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 { ByModel, ContextReading, ContextUsage, FilePatch, ModelOption, PermissionRequest, ProfileEngine, ProfileSpend, ProjectIcon as ProjectIcon$1, QuestionBehavior, RateLimitInfo, SessionInfo, SessionRow, SessionStatus, SessionTask, SkillInfo, SlashCommandInfo, UsageWindowRow, ViewConfig, WorkspaceScope, parseUserQuestions } from "@workerdeck/protocol";
|
|
14
|
-
import { ConnectionState, TranscriptItem, TranscriptState, UseAttachmentsResult } from "@workerdeck/react";
|
|
13
|
+
import { ByModel, ContextReading, ContextUsage, FilePatch, ModelOption, PermissionRequest, PricingTable, ProfileEngine, ProfileSpend, ProjectIcon as ProjectIcon$1, QuestionBehavior, RateLimitInfo, SessionInfo, SessionRow, SessionStatus, SessionTask, SkillInfo, SlashCommandInfo, SubagentDisplay, UsageWindowRow, ViewConfig, WorkspaceScope, parseUserQuestions } from "@workerdeck/protocol";
|
|
14
|
+
import { ConnectionState, PeerSessionOption, TranscriptItem, TranscriptState, UseAttachmentsResult } from "@workerdeck/react";
|
|
15
15
|
import { WorkerDeckClient } from "@workerdeck/client";
|
|
16
16
|
//#region src/components/ui/Button.d.ts
|
|
17
17
|
declare const buttonVariants: (props?: ({
|
|
@@ -693,6 +693,7 @@ interface TranscriptProps {
|
|
|
693
693
|
stickyPrompt?: boolean;
|
|
694
694
|
scrubber?: boolean;
|
|
695
695
|
bookmarks?: readonly string[];
|
|
696
|
+
sessionNames?: readonly string[];
|
|
696
697
|
replaying?: boolean;
|
|
697
698
|
catchUp?: {
|
|
698
699
|
from: number;
|
|
@@ -711,7 +712,7 @@ interface TranscriptProps {
|
|
|
711
712
|
emptyState?: ReactNode;
|
|
712
713
|
className?: string;
|
|
713
714
|
}
|
|
714
|
-
declare function Transcript({ state, fileUrl, attachmentUrl, canBrowseFiles, hostImage, variant, density, fontSize, lineHeight, affordances, stickyPrompt, scrubber, bookmarks, replaying, catchUp, jumpToRecapRef, repinRef, reveal, frame, onOpenSubagent, emptyState, className }: TranscriptProps): import("react").JSX.Element;
|
|
715
|
+
declare function Transcript({ state, fileUrl, attachmentUrl, canBrowseFiles, hostImage, variant, density, fontSize, lineHeight, affordances, stickyPrompt, scrubber, bookmarks, sessionNames, replaying, catchUp, jumpToRecapRef, repinRef, reveal, frame, onOpenSubagent, emptyState, className }: TranscriptProps): import("react").JSX.Element;
|
|
715
716
|
//#endregion
|
|
716
717
|
//#region src/components/terminal/surface.d.ts
|
|
717
718
|
interface TerminalSurfaceProps extends HTMLAttributes<HTMLDivElement> {
|
|
@@ -782,7 +783,7 @@ interface TerminalMarkdownProps {
|
|
|
782
783
|
declare const TerminalMarkdown: import("react").MemoExoticComponent<({ children, streaming, className }: TerminalMarkdownProps) => import("react").JSX.Element>;
|
|
783
784
|
//#endregion
|
|
784
785
|
//#region src/components/terminal/row.d.ts
|
|
785
|
-
type Tone = 'fg' | 'bright' | 'dim' | 'faint' | 'mark' | 'blue' | 'green' | 'red' | 'yellow' | 'magenta';
|
|
786
|
+
type Tone = 'fg' | 'bright' | 'dim' | 'faint' | 'mark' | 'blue' | 'green' | 'red' | 'yellow' | 'magenta' | 'peer';
|
|
786
787
|
interface RowProps extends Omit<HTMLAttributes<HTMLDivElement>, 'children'> {
|
|
787
788
|
glyph?: ReactNode;
|
|
788
789
|
glyphTone?: Tone;
|
|
@@ -943,6 +944,7 @@ interface ComposerProps {
|
|
|
943
944
|
onSearchFiles?: (query: string, options: {
|
|
944
945
|
signal: AbortSignal;
|
|
945
946
|
}) => Promise<ComposerFileMatch[]>;
|
|
947
|
+
peers?: readonly PeerSessionOption[];
|
|
946
948
|
onShellCommand?: (command: string) => void;
|
|
947
949
|
attachments?: UseAttachmentsResult;
|
|
948
950
|
toolbar?: ReactNode;
|
|
@@ -958,7 +960,7 @@ interface ComposerProps {
|
|
|
958
960
|
className?: string;
|
|
959
961
|
ref?: Ref<ComposerHandle>;
|
|
960
962
|
}
|
|
961
|
-
declare function Composer({ onSend, onInterrupt, busy, disabled, placeholder, commands, skills, clientCommands, onSearchFiles, onShellCommand, attachments, toolbar, layout, fontSize, lineHeight, affordances, draft, className, ref }: ComposerProps): import("react").JSX.Element;
|
|
963
|
+
declare function Composer({ onSend, onInterrupt, busy, disabled, placeholder, commands, skills, clientCommands, onSearchFiles, peers, onShellCommand, attachments, toolbar, layout, fontSize, lineHeight, affordances, draft, className, ref }: ComposerProps): import("react").JSX.Element;
|
|
962
964
|
//#endregion
|
|
963
965
|
//#region src/components/agent/ModelSelect.d.ts
|
|
964
966
|
interface ModelSelectProps {
|
|
@@ -1008,13 +1010,14 @@ interface UsageDialogProps {
|
|
|
1008
1010
|
totalCostUsd?: number;
|
|
1009
1011
|
costUsd?: number;
|
|
1010
1012
|
usageByModel?: ByModel;
|
|
1013
|
+
pricing?: PricingTable;
|
|
1011
1014
|
spend?: ProfileSpend;
|
|
1012
1015
|
updatedAt?: number;
|
|
1013
1016
|
open: boolean;
|
|
1014
1017
|
onOpenChange: (open: boolean) => void;
|
|
1015
1018
|
className?: string;
|
|
1016
1019
|
}
|
|
1017
|
-
declare function UsageDialog({ rateLimits, subscriptionType, engine, totalCostUsd, costUsd, usageByModel, spend, updatedAt, open, onOpenChange, className }: UsageDialogProps): import("react").JSX.Element;
|
|
1020
|
+
declare function UsageDialog({ rateLimits, subscriptionType, engine, totalCostUsd, costUsd, usageByModel, pricing, spend, updatedAt, open, onOpenChange, className }: UsageDialogProps): import("react").JSX.Element;
|
|
1018
1021
|
//#endregion
|
|
1019
1022
|
//#region src/components/agent/TaskList.d.ts
|
|
1020
1023
|
interface TaskListProps {
|
|
@@ -1145,8 +1148,7 @@ interface SessionItemProps {
|
|
|
1145
1148
|
showGateway?: boolean;
|
|
1146
1149
|
showProject?: boolean;
|
|
1147
1150
|
projectIcons?: Record<string, string>;
|
|
1148
|
-
|
|
1149
|
-
onExpandedChange?: (expanded: boolean) => void;
|
|
1151
|
+
subagents?: SubagentDisplay;
|
|
1150
1152
|
onSelect?: (modifiers: SelectModifiers) => void;
|
|
1151
1153
|
onSelectSubagent?: (toolUseId: string) => void;
|
|
1152
1154
|
onRename?: (title: string) => void;
|
|
@@ -1156,7 +1158,7 @@ interface SessionItemProps {
|
|
|
1156
1158
|
actions?: ReactNode;
|
|
1157
1159
|
className?: string;
|
|
1158
1160
|
}
|
|
1159
|
-
declare function SessionItem({ row, active, activeStepKey, showGateway, showProject, projectIcons,
|
|
1161
|
+
declare function SessionItem({ row, active, activeStepKey, showGateway, showProject, projectIcons, subagents, onSelect, onSelectSubagent, onRename, renameOn, editing, onEditingChange, actions, className }: SessionItemProps): import("react").JSX.Element;
|
|
1160
1162
|
//#endregion
|
|
1161
1163
|
//#region src/components/agent/EngineIcon.d.ts
|
|
1162
1164
|
declare function engineMark(engine: string, model?: string): string | undefined;
|
|
@@ -1178,21 +1180,30 @@ type Step = {
|
|
|
1178
1180
|
title: string;
|
|
1179
1181
|
onSelect: () => void;
|
|
1180
1182
|
};
|
|
1181
|
-
declare function sessionSteps(info: SessionInfo, onSelect: (toolUseId: string) => void): Step[];
|
|
1182
|
-
declare function runningSteps(steps: readonly Step[]): number;
|
|
1183
|
-
declare function StepToggle({ expanded, running, total, noun, onToggle }: {
|
|
1184
|
-
expanded: boolean;
|
|
1185
|
-
running: number;
|
|
1186
|
-
total: number;
|
|
1187
|
-
noun: string;
|
|
1188
|
-
onToggle: () => void;
|
|
1189
|
-
}): import("react").JSX.Element;
|
|
1183
|
+
declare function sessionSteps(info: SessionInfo, onSelect: (toolUseId: string) => void, show?: SubagentDisplay): Step[];
|
|
1190
1184
|
declare function StepRow({ step, active, onSelect }: {
|
|
1191
1185
|
step: Step;
|
|
1192
1186
|
active?: boolean;
|
|
1193
1187
|
onSelect: () => void;
|
|
1194
1188
|
}): import("react").JSX.Element;
|
|
1195
1189
|
//#endregion
|
|
1190
|
+
//#region src/components/agent/SubagentToggle.d.ts
|
|
1191
|
+
declare const SUBAGENT_DISPLAY_ORDER: readonly SubagentDisplay[];
|
|
1192
|
+
declare const SUBAGENT_DISPLAY_META: Record<SubagentDisplay, {
|
|
1193
|
+
label: string;
|
|
1194
|
+
hint: string;
|
|
1195
|
+
}>;
|
|
1196
|
+
declare function SubagentDisplayIcon({ value, className }: {
|
|
1197
|
+
value: SubagentDisplay;
|
|
1198
|
+
className?: string;
|
|
1199
|
+
}): import("react").JSX.Element;
|
|
1200
|
+
type SubagentToggleProps = {
|
|
1201
|
+
value: SubagentDisplay;
|
|
1202
|
+
onChange: (value: SubagentDisplay) => void;
|
|
1203
|
+
className?: string;
|
|
1204
|
+
};
|
|
1205
|
+
declare function SubagentToggle({ value, onChange, className }: SubagentToggleProps): import("react").JSX.Element;
|
|
1206
|
+
//#endregion
|
|
1196
1207
|
//#region src/components/agent/SubagentStrip.d.ts
|
|
1197
1208
|
declare function SubagentStrip({ task, items, label, onBack, terminal, fontSize, lineHeight }: {
|
|
1198
1209
|
task: ToolCallItem$1 | undefined;
|
|
@@ -1223,6 +1234,14 @@ interface SessionEmptyStateProps {
|
|
|
1223
1234
|
declare function SessionEmptyState({ cwd, hasCommands, hasSkills, canBrowseFiles, className }: SessionEmptyStateProps): import("react").JSX.Element;
|
|
1224
1235
|
//#endregion
|
|
1225
1236
|
//#region src/components/agent/PromptTokenText.d.ts
|
|
1237
|
+
declare function SkillNamesProvider({ names, children }: {
|
|
1238
|
+
names: readonly string[] | undefined;
|
|
1239
|
+
children: ReactNode;
|
|
1240
|
+
}): import("react").JSX.Element;
|
|
1241
|
+
declare function SessionNamesProvider({ names, children }: {
|
|
1242
|
+
names: readonly string[] | undefined;
|
|
1243
|
+
children: ReactNode;
|
|
1244
|
+
}): import("react").JSX.Element;
|
|
1226
1245
|
declare function PromptTokenText({ text, className }: {
|
|
1227
1246
|
text: string;
|
|
1228
1247
|
className?: string;
|
|
@@ -1253,5 +1272,5 @@ declare function copyText(value: string): Promise<boolean>;
|
|
|
1253
1272
|
declare function toolIcon(toolName: string): LucideIcon;
|
|
1254
1273
|
declare function isMutatingTool(toolName: string): boolean;
|
|
1255
1274
|
//#endregion
|
|
1256
|
-
export { AlertDialog, AlertDialogClose, AlertDialogContent, AlertDialogDescription, AlertDialogTitle, AlertDialogTrigger, type ApprovalPromptProps, Badge, type BadgeProps, Band, Blank, Button, type ButtonProps, Card, CardContent, CardHeader, CardTitle, type ChipSegment, type ClientCommand, CodeBlock, type CodeBlockProps, Composer, type ComposerFileMatch, type ComposerHandle, type ComposerProps, type ComposerRow, 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 FileLink, type FileLinkHandle, type FileLinkOpener, FileLinkProvider, HostFilesDialog, type HostFilesDialogProps, Ink, Input, Loader, McpDialog, type McpDialogProps, Menu, MenuContent, MenuItem, MenuSeparator, MenuTrigger, Message, MessageContent, type MessageProps, ModelSelect, type ModelSelectProps, PERMISSION_MODES, type PathHit, type PathMatch, 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, type SelectModifiers, 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,
|
|
1275
|
+
export { AlertDialog, AlertDialogClose, AlertDialogContent, AlertDialogDescription, AlertDialogTitle, AlertDialogTrigger, type ApprovalPromptProps, Badge, type BadgeProps, Band, Blank, Button, type ButtonProps, Card, CardContent, CardHeader, CardTitle, type ChipSegment, type ClientCommand, CodeBlock, type CodeBlockProps, Composer, type ComposerFileMatch, type ComposerHandle, type ComposerProps, type ComposerRow, 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 FileLink, type FileLinkHandle, type FileLinkOpener, FileLinkProvider, HostFilesDialog, type HostFilesDialogProps, Ink, Input, Loader, McpDialog, type McpDialogProps, Menu, MenuContent, MenuItem, MenuSeparator, MenuTrigger, Message, MessageContent, type MessageProps, ModelSelect, type ModelSelectProps, PERMISSION_MODES, type PathHit, type PathMatch, 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, SUBAGENT_DISPLAY_META, SUBAGENT_DISPLAY_ORDER, type Segment, Select, SelectContent, SelectItem, SelectItemText, type SelectModifiers, SelectTrigger, SelectValue, SessionBrowser, type SessionBrowserProps, type SessionControls, SessionEmptyState, type SessionEmptyStateProps, SessionInfoDialog, type SessionInfoDialogProps, SessionItem, type SessionItemProps, SessionList, SessionListItem, type SessionListItemProps, type SessionListProps, SessionNamesProvider, SessionPanel, type SessionPanelProps, SessionStatusIcon, type SessionSurfacePanel, type SessionVitals, SkillNamesProvider, SkillsDialog, type SkillsDialogProps, Spinner, Splitter, type SplitterProps, StatusBar, type StatusBarProps, type Step, StepRow, SubagentDisplayIcon, SubagentStrip, SubagentToggle, type SubagentToggleProps, 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, launchTrigger, matchClientCommand, matchPath, mentionTrigger, mergeComposerRows, parseFileLink, parseUserQuestions, permissionModeChoices, permissionModeMeta, plainTextToSegments, previewPatch, rankComposerRows, rankPeerSessions, rateLimitWindowSeconds, resolveAgainstCwd, rowShapeClass, segmentsToPlainText, sessionSteps, skillPrompt, toast, toolIcon, toolInputPreview, useAffordances, useFileLinks, useMinuteClock, usePathLinks, usePromptAreaState, useToolTitle, useTranscriptDensity, useTranscriptVariant, vendorMarkClass, vendorTextClass };
|
|
1257
1276
|
//# sourceMappingURL=index.d.mts.map
|
package/build/index.mjs
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import { $ as TerminalDiff, $t as
|
|
1
|
+
import { $ as TerminalDiff, $t as SelectItem, A as PermissionPrompt, At as ProgressRing, Bt as DialogBody, C as SessionInfoDialog, Ct as hashtagTrigger, D as QuestionPrompt, Dt as PromptArea, E as QUESTION_BEHAVIORS, Et as usePromptAreaState, F as permissionModeMeta, Ft as copyText, G as Composer, Gt as DialogTrigger, H as TaskList, Ht as DialogContent, I as ModelSelect, It as Tip, J as useToolTitle, Jt as MenuItem, K as TerminalSurface, Kt as Menu, L as SkillsDialog, Lt as TooltipContent, M as PERMISSION_MODES, Mt as CodeBlock, N as PermissionModeSelect, Nt as Spinner, O as parseUserQuestions, Ot as plainTextToSegments, P as permissionModeChoices, Pt as CopyButton, Q as parseFileLink, Qt as SelectContent, R as McpDialog, Rt as TooltipProvider, S as STATUS_META, St as commandTrigger, T as TerminalPermissionPrompt, Tt as mentionTrigger, U as ContextDialog, Ut as DialogHeader, V as TasksDialog, Vt as DialogClose, W as contextNote, Wt as DialogRow, X as FileLinkProvider, Xt as MenuTrigger, Y as TerminalMarkdown, Yt as MenuSeparator, Z as useFileLinks, Zt as Select, _ as Loader, _t as matchClientCommand, a as UsageDialog, an as Input, at as CopyAction, b as ConversationScrollButton, bt as rankPeerSessions, c as Transcript, cn as Button, ct as PromptTokenText, d as Message, dt as isMutatingTool, en as SelectItemText, et as previewPatch, f as MessageContent, ft as toolIcon, g as SessionEmptyState, gt as useTranscriptVariant, h as TerminalTranscript, ht as useTranscriptDensity, i as SessionPanel, in as Textarea, it as Row, j as Response, jt as Splitter, k as SubagentStrip, kt as segmentsToPlainText, l as ToolCallCard, ln as buttonVariants, lt as SessionNamesProvider, m as TerminalItemView, mt as TranscriptVariantProvider, n as usePathLinks, nn as SelectValue, nt as Blank, o as UsageMeters, on as Badge, ot as WithActions, p as FileCard, pt as TranscriptDensityProvider, q as ToolTitleProvider, qt as MenuContent, r as matchPath, rn as PortalScope, rt as Ink, s as useMinuteClock, sn as badgeVariants, st as useAffordances, t as resolveAgainstCwd, tn as SelectTrigger, tt as Band, u as Reasoning, un as cn, ut as SkillNamesProvider, v as Conversation, vt as mergeComposerRows, w as TerminalQuestionPrompt, wt as launchTrigger, x as StatusBar, xt as skillPrompt, y as ConversationContent, yt as rankComposerRows, z as HostFilesDialog, zt as Dialog } from "./use-path-links-CepFsMdW.mjs";
|
|
2
2
|
import { C as rateLimitWindowSeconds, S as friendlyModel, _ as formatDuration, b as formatRelativeTime, c as tightestWindow, g as formatCountdown, h as formatCost, i as meterSeverity, m as formatBytes, o as modelLabel, p as formatAgoPrecise, r as meterColorClass, s as statusPresentation, t as contextSeverity, u as windowLabel, v as formatRateLimitWindow, w as toolInputPreview, x as formatTokens, y as formatRateLimitWindowLong } from "./status-kmsBhuFG.mjs";
|
|
3
3
|
import { Fragment, 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,
|
|
5
|
+
import { Anchor, ArrowRight, Atom, Beaker, BellRing, Bike, Binary, Blocks, Bot, Box, Brain, Briefcase, Brush, Bug, Building2, Cable, Camera, Car, Cat, Check, ChevronDown, 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
|
-
import { STATE_LABELS, STATE_ORDER, adaptersOf, clearFilters, filterRows, groupRows, hasFacetFilter, isAgentRecord, projectLabel, projectSubpath, projectsOf, sessionLabel, subagentLabel, subsetSummary } from "@workerdeck/protocol";
|
|
8
|
+
import { STATE_LABELS, STATE_ORDER, adaptersOf, clearFilters, filterRows, groupRows, hasFacetFilter, isAgentRecord, projectLabel, projectName, projectSubpath, projectsOf, sessionLabel, subagentLabel, subsetSummary, visibleSubagents } from "@workerdeck/protocol";
|
|
9
9
|
//#region src/components/ui/Card.tsx
|
|
10
10
|
function Card({ className, ...props }) {
|
|
11
11
|
return /* @__PURE__ */ jsx("div", {
|
|
@@ -513,8 +513,8 @@ function SessionStatusIcon({ row, className }) {
|
|
|
513
513
|
}
|
|
514
514
|
//#endregion
|
|
515
515
|
//#region src/components/agent/SessionSteps.tsx
|
|
516
|
-
function sessionSteps(info, onSelect) {
|
|
517
|
-
return (info
|
|
516
|
+
function sessionSteps(info, onSelect, show = "all") {
|
|
517
|
+
return visibleSubagents(info, show).filter(isAgentRecord).map((sub) => ({
|
|
518
518
|
key: sub.toolUseId,
|
|
519
519
|
label: subagentLabel(sub),
|
|
520
520
|
noun: "agent",
|
|
@@ -531,29 +531,6 @@ function stepState(status) {
|
|
|
531
531
|
default: return "done";
|
|
532
532
|
}
|
|
533
533
|
}
|
|
534
|
-
function runningSteps(steps) {
|
|
535
|
-
return steps.filter((s) => s.state === "running").length;
|
|
536
|
-
}
|
|
537
|
-
function StepToggle({ expanded, running, total, noun, onToggle }) {
|
|
538
|
-
const label = running > 0 && running < total ? `${running}/${total}` : String(total);
|
|
539
|
-
const words = running > 0 && running < total ? `${running} of ${total} ${noun}s running` : `${total} ${noun}${total === 1 ? "" : "s"}`;
|
|
540
|
-
const Chevron = expanded ? ChevronDown : ChevronRight;
|
|
541
|
-
return /* @__PURE__ */ jsxs("button", {
|
|
542
|
-
type: "button",
|
|
543
|
-
"aria-expanded": expanded,
|
|
544
|
-
"aria-label": `${expanded ? "Hide" : "Show"} ${words}`,
|
|
545
|
-
title: `${expanded ? "Hide" : "Show"} ${words}`,
|
|
546
|
-
onClick: (e) => {
|
|
547
|
-
e.stopPropagation();
|
|
548
|
-
onToggle();
|
|
549
|
-
},
|
|
550
|
-
className: cn("flex shrink-0 items-center gap-0.5 rounded-[4px] py-0.5 pr-1 pl-0.5 outline-none", "text-[0.75rem] leading-3 hover:bg-row-hover hover:text-fg-2", running > 0 ? "text-info" : "text-fg-4"),
|
|
551
|
-
children: [/* @__PURE__ */ jsx(Chevron, { className: "size-3" }), /* @__PURE__ */ jsx("span", {
|
|
552
|
-
className: "tabular-nums",
|
|
553
|
-
children: label
|
|
554
|
-
})]
|
|
555
|
-
});
|
|
556
|
-
}
|
|
557
534
|
function StepRow({ step, active = false, onSelect }) {
|
|
558
535
|
const body = step.state === "failed" ? "text-danger" : "text-success";
|
|
559
536
|
return /* @__PURE__ */ jsxs("button", {
|
|
@@ -593,14 +570,8 @@ const NO_MODIFIERS = {
|
|
|
593
570
|
ctrl: false,
|
|
594
571
|
alt: false
|
|
595
572
|
};
|
|
596
|
-
function SessionItem({ row, active = false, activeStepKey, showGateway, showProject = true, projectIcons,
|
|
573
|
+
function SessionItem({ row, active = false, activeStepKey, showGateway, showProject = true, projectIcons, subagents = "active", onSelect, onSelectSubagent, onRename, renameOn = "doubleClick", editing, onEditingChange, actions, className }) {
|
|
597
574
|
const { info } = row;
|
|
598
|
-
const [ownExpanded, setOwnExpanded] = useState(false);
|
|
599
|
-
const open = expanded ?? ownExpanded;
|
|
600
|
-
const setOpen = (next) => {
|
|
601
|
-
setOwnExpanded(next);
|
|
602
|
-
onExpandedChange?.(next);
|
|
603
|
-
};
|
|
604
575
|
const [ownEditing, setOwnEditing] = useState(false);
|
|
605
576
|
const isEditing = editing ?? ownEditing;
|
|
606
577
|
const setEditing = (next) => {
|
|
@@ -609,6 +580,7 @@ function SessionItem({ row, active = false, activeStepKey, showGateway, showProj
|
|
|
609
580
|
};
|
|
610
581
|
const engine = info.engine ?? "claude";
|
|
611
582
|
const project = showProject ? projectLabel(row) : projectSubpath(row);
|
|
583
|
+
const projectTitle = showProject ? projectName(row) : void 0;
|
|
612
584
|
const projectIcon = showProject ? info.project?.icon : void 0;
|
|
613
585
|
const iconSrc = projectIcon?.type === "image" ? projectIcons?.[projectIcon.hash] : void 0;
|
|
614
586
|
const cost = formatCost(info.costUsd ?? info.totalCostUsd);
|
|
@@ -623,14 +595,17 @@ function SessionItem({ row, active = false, activeStepKey, showGateway, showProj
|
|
|
623
595
|
className: vendorTextClass(engine, info.model),
|
|
624
596
|
children: model
|
|
625
597
|
}, "model"));
|
|
626
|
-
if (project !== void 0) parts.push(/* @__PURE__ */ jsxs("span", {
|
|
627
|
-
|
|
628
|
-
|
|
629
|
-
|
|
630
|
-
|
|
631
|
-
|
|
598
|
+
if (project !== void 0) parts.push(/* @__PURE__ */ jsxs("span", {
|
|
599
|
+
title: projectTitle,
|
|
600
|
+
children: [/* @__PURE__ */ jsx(ProjectIcon, {
|
|
601
|
+
icon: projectIcon,
|
|
602
|
+
src: iconSrc,
|
|
603
|
+
name: projectTitle,
|
|
604
|
+
className: "mr-1.5 size-4 align-[-0.3em]"
|
|
605
|
+
}), project]
|
|
606
|
+
}, "project"));
|
|
632
607
|
for (const extra of extras) parts.push(/* @__PURE__ */ jsx("span", { children: extra }, extra));
|
|
633
|
-
const steps = sessionSteps(info, (toolUseId) => onSelectSubagent ? onSelectSubagent(toolUseId) : onSelect?.(NO_MODIFIERS));
|
|
608
|
+
const steps = sessionSteps(info, (toolUseId) => onSelectSubagent ? onSelectSubagent(toolUseId) : onSelect?.(NO_MODIFIERS), subagents);
|
|
634
609
|
const holdsOpenAgent = steps.some((s) => s.key === activeStepKey);
|
|
635
610
|
return /* @__PURE__ */ jsxs("div", {
|
|
636
611
|
"data-slot": "session-item",
|
|
@@ -707,17 +682,10 @@ function SessionItem({ row, active = false, activeStepKey, showGateway, showProj
|
|
|
707
682
|
children: [parts.length > 0 ? "· " : "", formatRelativeTime(info.lastActivityAt ?? info.createdAt)]
|
|
708
683
|
}),
|
|
709
684
|
/* @__PURE__ */ jsx("span", { className: "min-w-0 flex-1" }),
|
|
710
|
-
steps.length > 0 ? /* @__PURE__ */ jsx(StepToggle, {
|
|
711
|
-
expanded: open,
|
|
712
|
-
running: runningSteps(steps),
|
|
713
|
-
total: steps.length,
|
|
714
|
-
noun: steps[0].noun,
|
|
715
|
-
onToggle: () => setOpen(!open)
|
|
716
|
-
}) : null,
|
|
717
685
|
actions
|
|
718
686
|
]
|
|
719
687
|
})]
|
|
720
|
-
}),
|
|
688
|
+
}), steps.length > 0 ? /* @__PURE__ */ jsx("div", {
|
|
721
689
|
className: "flex flex-col",
|
|
722
690
|
children: steps.map((step) => /* @__PURE__ */ jsx(StepRow, {
|
|
723
691
|
step,
|
|
@@ -890,6 +858,28 @@ function SessionBrowser({ rows, config, onConfigChange, scope, activeId, activeS
|
|
|
890
858
|
onChange: (groupBy) => set({ groupBy })
|
|
891
859
|
})
|
|
892
860
|
}),
|
|
861
|
+
/* @__PURE__ */ jsx(FilterRow, {
|
|
862
|
+
label: "Sub-agents",
|
|
863
|
+
children: /* @__PURE__ */ jsx(OneOfSelect, {
|
|
864
|
+
label: "Sub-agents",
|
|
865
|
+
value: config.subagents,
|
|
866
|
+
options: [
|
|
867
|
+
{
|
|
868
|
+
value: "active",
|
|
869
|
+
label: "Hide completed"
|
|
870
|
+
},
|
|
871
|
+
{
|
|
872
|
+
value: "all",
|
|
873
|
+
label: "Show all"
|
|
874
|
+
},
|
|
875
|
+
{
|
|
876
|
+
value: "none",
|
|
877
|
+
label: "Hide all"
|
|
878
|
+
}
|
|
879
|
+
],
|
|
880
|
+
onChange: (subagents) => set({ subagents })
|
|
881
|
+
})
|
|
882
|
+
}),
|
|
893
883
|
/* @__PURE__ */ jsx(FilterRow, {
|
|
894
884
|
label: "Sort",
|
|
895
885
|
children: /* @__PURE__ */ jsx(OneOfSelect, {
|
|
@@ -976,6 +966,7 @@ function SessionBrowser({ rows, config, onConfigChange, scope, activeId, activeS
|
|
|
976
966
|
activeSubagentId,
|
|
977
967
|
showGateway: gateways.length > 1 && config.groupBy !== "gateway",
|
|
978
968
|
showProject: config.groupBy !== "project",
|
|
969
|
+
subagents: config.subagents,
|
|
979
970
|
projectIcons,
|
|
980
971
|
onSelect,
|
|
981
972
|
onDelete,
|
|
@@ -992,7 +983,7 @@ function iconSrcOf(row, icons) {
|
|
|
992
983
|
const icon = row?.info.project?.icon;
|
|
993
984
|
return icon?.type === "image" ? icons?.[icon.hash] : void 0;
|
|
994
985
|
}
|
|
995
|
-
function SessionRowItem({ row, active, activeSubagentId, showGateway, showProject = true, projectIcons, onSelect, onDelete, onRename, onClearContext, onSelectSubagent }) {
|
|
986
|
+
function SessionRowItem({ row, active, activeSubagentId, showGateway, showProject = true, subagents, projectIcons, onSelect, onDelete, onRename, onClearContext, onSelectSubagent }) {
|
|
996
987
|
const { info } = row;
|
|
997
988
|
const [editing, setEditing] = useState(false);
|
|
998
989
|
return /* @__PURE__ */ jsx(SessionItem, {
|
|
@@ -1001,6 +992,7 @@ function SessionRowItem({ row, active, activeSubagentId, showGateway, showProjec
|
|
|
1001
992
|
activeStepKey: activeSubagentId,
|
|
1002
993
|
showGateway,
|
|
1003
994
|
showProject,
|
|
995
|
+
subagents,
|
|
1004
996
|
projectIcons,
|
|
1005
997
|
onSelect: () => onSelect?.(row),
|
|
1006
998
|
onSelectSubagent: onSelectSubagent ? (id) => onSelectSubagent(row, id) : void 0,
|
|
@@ -1094,6 +1086,81 @@ function OneOfSelect({ label, value, options, onChange }) {
|
|
|
1094
1086
|
});
|
|
1095
1087
|
}
|
|
1096
1088
|
//#endregion
|
|
1097
|
-
|
|
1089
|
+
//#region src/components/agent/SubagentToggle.tsx
|
|
1090
|
+
const SUBAGENT_DISPLAY_ORDER = [
|
|
1091
|
+
"all",
|
|
1092
|
+
"active",
|
|
1093
|
+
"none"
|
|
1094
|
+
];
|
|
1095
|
+
const SUBAGENT_DISPLAY_META = {
|
|
1096
|
+
all: {
|
|
1097
|
+
label: "All sub-agents",
|
|
1098
|
+
hint: "Showing every sub-agent"
|
|
1099
|
+
},
|
|
1100
|
+
active: {
|
|
1101
|
+
label: "Hide completed",
|
|
1102
|
+
hint: "Showing running and failed sub-agents"
|
|
1103
|
+
},
|
|
1104
|
+
none: {
|
|
1105
|
+
label: "Hide sub-agents",
|
|
1106
|
+
hint: "Sub-agents hidden"
|
|
1107
|
+
}
|
|
1108
|
+
};
|
|
1109
|
+
const HIDDEN_ROW = .34;
|
|
1110
|
+
function SubagentDisplayIcon({ value, className }) {
|
|
1111
|
+
return /* @__PURE__ */ jsxs("svg", {
|
|
1112
|
+
viewBox: "0 0 24 24",
|
|
1113
|
+
fill: "none",
|
|
1114
|
+
stroke: "currentColor",
|
|
1115
|
+
strokeWidth: 2,
|
|
1116
|
+
strokeLinecap: "round",
|
|
1117
|
+
strokeLinejoin: "round",
|
|
1118
|
+
"aria-hidden": "true",
|
|
1119
|
+
className,
|
|
1120
|
+
children: [
|
|
1121
|
+
/* @__PURE__ */ jsx("path", { d: "M3 5h18" }),
|
|
1122
|
+
/* @__PURE__ */ jsx("path", {
|
|
1123
|
+
d: "M9 12h12",
|
|
1124
|
+
opacity: value === "none" ? HIDDEN_ROW : 1
|
|
1125
|
+
}),
|
|
1126
|
+
/* @__PURE__ */ jsx("path", {
|
|
1127
|
+
d: "M9 19h12",
|
|
1128
|
+
opacity: value === "all" ? 1 : HIDDEN_ROW
|
|
1129
|
+
})
|
|
1130
|
+
]
|
|
1131
|
+
});
|
|
1132
|
+
}
|
|
1133
|
+
function SubagentToggle({ value, onChange, className }) {
|
|
1134
|
+
const meta = SUBAGENT_DISPLAY_META[value];
|
|
1135
|
+
return /* @__PURE__ */ jsxs(Menu, { children: [/* @__PURE__ */ jsx(MenuTrigger, { render: /* @__PURE__ */ jsxs(Button, {
|
|
1136
|
+
variant: "ghost",
|
|
1137
|
+
size: "icon-sm",
|
|
1138
|
+
"aria-label": `Sub-agents: ${meta.label}`,
|
|
1139
|
+
title: meta.hint,
|
|
1140
|
+
className: cn("w-9 gap-0.5", className),
|
|
1141
|
+
children: [/* @__PURE__ */ jsx(SubagentDisplayIcon, {
|
|
1142
|
+
value,
|
|
1143
|
+
className: "size-4"
|
|
1144
|
+
}), /* @__PURE__ */ jsx(ChevronDown, { className: "size-2.5 text-fg-4" })]
|
|
1145
|
+
}) }), /* @__PURE__ */ jsx(MenuContent, {
|
|
1146
|
+
className: "min-w-44",
|
|
1147
|
+
children: SUBAGENT_DISPLAY_ORDER.map((option) => /* @__PURE__ */ jsxs(MenuItem, {
|
|
1148
|
+
onClick: () => onChange(option),
|
|
1149
|
+
children: [
|
|
1150
|
+
/* @__PURE__ */ jsx(SubagentDisplayIcon, {
|
|
1151
|
+
value: option,
|
|
1152
|
+
className: "size-4 shrink-0 text-fg-3"
|
|
1153
|
+
}),
|
|
1154
|
+
/* @__PURE__ */ jsx("span", {
|
|
1155
|
+
className: "flex-1",
|
|
1156
|
+
children: SUBAGENT_DISPLAY_META[option].label
|
|
1157
|
+
}),
|
|
1158
|
+
option === value ? /* @__PURE__ */ jsx(Check, { className: "size-3.5 shrink-0 text-accent" }) : null
|
|
1159
|
+
]
|
|
1160
|
+
}, option))
|
|
1161
|
+
})] });
|
|
1162
|
+
}
|
|
1163
|
+
//#endregion
|
|
1164
|
+
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, FileLinkProvider, 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, SUBAGENT_DISPLAY_META, SUBAGENT_DISPLAY_ORDER, Select, SelectContent, SelectItem, SelectItemText, SelectTrigger, SelectValue, SessionBrowser, SessionEmptyState, SessionInfoDialog, SessionItem, SessionList, SessionListItem, SessionNamesProvider, SessionPanel, SessionStatusIcon, SkillNamesProvider, SkillsDialog, Spinner, Splitter, StatusBar, StepRow, SubagentDisplayIcon, SubagentStrip, SubagentToggle, 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, launchTrigger, matchClientCommand, matchPath, mentionTrigger, mergeComposerRows, parseFileLink, parseUserQuestions, permissionModeChoices, permissionModeMeta, plainTextToSegments, previewPatch, rankComposerRows, rankPeerSessions, rateLimitWindowSeconds, resolveAgainstCwd, rowShapeClass, segmentsToPlainText, sessionSteps, skillPrompt, toast, toolIcon, toolInputPreview, useAffordances, useFileLinks, useMinuteClock, usePathLinks, usePromptAreaState, useToolTitle, useTranscriptDensity, useTranscriptVariant, vendorMarkClass, vendorTextClass };
|
|
1098
1165
|
|
|
1099
1166
|
//# sourceMappingURL=index.mjs.map
|