@workerdeck/ui 3.3.0 → 3.4.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.
@@ -1,6 +1,6 @@
1
1
  import { ComponentType, ReactNode } from "react";
2
2
  import { LucideIcon } from "lucide-react";
3
- import { ModelOption, PermissionMode, PermissionRequest, SessionTask, ShellInfo, SkillInfo, SlashCommandInfo, SubagentInfo } from "@workerdeck/protocol";
3
+ import { EngineCapabilities, ModelOption, PermissionMode, PermissionRequest, SessionTask, ShellInfo, SkillInfo, SlashCommandInfo, 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/composer-commands.d.ts
@@ -199,6 +199,7 @@ interface SessionPanelProps {
199
199
  }
200
200
  type SessionControls = {
201
201
  setModel: (model?: string) => void;
202
+ setEffort: (effort?: string) => void;
202
203
  setPermissionMode: (mode: PermissionMode) => void;
203
204
  interrupt: () => void;
204
205
  focusComposer: () => void;
@@ -212,6 +213,8 @@ type SessionVitals = {
212
213
  capabilities: TranscriptState['capabilities'];
213
214
  model: string | undefined;
214
215
  models: ModelOption[];
216
+ effort: TranscriptState['effort'];
217
+ efforts: readonly string[];
215
218
  permissionMode: TranscriptState['permissionMode'];
216
219
  permissionModes: PermissionModeChoice[];
217
220
  skills: SkillInfo[] | undefined;
@@ -227,4 +230,4 @@ type SessionVitals = {
227
230
  declare function SessionPanel({ client, sessionId, header, panelSurface, statusSurface, statusPlacement, onOpenPanel, onVitals, transcriptVariant, transcriptFont, affordances, terminalMetrics, scrubber, bookmarks, peerMentions, onToggleBookmark, reveal, subagents, shells, openSubagent, onSubagentChange, openShell, onShellChange, stickyPrompt, controlsSurface, onControls, focusComposerOnClick, unseen, readOnly, approvalPrompts, toolHost, clientTools, cacheTranscript, emptyState, onLinkClick, onOpenFile, fontSize, className }: SessionPanelProps): import("react").JSX.Element;
228
231
  //#endregion
229
232
  export { ComposerRow as A, PermissionModeChoice as C, permissionModeChoices as D, PermissionModeSelectProps as E, skillPrompt as F, mergeComposerRows as M, rankComposerRows as N, permissionModeMeta as O, rankPeerSessions as P, PERMISSION_MODES as S, PermissionModeSelect as T, AgentWriteIcon as _, SessionVitals as a, WithActions as b, TranscriptVariant as c, ApprovalPromptProps as d, FileLinkHandle as f, ActionPlacement as g, useFileLinks as h, SessionSurfacePanel as i, matchClientCommand as j, ClientCommand as k, TranscriptVariantProvider as l, FileLinkProvider as m, SessionPanel as n, TerminalMetrics as o, FileLinkOpener as p, SessionPanelProps as r, TranscriptFont as s, SessionControls as t, useTranscriptVariant as u, CopyAction as v, PermissionModeMeta as w, useAffordances as x, TerminalAffordances as y };
230
- //# sourceMappingURL=SessionPanel-BNNc8grK.d.mts.map
233
+ //# sourceMappingURL=SessionPanel-DIi4sEgh.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 ComposerRow, C as PermissionModeChoice, D as permissionModeChoices, E as PermissionModeSelectProps, F as skillPrompt, M as mergeComposerRows, N as rankComposerRows, O as permissionModeMeta, P as rankPeerSessions, S as PERMISSION_MODES, T as PermissionModeSelect, _ as AgentWriteIcon, a as SessionVitals, b as WithActions, c as TranscriptVariant, d as ApprovalPromptProps, f as FileLinkHandle, g as ActionPlacement, h as useFileLinks, i as SessionSurfacePanel, j as matchClientCommand, k as ClientCommand, l as TranscriptVariantProvider, m as FileLinkProvider, n as SessionPanel, o as TerminalMetrics, p as FileLinkOpener, r as SessionPanelProps, s as TranscriptFont, t as SessionControls, u as useTranscriptVariant, v as CopyAction, w as PermissionModeMeta, x as useAffordances, y as TerminalAffordances } from "./SessionPanel-BNNc8grK.mjs";
2
+ import { A as ComposerRow, C as PermissionModeChoice, D as permissionModeChoices, E as PermissionModeSelectProps, F as skillPrompt, M as mergeComposerRows, N as rankComposerRows, O as permissionModeMeta, P as rankPeerSessions, S as PERMISSION_MODES, T as PermissionModeSelect, _ as AgentWriteIcon, a as SessionVitals, b as WithActions, c as TranscriptVariant, d as ApprovalPromptProps, f as FileLinkHandle, g as ActionPlacement, h as useFileLinks, i as SessionSurfacePanel, j as matchClientCommand, k as ClientCommand, l as TranscriptVariantProvider, m as FileLinkProvider, n as SessionPanel, o as TerminalMetrics, p as FileLinkOpener, r as SessionPanelProps, s as TranscriptFont, t as SessionControls, u as useTranscriptVariant, v as CopyAction, w as PermissionModeMeta, x as useAffordances, y as TerminalAffordances } from "./SessionPanel-DIi4sEgh.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";
@@ -11,7 +11,7 @@ import { Popover as Popover$1 } from "@base-ui/react/popover";
11
11
  import { Dialog as Dialog$1 } from "@base-ui/react/dialog";
12
12
  import { Tooltip } from "@base-ui/react/tooltip";
13
13
  import { toast } from "sonner";
14
- import { ByModel, ContextReading, ContextUsage, FilePatch, McpServerActionRequest, McpServerStatusInfo, McpServerToolInfo, ModelOption, PermissionRequest, PricingTable, ProfileEngine, ProfileSpend, ProjectIcon as ProjectIcon$1, QuestionBehavior, RateLimitInfo, SessionInfo, SessionRow, SessionStatus, SessionTask, ShellInfo, SkillInfo, SlashCommandInfo, StepDisplay, SubagentDisplay, UsageWindowRow, ViewConfig, WorkspaceScope, parseUserQuestions } from "@workerdeck/protocol";
14
+ import { ByModel, ContextReading, ContextUsage, EngineCapabilities, FilePatch, McpServerActionRequest, McpServerStatusInfo, McpServerToolInfo, ModelOption, PermissionRequest, PricingTable, ProfileEngine, ProfileSpend, ProjectIcon as ProjectIcon$1, QuestionBehavior, RateLimitInfo, SessionInfo, SessionRow, SessionStatus, SessionTask, ShellInfo, SkillInfo, SlashCommandInfo, StepDisplay, SubagentDisplay, UsageWindowRow, ViewConfig, WorkspaceScope, parseUserQuestions } from "@workerdeck/protocol";
15
15
  import { ConnectionState, PeerSessionOption, TranscriptItem, TranscriptState, UseAttachmentsResult } from "@workerdeck/react";
16
16
  import { WorkerDeckClient } from "@workerdeck/client";
17
17
  //#region src/components/ui/Button.d.ts
@@ -975,6 +975,7 @@ type ComposerHandle = {
975
975
  };
976
976
  interface ComposerProps {
977
977
  onSend: (text: string, attachmentIds: string[]) => void;
978
+ onSendNow?: (text: string, attachmentIds: string[]) => void;
978
979
  onInterrupt: () => void;
979
980
  busy: boolean;
980
981
  disabled?: boolean;
@@ -1001,7 +1002,7 @@ interface ComposerProps {
1001
1002
  className?: string;
1002
1003
  ref?: Ref<ComposerHandle>;
1003
1004
  }
1004
- 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;
1005
+ declare function Composer({ onSend, onSendNow, onInterrupt, busy, disabled, placeholder, commands, skills, clientCommands, onSearchFiles, peers, onShellCommand, attachments, toolbar, layout, fontSize, lineHeight, affordances, draft, className, ref }: ComposerProps): import("react").JSX.Element;
1005
1006
  //#endregion
1006
1007
  //#region src/components/agent/ModelSelect.d.ts
1007
1008
  interface ModelSelectProps {
@@ -1014,6 +1015,18 @@ interface ModelSelectProps {
1014
1015
  }
1015
1016
  declare function ModelSelect({ models, model, onModelChange, variant, disabled, className }: ModelSelectProps): import("react").JSX.Element;
1016
1017
  //#endregion
1018
+ //#region src/components/agent/EffortSelect.d.ts
1019
+ declare function effortChoices(models: readonly ModelOption[], model: string | undefined, capabilities: Pick<EngineCapabilities, 'reasoningEfforts'>): readonly string[];
1020
+ interface EffortSelectProps {
1021
+ efforts: readonly string[];
1022
+ effort?: string | null;
1023
+ onEffortChange: (effort?: string) => void;
1024
+ variant?: 'toolbar' | 'form';
1025
+ disabled?: boolean;
1026
+ className?: string;
1027
+ }
1028
+ declare function EffortSelect({ efforts, effort, onEffortChange, variant, disabled, className }: EffortSelectProps): import("react").JSX.Element;
1029
+ //#endregion
1017
1030
  //#region src/components/agent/StatusBar.d.ts
1018
1031
  interface StatusBarProps {
1019
1032
  state: TranscriptState;
@@ -1242,6 +1255,7 @@ interface SessionBrowserProps {
1242
1255
  onDelete?: (row: SessionRow) => void;
1243
1256
  onRename?: (row: SessionRow, title: string) => void;
1244
1257
  onClearContext?: (row: SessionRow) => void;
1258
+ onSleep?: (row: SessionRow) => void;
1245
1259
  onSelectSubagent?: (row: SessionRow, toolUseId: string) => void;
1246
1260
  onSelectTask?: (row: SessionRow, task: SessionTask) => void;
1247
1261
  onStopTask?: (row: SessionRow, toolUseId: string) => void;
@@ -1261,7 +1275,7 @@ type GroupTarget = {
1261
1275
  cwd?: string;
1262
1276
  };
1263
1277
  declare function rowShapeClass(active: boolean): string;
1264
- declare function SessionBrowser({ rows, config, onConfigChange, scope, activeId, activeSubagentId, activeShellId, now, isActive, rowActions, gatewayCount, showSubset, onSelect, onDelete, onRename, onClearContext, onSelectSubagent, onSelectTask, onStopTask, onSelectShell, onKillShell, onShellAgentWrite, onCreateInGroup, emptyState, showControls, showSearch, autoFocusSearch, projectIcons, className }: SessionBrowserProps): import("react").JSX.Element;
1278
+ declare function SessionBrowser({ rows, config, onConfigChange, scope, activeId, activeSubagentId, activeShellId, now, isActive, rowActions, gatewayCount, showSubset, onSelect, onDelete, onRename, onClearContext, onSleep, onSelectSubagent, onSelectTask, onStopTask, onSelectShell, onKillShell, onShellAgentWrite, onCreateInGroup, emptyState, showControls, showSearch, autoFocusSearch, projectIcons, className }: SessionBrowserProps): import("react").JSX.Element;
1265
1279
  declare function SessionSearch({ value, onChange, autoFocus, className, inputClassName }: {
1266
1280
  value: string;
1267
1281
  onChange: (value: string) => void;
@@ -1500,5 +1514,5 @@ declare function copyText(value: string): Promise<boolean>;
1500
1514
  declare function toolIcon(toolName: string): LucideIcon;
1501
1515
  declare function isMutatingTool(toolName: string): boolean;
1502
1516
  //#endregion
1503
- export { type ActionPlacement, AgentWriteIcon, 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, ContextPanel, type ContextPanelProps, 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, type GroupTarget, HostFilesDialog, type HostFilesDialogProps, ImageViewer, ImageViewerProvider, Ink, Input, Loader, McpDialog, type McpDialogProps, McpPanel, McpPanelActions, type McpPanelModel, type McpPanelProps, Menu, MenuContent, MenuItem, MenuSeparator, MenuTrigger, Message, MessageContent, type MessageProps, ModelSelect, type ModelSelectProps, type OpenImage, OptionSelect, type OptionSelectProps, PERMISSION_MODES, type PathHit, type PathMatch, type PermissionModeChoice, type PermissionModeMeta, PermissionModeSelect, type PermissionModeSelectProps, PermissionPrompt, type PermissionPromptProps, Popover, PopoverContent, PopoverTrigger, 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, SHELL_AGENT_WRITE_NOTE, SHELL_GLYPH, SHELL_KILL_GLYPH, STATUS_META, STEP_DISPLAY_OPTIONS, SUBAGENT_DISPLAY_META, SUBAGENT_DISPLAY_ORDER, type Segment, Select, SelectContent, SelectItem, SelectItemText, type SelectModifiers, SelectTrigger, SelectValue, SessionBrowser, type SessionBrowserProps, type SessionControls, SessionEmptyState, type SessionEmptyStateProps, SessionFilters, SessionFiltersButton, type SessionFiltersButtonProps, type SessionFiltersProps, SessionInfoDialog, type SessionInfoDialogProps, SessionInfoPanel, type SessionInfoPanelProps, SessionItem, type SessionItemProps, SessionList, SessionListItem, type SessionListItemProps, type SessionListProps, SessionNamesProvider, SessionPanel, type SessionPanelProps, SessionSearch, SessionStatusIcon, type SessionSurfacePanel, type SessionVitals, type ShellActions, ShellActionsProvider, type ShellFrame, type ShellFrameOptions, type ShellStepOptions, ShellStrip, type ShellStripProps, SkillNamesProvider, SkillsDialog, type SkillsDialogProps, Spinner, Splitter, type SplitterProps, StatusBar, type StatusBarProps, type Step, StepDisplayControl, type StepKind, StepRow, SubagentDisplayIcon, SubagentStrip, SubagentToggle, type SubagentToggleProps, TaskList, type TaskListProps, type TaskStepOptions, 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 TranscriptFont, type TranscriptProps, type TranscriptVariant, TranscriptVariantProvider, type TriggerConfig, type TriggerSuggestion, UsageDialog, type UsageDialogProps, UsageMeters, ViewableImage, type ViewedImage, 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, shellAgentWriteLabel, shellGrantable, shellInfoFailed, shellInfoLabel, shellInfoStatusText, shellTitle, skillPrompt, toast, toolIcon, toolInputPreview, useAffordances, useFileLinks, useMcpPanel, useMinuteClock, useOpenImage, usePathLinks, usePromptAreaState, useShellActions, useShellFrame, useToolTitle, useTranscriptVariant, vendorMarkClass, vendorTextClass };
1517
+ export { type ActionPlacement, AgentWriteIcon, 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, ContextPanel, type ContextPanelProps, ContextRing, Conversation, ConversationContent, type ConversationProps, ConversationScrollButton, CopyAction, CopyButton, type CopyButtonProps, Dialog, DialogBody, DialogClose, DialogContent, DialogHeader, DialogRow, DialogTrigger, EffortSelect, type EffortSelectProps, Empty, EmptyKey, EngineIcon, FileCard, type FileCardProps, type FileDeliveredItem, type FileLink, type FileLinkHandle, type FileLinkOpener, FileLinkProvider, type GroupTarget, HostFilesDialog, type HostFilesDialogProps, ImageViewer, ImageViewerProvider, Ink, Input, Loader, McpDialog, type McpDialogProps, McpPanel, McpPanelActions, type McpPanelModel, type McpPanelProps, Menu, MenuContent, MenuItem, MenuSeparator, MenuTrigger, Message, MessageContent, type MessageProps, ModelSelect, type ModelSelectProps, type OpenImage, OptionSelect, type OptionSelectProps, PERMISSION_MODES, type PathHit, type PathMatch, type PermissionModeChoice, type PermissionModeMeta, PermissionModeSelect, type PermissionModeSelectProps, PermissionPrompt, type PermissionPromptProps, Popover, PopoverContent, PopoverTrigger, 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, SHELL_AGENT_WRITE_NOTE, SHELL_GLYPH, SHELL_KILL_GLYPH, STATUS_META, STEP_DISPLAY_OPTIONS, SUBAGENT_DISPLAY_META, SUBAGENT_DISPLAY_ORDER, type Segment, Select, SelectContent, SelectItem, SelectItemText, type SelectModifiers, SelectTrigger, SelectValue, SessionBrowser, type SessionBrowserProps, type SessionControls, SessionEmptyState, type SessionEmptyStateProps, SessionFilters, SessionFiltersButton, type SessionFiltersButtonProps, type SessionFiltersProps, SessionInfoDialog, type SessionInfoDialogProps, SessionInfoPanel, type SessionInfoPanelProps, SessionItem, type SessionItemProps, SessionList, SessionListItem, type SessionListItemProps, type SessionListProps, SessionNamesProvider, SessionPanel, type SessionPanelProps, SessionSearch, SessionStatusIcon, type SessionSurfacePanel, type SessionVitals, type ShellActions, ShellActionsProvider, type ShellFrame, type ShellFrameOptions, type ShellStepOptions, ShellStrip, type ShellStripProps, SkillNamesProvider, SkillsDialog, type SkillsDialogProps, Spinner, Splitter, type SplitterProps, StatusBar, type StatusBarProps, type Step, StepDisplayControl, type StepKind, StepRow, SubagentDisplayIcon, SubagentStrip, SubagentToggle, type SubagentToggleProps, TaskList, type TaskListProps, type TaskStepOptions, 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 TranscriptFont, type TranscriptProps, type TranscriptVariant, TranscriptVariantProvider, type TriggerConfig, type TriggerSuggestion, UsageDialog, type UsageDialogProps, UsageMeters, ViewableImage, type ViewedImage, WithActions, badgeVariants, buttonVariants, cn, commandTrigger, copyText, effortChoices, 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, shellAgentWriteLabel, shellGrantable, shellInfoFailed, shellInfoLabel, shellInfoStatusText, shellTitle, skillPrompt, toast, toolIcon, toolInputPreview, useAffordances, useFileLinks, useMcpPanel, useMinuteClock, useOpenImage, usePathLinks, usePromptAreaState, useShellActions, useShellFrame, useToolTitle, useTranscriptVariant, vendorMarkClass, vendorTextClass };
1504
1518
  //# sourceMappingURL=index.d.mts.map
package/build/index.mjs CHANGED
@@ -1,8 +1,8 @@
1
- import { $ as ShellActionsProvider, $t as Spinner, A as PermissionPrompt, An as buttonVariants, At as PromptTokenText, B as ModelSelect, Bt as rankPeerSessions, C as SessionInfoDialog, Cn as SelectValue, Ct as Blank, D as QUESTION_BEHAVIORS, Dn as Badge, Dt as CopyAction, E as TerminalPermissionPrompt, En as Input, Et as AgentWriteIcon, F as SubagentStrip, Ft as TranscriptVariantProvider, G as useMcpPanel, Gt as mentionTrigger, H as McpDialog, Ht as commandTrigger, I as PERMISSION_MODES, It as useTranscriptVariant, J as ContextDialog, Jt as plainTextToSegments, K as HostFilesDialog, Kt as usePromptAreaState, L as PermissionModeSelect, Lt as matchClientCommand, M as useShellFrame, Mt as SkillNamesProvider, Nt as isMutatingTool, O as QuestionPrompt, On as badgeVariants, Ot as WithActions, P as ShellStrip, Pt as toolIcon, Q as TerminalSurface, Qt as CodeBlock, R as permissionModeChoices, Rt as mergeComposerRows, S as STATUS_META, Sn as SelectTrigger, St as Band, T as TerminalQuestionPrompt, Tn as Textarea, Tt as Row, U as McpPanel, Ut as hashtagTrigger, V as SkillsDialog, Vt as skillPrompt, W as McpPanelActions, Wt as launchTrigger, X as contextNote, Xt as ProgressRing, Y as ContextPanel, Yt as segmentsToPlainText, Z as Composer, Zt as Splitter, _ as Loader, _n as OptionSelect, _t as FileLinkProvider, a as UsageDialog, an as Dialog, at as shellGrantable, b as ConversationScrollButton, bn as SelectItem, bt as TerminalDiff, c as TerminalTranscript, cn as DialogContent, ct as shellInfoStatusText, d as Reasoning, dn as DialogTrigger, dt as useToolTitle, en as CopyButton, et as useShellActions, f as Message, fn as Menu, ft as TerminalMarkdown, g as SessionEmptyState, gn as MenuTrigger, gt as useOpenImage, h as TerminalItemView, hn as MenuSeparator, ht as ViewableImage, i as SessionPanel, in as TooltipProvider, it as shellAgentWriteLabel, j as Response, jn as cn, jt as SessionNamesProvider, k as parseUserQuestions, kn as Button, kt as useAffordances, l as Transcript, ln as DialogHeader, lt as shellTitle, m as FileCard, mn as MenuItem, mt as ImageViewerProvider, n as usePathLinks, nn as Tip, nt as SHELL_GLYPH, o as UsageMeters, on as DialogBody, ot as shellInfoFailed, p as MessageContent, pn as MenuContent, pt as ImageViewer, qt as PromptArea, r as matchPath, rn as TooltipContent, rt as SHELL_KILL_GLYPH, s as useMinuteClock, sn as DialogClose, st as shellInfoLabel, t as resolveAgainstCwd, tn as copyText, tt as SHELL_AGENT_WRITE_NOTE, u as ToolCallCard, un as DialogRow, ut as ToolTitleProvider, v as Conversation, vn as Select, vt as useFileLinks, w as SessionInfoPanel, wn as PortalScope, wt as Ink, x as StatusBar, xn as SelectItemText, xt as previewPatch, y as ConversationContent, yn as SelectContent, yt as parseFileLink, z as permissionModeMeta, zt as rankComposerRows } from "./use-path-links-Cby4i_VL.mjs";
1
+ import { $ as Composer, $t as Splitter, A as PermissionPrompt, An as badgeVariants, At as WithActions, B as EffortSelect, Bt as mergeComposerRows, C as SessionInfoDialog, Cn as SelectItemText, Ct as previewPatch, D as QUESTION_BEHAVIORS, Dn as Textarea, Dt as Row, E as TerminalPermissionPrompt, En as PortalScope, Et as Ink, F as SubagentStrip, Ft as isMutatingTool, G as McpPanel, Gt as hashtagTrigger, H as ModelSelect, Ht as rankPeerSessions, I as PERMISSION_MODES, It as toolIcon, J as HostFilesDialog, Jt as usePromptAreaState, K as McpPanelActions, Kt as launchTrigger, L as PermissionModeSelect, Lt as TranscriptVariantProvider, M as useShellFrame, Mn as buttonVariants, Mt as PromptTokenText, Nn as cn, Nt as SessionNamesProvider, O as QuestionPrompt, On as Input, Ot as AgentWriteIcon, P as ShellStrip, Pt as SkillNamesProvider, Q as contextNote, Qt as ProgressRing, R as permissionModeChoices, Rt as useTranscriptVariant, S as STATUS_META, Sn as SelectItem, St as TerminalDiff, T as TerminalQuestionPrompt, Tn as SelectValue, Tt as Blank, U as SkillsDialog, Ut as skillPrompt, V as effortChoices, Vt as rankComposerRows, W as McpDialog, Wt as commandTrigger, X as ContextDialog, Xt as plainTextToSegments, Yt as PromptArea, Z as ContextPanel, Zt as segmentsToPlainText, _ as Loader, _n as MenuSeparator, _t as ViewableImage, a as UsageDialog, an as TooltipContent, at as SHELL_KILL_GLYPH, b as ConversationScrollButton, bn as Select, bt as useFileLinks, c as TerminalTranscript, cn as DialogBody, ct as shellInfoFailed, d as Reasoning, dn as DialogHeader, dt as shellTitle, en as CodeBlock, et as TerminalSurface, f as Message, fn as DialogRow, ft as ToolTitleProvider, g as SessionEmptyState, gn as MenuItem, gt as ImageViewerProvider, h as TerminalItemView, hn as MenuContent, ht as ImageViewer, i as SessionPanel, in as Tip, it as SHELL_GLYPH, j as Response, jn as Button, jt as useAffordances, k as parseUserQuestions, kn as Badge, kt as CopyAction, l as Transcript, ln as DialogClose, lt as shellInfoLabel, m as FileCard, mn as Menu, mt as TerminalMarkdown, n as usePathLinks, nn as CopyButton, nt as useShellActions, o as UsageMeters, on as TooltipProvider, ot as shellAgentWriteLabel, p as MessageContent, pn as DialogTrigger, pt as useToolTitle, q as useMcpPanel, qt as mentionTrigger, r as matchPath, rn as copyText, rt as SHELL_AGENT_WRITE_NOTE, s as useMinuteClock, sn as Dialog, st as shellGrantable, t as resolveAgainstCwd, tn as Spinner, tt as ShellActionsProvider, u as ToolCallCard, un as DialogContent, ut as shellInfoStatusText, v as Conversation, vn as MenuTrigger, vt as useOpenImage, w as SessionInfoPanel, wn as SelectTrigger, wt as Band, x as StatusBar, xn as SelectContent, xt as parseFileLink, y as ConversationContent, yn as OptionSelect, yt as FileLinkProvider, z as permissionModeMeta, zt as matchClientCommand } from "./use-path-links-WCsysQPy.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, Circle, CircleAlert, CircleSlash, CircuitBoard, Cloud, Code, Coffee, Cog, Compass, Container, Cpu, CreditCard, Database, Diamond, Dog, Eraser, Feather, Film, Filter, Flame, FlaskConical, Folder, FolderOpen, Gamepad2, Gauge, Gem, Ghost, Gift, GitBranch, Globe, GraduationCap, GripVertical, 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, Plus, 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";
5
+ import { Anchor, ArrowRight, Atom, Beaker, BedDouble, BellRing, Bike, Binary, Blocks, Bot, Box, Brain, Briefcase, Brush, Bug, Building2, Cable, Camera, Car, Cat, Check, ChevronDown, Circle, CircleAlert, CircleSlash, CircuitBoard, Cloud, Code, Coffee, Cog, Compass, Container, Cpu, CreditCard, Database, Diamond, Dog, Eraser, Feather, Film, Filter, Flame, FlaskConical, Folder, FolderOpen, Gamepad2, Gauge, Gem, Ghost, Gift, GitBranch, Globe, GraduationCap, GripVertical, 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, Plus, 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 { Popover as Popover$1 } from "@base-ui/react/popover";
8
8
  import { Toaster as Toaster$1, toast } from "sonner";
@@ -1097,6 +1097,8 @@ function SessionItem({ row, active = false, activeStepKey, showGateway, showProj
1097
1097
  return /* @__PURE__ */ jsxs("div", {
1098
1098
  "data-slot": "session-item",
1099
1099
  "data-active": active || void 0,
1100
+ "data-asleep": info.engineAsleep || void 0,
1101
+ title: info.engineAsleep ? "Asleep, wakes on your next message" : void 0,
1100
1102
  role: "button",
1101
1103
  tabIndex: 0,
1102
1104
  onClick: (e) => {
@@ -1120,7 +1122,7 @@ function SessionItem({ row, active = false, activeStepKey, showGateway, showProj
1120
1122
  },
1121
1123
  className: cn("group flex w-full cursor-pointer flex-col p-1 text-left outline-none", "rounded-[4px] transition-colors focus-visible:ring-2 focus-visible:ring-ring", holdsOpenStep ? "bg-row-selected-weak" : active ? "bg-row-selected" : "hover:bg-row-hover", className),
1122
1124
  children: [/* @__PURE__ */ jsxs("div", {
1123
- className: "flex flex-col gap-1 py-0.5 pr-0.5 pl-1.5",
1125
+ className: cn("flex flex-col gap-1 py-0.5 pr-0.5 pl-1.5", info.engineAsleep && "opacity-60"),
1124
1126
  children: [/* @__PURE__ */ jsxs("div", {
1125
1127
  className: "flex h-5 items-center gap-1.5 overflow-hidden",
1126
1128
  children: [
@@ -1406,7 +1408,7 @@ function NewGroupButton({ onClick }) {
1406
1408
  function rowShapeClass(active) {
1407
1409
  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");
1408
1410
  }
1409
- function SessionBrowser({ rows, config, onConfigChange, scope, activeId, activeSubagentId, activeShellId, now, isActive = (row) => row.info.id === activeId, rowActions, gatewayCount, showSubset = true, onSelect, onDelete, onRename, onClearContext, onSelectSubagent, onSelectTask, onStopTask, onSelectShell, onKillShell, onShellAgentWrite, onCreateInGroup, emptyState, showControls = true, showSearch = showControls, autoFocusSearch, projectIcons, className }) {
1411
+ function SessionBrowser({ rows, config, onConfigChange, scope, activeId, activeSubagentId, activeShellId, now, isActive = (row) => row.info.id === activeId, rowActions, gatewayCount, showSubset = true, onSelect, onDelete, onRename, onClearContext, onSleep, onSelectSubagent, onSelectTask, onStopTask, onSelectShell, onKillShell, onShellAgentWrite, onCreateInGroup, emptyState, showControls = true, showSearch = showControls, autoFocusSearch, projectIcons, className }) {
1410
1412
  const rowGateways = useMemo(() => new Set(rows.map((row) => row.hostId)).size, [rows]);
1411
1413
  const gateways = gatewayCount ?? rowGateways;
1412
1414
  const visible = useMemo(() => filterRows(rows, config, scope), [
@@ -1443,7 +1445,17 @@ function SessionBrowser({ rows, config, onConfigChange, scope, activeId, activeS
1443
1445
  cwd: group.cwd
1444
1446
  } : void 0;
1445
1447
  return /* @__PURE__ */ jsx(GroupHeading, {
1446
- label: group.label,
1448
+ label: group.gateway && group.project ? /* @__PURE__ */ jsxs(Fragment$1, { children: [
1449
+ group.gateway,
1450
+ /* @__PURE__ */ jsx("span", {
1451
+ "aria-hidden": true,
1452
+ children: " · "
1453
+ }),
1454
+ /* @__PURE__ */ jsx("span", {
1455
+ className: "text-fg-1",
1456
+ children: group.project
1457
+ })
1458
+ ] }) : group.label,
1447
1459
  count: group.rows.length,
1448
1460
  title: project && group.cwd ? group.cwd : void 0,
1449
1461
  leading: project ? /* @__PURE__ */ jsx(ProjectIcon, {
@@ -1538,6 +1550,7 @@ function SessionBrowser({ rows, config, onConfigChange, scope, activeId, activeS
1538
1550
  onDelete,
1539
1551
  onRename,
1540
1552
  onClearContext,
1553
+ onSleep,
1541
1554
  onSelectSubagent,
1542
1555
  onSelectTask,
1543
1556
  onStopTask,
@@ -1555,7 +1568,7 @@ function iconSrcOf(row, icons) {
1555
1568
  const icon = row?.info.project?.icon;
1556
1569
  return icon?.type === "image" ? icons?.[icon.hash] : void 0;
1557
1570
  }
1558
- function SessionRowItem({ row, dragProps, dropTarget, active, actions, activeSubagentId, activeShellId, now, showGateway, showProject = true, subagents, shells, tasks, projectIcons, onSelect, onDelete, onRename, onClearContext, onSelectSubagent, onSelectTask, onStopTask, onSelectShell, onKillShell, onShellAgentWrite }) {
1571
+ function SessionRowItem({ row, dragProps, dropTarget, active, actions, activeSubagentId, activeShellId, now, showGateway, showProject = true, subagents, shells, tasks, projectIcons, onSelect, onDelete, onRename, onClearContext, onSleep, onSelectSubagent, onSelectTask, onStopTask, onSelectShell, onKillShell, onShellAgentWrite }) {
1559
1572
  const { info } = row;
1560
1573
  const [editing, setEditing] = useState(false);
1561
1574
  const item = /* @__PURE__ */ jsx(SessionItem, {
@@ -1592,6 +1605,12 @@ function SessionRowItem({ row, dragProps, dropTarget, active, actions, activeSub
1592
1605
  onClick: () => onClearContext(row),
1593
1606
  children: /* @__PURE__ */ jsx(Eraser, { className: "size-3 text-fg-3" })
1594
1607
  }) : null,
1608
+ onSleep && info.capabilities?.engineSleep && info.status === "idle" && !info.engineAsleep ? /* @__PURE__ */ jsx(RowAction, {
1609
+ label: "Sleep session",
1610
+ title: "Stop the engine process to free its memory - the session stays here and wakes on your next message",
1611
+ onClick: () => onSleep(row),
1612
+ children: /* @__PURE__ */ jsx(BedDouble, { className: "size-3 text-fg-3" })
1613
+ }) : null,
1595
1614
  onDelete ? /* @__PURE__ */ jsx(RowAction, {
1596
1615
  label: "Close session",
1597
1616
  onClick: () => onDelete(row),
@@ -1725,6 +1744,6 @@ function SubagentToggle({ value, onChange, className }) {
1725
1744
  })] });
1726
1745
  }
1727
1746
  //#endregion
1728
- export { AgentWriteIcon, AlertDialog, AlertDialogClose, AlertDialogContent, AlertDialogDescription, AlertDialogTitle, AlertDialogTrigger, Badge, Band, Blank, Button, Card, CardContent, CardHeader, CardTitle, CodeBlock, Composer, ContextDialog, ContextPanel, ContextRing, Conversation, ConversationContent, ConversationScrollButton, CopyAction, CopyButton, Dialog, DialogBody, DialogClose, DialogContent, DialogHeader, DialogRow, DialogTrigger, Empty, EmptyKey, EngineIcon, FileCard, FileLinkProvider, HostFilesDialog, ImageViewer, ImageViewerProvider, Ink, Input, Loader, McpDialog, McpPanel, McpPanelActions, Menu, MenuContent, MenuItem, MenuSeparator, MenuTrigger, Message, MessageContent, ModelSelect, OptionSelect, PERMISSION_MODES, PermissionModeSelect, PermissionPrompt, Popover, PopoverContent, PopoverTrigger, ProgressRing, ProjectIcon, PromptArea, PromptTokenText, QUESTION_BEHAVIORS, QuestionPrompt, Reasoning, Response, Row, SHELL_AGENT_WRITE_NOTE, SHELL_GLYPH, SHELL_KILL_GLYPH, STATUS_META, STEP_DISPLAY_OPTIONS, SUBAGENT_DISPLAY_META, SUBAGENT_DISPLAY_ORDER, Select, SelectContent, SelectItem, SelectItemText, SelectTrigger, SelectValue, SessionBrowser, SessionEmptyState, SessionFilters, SessionFiltersButton, SessionInfoDialog, SessionInfoPanel, SessionItem, SessionList, SessionListItem, SessionNamesProvider, SessionPanel, SessionSearch, SessionStatusIcon, ShellActionsProvider, ShellStrip, SkillNamesProvider, SkillsDialog, Spinner, Splitter, StatusBar, StepDisplayControl, StepRow, SubagentDisplayIcon, SubagentStrip, SubagentToggle, TaskList, TasksDialog, TerminalDiff, TerminalItemView, TerminalMarkdown, TerminalPermissionPrompt, TerminalQuestionPrompt, TerminalStatusLine, TerminalSurface, TerminalTranscript, Textarea, Tip, Toaster, ToolCallCard, ToolTitleProvider, TooltipContent, TooltipProvider, Transcript, TranscriptVariantProvider, UsageDialog, UsageMeters, ViewableImage, 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, shellAgentWriteLabel, shellGrantable, shellInfoFailed, shellInfoLabel, shellInfoStatusText, shellTitle, skillPrompt, toast, toolIcon, toolInputPreview, useAffordances, useFileLinks, useMcpPanel, useMinuteClock, useOpenImage, usePathLinks, usePromptAreaState, useShellActions, useShellFrame, useToolTitle, useTranscriptVariant, vendorMarkClass, vendorTextClass };
1747
+ export { AgentWriteIcon, AlertDialog, AlertDialogClose, AlertDialogContent, AlertDialogDescription, AlertDialogTitle, AlertDialogTrigger, Badge, Band, Blank, Button, Card, CardContent, CardHeader, CardTitle, CodeBlock, Composer, ContextDialog, ContextPanel, ContextRing, Conversation, ConversationContent, ConversationScrollButton, CopyAction, CopyButton, Dialog, DialogBody, DialogClose, DialogContent, DialogHeader, DialogRow, DialogTrigger, EffortSelect, Empty, EmptyKey, EngineIcon, FileCard, FileLinkProvider, HostFilesDialog, ImageViewer, ImageViewerProvider, Ink, Input, Loader, McpDialog, McpPanel, McpPanelActions, Menu, MenuContent, MenuItem, MenuSeparator, MenuTrigger, Message, MessageContent, ModelSelect, OptionSelect, PERMISSION_MODES, PermissionModeSelect, PermissionPrompt, Popover, PopoverContent, PopoverTrigger, ProgressRing, ProjectIcon, PromptArea, PromptTokenText, QUESTION_BEHAVIORS, QuestionPrompt, Reasoning, Response, Row, SHELL_AGENT_WRITE_NOTE, SHELL_GLYPH, SHELL_KILL_GLYPH, STATUS_META, STEP_DISPLAY_OPTIONS, SUBAGENT_DISPLAY_META, SUBAGENT_DISPLAY_ORDER, Select, SelectContent, SelectItem, SelectItemText, SelectTrigger, SelectValue, SessionBrowser, SessionEmptyState, SessionFilters, SessionFiltersButton, SessionInfoDialog, SessionInfoPanel, SessionItem, SessionList, SessionListItem, SessionNamesProvider, SessionPanel, SessionSearch, SessionStatusIcon, ShellActionsProvider, ShellStrip, SkillNamesProvider, SkillsDialog, Spinner, Splitter, StatusBar, StepDisplayControl, StepRow, SubagentDisplayIcon, SubagentStrip, SubagentToggle, TaskList, TasksDialog, TerminalDiff, TerminalItemView, TerminalMarkdown, TerminalPermissionPrompt, TerminalQuestionPrompt, TerminalStatusLine, TerminalSurface, TerminalTranscript, Textarea, Tip, Toaster, ToolCallCard, ToolTitleProvider, TooltipContent, TooltipProvider, Transcript, TranscriptVariantProvider, UsageDialog, UsageMeters, ViewableImage, WithActions, badgeVariants, buttonVariants, cn, commandTrigger, copyText, effortChoices, 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, shellAgentWriteLabel, shellGrantable, shellInfoFailed, shellInfoLabel, shellInfoStatusText, shellTitle, skillPrompt, toast, toolIcon, toolInputPreview, useAffordances, useFileLinks, useMcpPanel, useMinuteClock, useOpenImage, usePathLinks, usePromptAreaState, useShellActions, useShellFrame, useToolTitle, useTranscriptVariant, vendorMarkClass, vendorTextClass };
1729
1748
 
1730
1749
  //# sourceMappingURL=index.mjs.map