@workerdeck/ui 2.14.0 → 3.0.1

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.
Files changed (45) hide show
  1. package/README.md +6 -5
  2. package/build/{SessionPanel-BVKqPs_3.d.mts → SessionPanel-C1bU4yTM.d.mts} +11 -11
  3. package/build/index.d.mts +46 -9
  4. package/build/index.mjs +70 -43
  5. package/build/index.mjs.map +1 -1
  6. package/build/scoped.css +156 -16
  7. package/build/{use-path-links-BgWXmfAS.mjs → use-path-links-BEWxt0ZM.mjs} +1566 -852
  8. package/build/use-path-links-BEWxt0ZM.mjs.map +1 -0
  9. package/build/workspace.d.mts +3 -3
  10. package/build/workspace.mjs +3 -3
  11. package/build/workspace.mjs.map +1 -1
  12. package/package.json +4 -4
  13. package/src/components/agent/PermissionPrompt.tsx +16 -2
  14. package/src/components/agent/Response.tsx +8 -1
  15. package/src/components/agent/SessionBrowser.tsx +6 -0
  16. package/src/components/agent/SessionItem.tsx +3 -0
  17. package/src/components/agent/SessionPanel.tsx +28 -33
  18. package/src/components/agent/SessionSteps.tsx +46 -5
  19. package/src/components/agent/SessionWorkspace.tsx +3 -3
  20. package/src/components/agent/ShellStrip.tsx +27 -4
  21. package/src/components/agent/ShellTerminal.tsx +1 -1
  22. package/src/components/agent/ToolCallCard.tsx +18 -41
  23. package/src/components/agent/Transcript.tsx +98 -93
  24. package/src/components/agent/TranscriptItemView.tsx +102 -59
  25. package/src/components/agent/TranscriptRows.tsx +4 -2
  26. package/src/components/agent/image-viewer.tsx +326 -0
  27. package/src/components/agent/markdown-image.tsx +91 -0
  28. package/src/components/agent/shell-actions.tsx +2 -0
  29. package/src/components/agent/tool-result-image.tsx +40 -0
  30. package/src/components/agent/transcript-variant.tsx +3 -21
  31. package/src/components/prompt-area/use-prompt-area-keydown.ts +4 -2
  32. package/src/components/terminal/PermissionPrompt.tsx +20 -4
  33. package/src/components/terminal/TerminalTranscript.tsx +38 -21
  34. package/src/components/terminal/affordances.tsx +100 -74
  35. package/src/components/terminal/height.ts +48 -32
  36. package/src/components/terminal/image-box.ts +31 -0
  37. package/src/components/terminal/items.tsx +92 -14
  38. package/src/components/terminal/markdown.tsx +4 -1
  39. package/src/components/terminal/shell-row.ts +17 -3
  40. package/src/index.ts +19 -4
  41. package/src/lib/shell-request.ts +115 -0
  42. package/src/lib/tool-icon.ts +13 -1
  43. package/src/styles/terminal.css +129 -22
  44. package/src/styles/theme.css +4 -0
  45. package/build/use-path-links-BgWXmfAS.mjs.map +0 -1
package/README.md CHANGED
@@ -160,7 +160,7 @@ lose by forgetting a second mount isn't one.
160
160
  - **The panel owns the session's one attach.** External chrome reads live values through
161
161
  `onVitals` and changes them through `onControls`; opening a second attach to render a status bar
162
162
  means the tool bridge may ask the wrong client.
163
- - **`transcriptVariant` and `transcriptDensity` ride context, not props.** A row component composed
163
+ - **`transcriptVariant` rides context, not a prop.** A row component composed
164
164
  by hand still gets the right treatment; restyling `data-slot`s from outside is not the seam.
165
165
  - **`statusSurface: 'external'` takes the `⋯` menu's only home with it.** Combining it with
166
166
  `panelSurface: 'internal'` needs a *function* `header` to receive the menu, or those panels
@@ -173,9 +173,9 @@ lose by forgetting a second mount isn't one.
173
173
  prompts and the composer each establish their own cell, because each sits in a different part of
174
174
  the flex column. `terminalMetrics` is one prop for exactly that reason: hand two of them
175
175
  different numbers and the caret lands on a different column from the text above it.
176
- - **`transcriptDensity` and `transcriptFont` reach `cards` only.** A terminal has one line height
177
- and is monospace by construction. Under `terminal` both are inert rather than broken - a host
178
- offering them as settings should say so, or hide them (the dashboard hides them).
176
+ - **`transcriptFont` reaches `cards` only.** A terminal has one line height
177
+ and is monospace by construction. Under `terminal` it is inert rather than broken - a host
178
+ offering it as a setting should say so, or hide it (the dashboard hides it).
179
179
  - **`unseen` is catch-up mode's whole switch.** Passing a watermark draws the boundary, fades what
180
180
  was already read and offers the "N new rows since you were last here" bar; passing `undefined`
181
181
  draws none of it. The mark is frozen at mount, so it never walks down the transcript under the
@@ -227,7 +227,8 @@ lose by forgetting a second mount isn't one.
227
227
  would be authoritative-looking and wrong. A patch whose hunks all start at 0 (an approval, where
228
228
  the edit has not happened yet) renders *without* a number column rather than a column of zeroes.
229
229
  - **Affordances cost no layout, which is what makes `false` a real option.** The hover fill is a
230
- background and the copy actions are absolutely-positioned overlays one line tall, so
230
+ background and the action buttons are absolutely-positioned overlays one line tall, in the blank
231
+ line under their block, so
231
232
  `affordances={false}` changes no glyph's position - it is the pure article, not a degraded mode.
232
233
  - **Keep `monaco-editor` unreachable from `src/index.ts`.** Tree-shaking does not cover it: Vite
233
234
  resolves Monaco's worker `new URL(...)`s while *transforming* the module, before shaking, and
@@ -91,17 +91,24 @@ declare function PermissionModeSelect({ mode, onModeChange, modes, canBypass, va
91
91
  type TerminalAffordances = {
92
92
  hover?: boolean;
93
93
  actions?: boolean;
94
+ labels?: boolean;
94
95
  };
95
96
  declare function useAffordances(): Required<TerminalAffordances>;
96
- declare function WithActions({ actions, children, className }: {
97
+ type ActionPlacement = 'below' | 'inline';
98
+ declare function WithActions({ actions, children, className, placement }: {
97
99
  actions: ReactNode;
98
100
  children: ReactNode;
99
101
  className?: string;
102
+ placement?: ActionPlacement;
100
103
  }): import("react").JSX.Element;
101
104
  declare function CopyAction({ text, label }: {
102
105
  text: string;
103
106
  label?: string;
104
107
  }): import("react").JSX.Element;
108
+ declare function AgentWriteIcon({ granted, className }: {
109
+ granted: boolean;
110
+ className?: string;
111
+ }): import("react").JSX.Element;
105
112
  //#endregion
106
113
  //#region src/components/terminal/file-link.d.ts
107
114
  type FileLinkOpener = (path: string, line?: number) => void;
@@ -122,12 +129,6 @@ declare function TranscriptVariantProvider({ value, children }: {
122
129
  children: ReactNode;
123
130
  }): import("react").JSX.Element;
124
131
  declare function useTranscriptVariant(): TranscriptVariant;
125
- type TranscriptDensity = 'comfortable' | 'compact';
126
- declare function TranscriptDensityProvider({ value, children }: {
127
- value: TranscriptDensity;
128
- children: ReactNode;
129
- }): import("react").JSX.Element;
130
- declare function useTranscriptDensity(): TranscriptDensity;
131
132
  type TranscriptFont = 'sans' | 'mono';
132
133
  //#endregion
133
134
  //#region src/components/agent/SessionPanel.d.ts
@@ -176,7 +177,6 @@ interface SessionPanelProps {
176
177
  subagents?: SubagentInfo[];
177
178
  shells?: ShellInfo[];
178
179
  stickyPrompt?: boolean;
179
- transcriptDensity?: TranscriptDensity;
180
180
  transcriptFont?: TranscriptFont;
181
181
  controlsSurface?: 'internal' | 'external' | 'status';
182
182
  onControls?: (controls: SessionControls | undefined) => void;
@@ -222,7 +222,7 @@ type SessionVitals = {
222
222
  itemCount: number;
223
223
  totalCostUsd: number;
224
224
  };
225
- declare function SessionPanel({ client, sessionId, header, panelSurface, statusSurface, statusPlacement, onOpenPanel, onVitals, transcriptVariant, transcriptDensity, 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;
225
+ 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;
226
226
  //#endregion
227
- 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 };
228
- //# sourceMappingURL=SessionPanel-BVKqPs_3.d.mts.map
227
+ 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 _, SessionSurfacePanel as a, WithActions as b, TranscriptFont as c, useTranscriptVariant as d, FileLinkHandle as f, ActionPlacement as g, useFileLinks as h, SessionPanelProps as i, matchClientCommand as j, ClientCommand as k, TranscriptVariant as l, FileLinkProvider as m, SessionControls as n, SessionVitals as o, FileLinkOpener as p, SessionPanel as r, TerminalMetrics as s, ApprovalPromptProps as t, TranscriptVariantProvider as u, CopyAction as v, PermissionModeMeta as w, useAffordances as x, TerminalAffordances as y };
228
+ //# sourceMappingURL=SessionPanel-C1bU4yTM.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 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-BVKqPs_3.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 SessionSurfacePanel, b as WithActions, c as TranscriptFont, d as useTranscriptVariant, f as FileLinkHandle, g as ActionPlacement, h as useFileLinks, i as SessionPanelProps, j as matchClientCommand, k as ClientCommand, l as TranscriptVariant, m as FileLinkProvider, n as SessionControls, o as SessionVitals, p as FileLinkOpener, r as SessionPanel, s as TerminalMetrics, t as ApprovalPromptProps, u as TranscriptVariantProvider, v as CopyAction, w as PermissionModeMeta, x as useAffordances, y as TerminalAffordances } from "./SessionPanel-C1bU4yTM.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";
@@ -686,7 +686,6 @@ interface TranscriptProps {
686
686
  canBrowseFiles?: boolean;
687
687
  hostImage?: (path: string) => Promise<string | undefined>;
688
688
  variant?: TranscriptVariant;
689
- density?: TranscriptDensity;
690
689
  fontSize?: number;
691
690
  lineHeight?: number;
692
691
  affordances?: TerminalAffordances | boolean;
@@ -712,7 +711,7 @@ interface TranscriptProps {
712
711
  emptyState?: ReactNode;
713
712
  className?: string;
714
713
  }
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;
714
+ declare function Transcript({ state, fileUrl, attachmentUrl, canBrowseFiles, hostImage, variant, fontSize, lineHeight, affordances, stickyPrompt, scrubber, bookmarks, sessionNames, replaying, catchUp, jumpToRecapRef, repinRef, reveal, frame, onOpenSubagent, emptyState, className }: TranscriptProps): import("react").JSX.Element;
716
715
  //#endregion
717
716
  //#region src/components/terminal/surface.d.ts
718
717
  interface TerminalSurfaceProps extends HTMLAttributes<HTMLDivElement> {
@@ -732,9 +731,10 @@ interface TerminalTranscriptProps {
732
731
  affordances?: TerminalAffordances | boolean;
733
732
  className?: string;
734
733
  }
735
- declare function TerminalItemView({ item, fileUrl }: {
734
+ declare function TerminalItemView({ item, fileUrl, attachmentUrl }: {
736
735
  item: TranscriptItem;
737
736
  fileUrl?: (path: string) => string;
737
+ attachmentUrl?: (attachmentId: string) => string;
738
738
  }): import("react").JSX.Element | null;
739
739
  declare function TerminalTranscript({ state, fileUrl, fontSize, lineHeight, affordances, className }: TerminalTranscriptProps): import("react").JSX.Element;
740
740
  //#endregion
@@ -870,13 +870,16 @@ interface LoaderProps {
870
870
  }
871
871
  declare function Loader({ label, className }: LoaderProps): import("react").JSX.Element;
872
872
  //#endregion
873
+ //#region src/components/agent/tool-result-image.d.ts
874
+ type HostImageLoader = (path: string) => Promise<string | undefined>;
875
+ //#endregion
873
876
  //#region src/components/agent/ToolCallCard.d.ts
874
877
  type ToolCallItem = Extract<TranscriptItem, {
875
878
  kind: 'tool_call';
876
879
  }>;
877
880
  interface ToolCallCardProps {
878
881
  item: ToolCallItem;
879
- hostImage?: (path: string) => Promise<string | undefined>;
882
+ hostImage?: HostImageLoader;
880
883
  className?: string;
881
884
  }
882
885
  declare function ToolCallCard({ item, hostImage, className }: ToolCallCardProps): import("react").JSX.Element;
@@ -888,6 +891,27 @@ declare function ToolTitleProvider({ value, children }: {
888
891
  }): import("react").JSX.Element;
889
892
  declare function useToolTitle(name: string): string | undefined;
890
893
  //#endregion
894
+ //#region src/components/agent/image-viewer.d.ts
895
+ type ViewedImage = {
896
+ src: string;
897
+ name: string;
898
+ };
899
+ type OpenImage = (image: ViewedImage) => void;
900
+ declare function useOpenImage(): OpenImage | undefined;
901
+ declare function ImageViewerProvider({ children }: {
902
+ children: ReactNode;
903
+ }): import("react").JSX.Element;
904
+ declare function ViewableImage({ image, className, children }: {
905
+ image: ViewedImage;
906
+ className?: string;
907
+ children: ReactNode;
908
+ }): import("react").JSX.Element;
909
+ declare function ImageViewer({ image, onClose, className }: {
910
+ image: ViewedImage;
911
+ onClose: () => void;
912
+ className?: string;
913
+ }): import("react").JSX.Element;
914
+ //#endregion
891
915
  //#region src/components/agent/FileCard.d.ts
892
916
  type FileDeliveredItem = Extract<TranscriptItem, {
893
917
  kind: 'file_delivered';
@@ -1131,13 +1155,14 @@ interface SessionBrowserProps {
1131
1155
  onSelectSubagent?: (row: SessionRow, toolUseId: string) => void;
1132
1156
  onSelectShell?: (row: SessionRow, shellId: string) => void;
1133
1157
  onKillShell?: (row: SessionRow, shellId: string) => void;
1158
+ onShellAgentWrite?: (row: SessionRow, shellId: string, enabled: boolean) => void;
1134
1159
  emptyState?: React.ReactNode;
1135
1160
  showControls?: boolean;
1136
1161
  projectIcons?: Record<string, string>;
1137
1162
  className?: string;
1138
1163
  }
1139
1164
  declare function rowShapeClass(active: boolean): string;
1140
- declare function SessionBrowser({ rows, config, onConfigChange, scope, activeId, activeSubagentId, activeShellId, now, onSelect, onDelete, onRename, onClearContext, onSelectSubagent, onSelectShell, onKillShell, emptyState, showControls, projectIcons, className }: SessionBrowserProps): import("react").JSX.Element;
1165
+ declare function SessionBrowser({ rows, config, onConfigChange, scope, activeId, activeSubagentId, activeShellId, now, onSelect, onDelete, onRename, onClearContext, onSelectSubagent, onSelectShell, onKillShell, onShellAgentWrite, emptyState, showControls, projectIcons, className }: SessionBrowserProps): import("react").JSX.Element;
1141
1166
  //#endregion
1142
1167
  //#region src/components/agent/SessionItem.d.ts
1143
1168
  type SelectModifiers = {
@@ -1157,6 +1182,7 @@ interface SessionItemProps {
1157
1182
  onSelectSubagent?: (toolUseId: string) => void;
1158
1183
  onSelectShell?: (shellId: string) => void;
1159
1184
  onKillShell?: (shellId: string) => void;
1185
+ onShellAgentWrite?: (shellId: string, enabled: boolean) => void;
1160
1186
  now?: number;
1161
1187
  onRename?: (title: string) => void;
1162
1188
  renameOn?: 'doubleClick' | 'external';
@@ -1165,7 +1191,7 @@ interface SessionItemProps {
1165
1191
  actions?: ReactNode;
1166
1192
  className?: string;
1167
1193
  }
1168
- declare function SessionItem({ row, active, activeStepKey, showGateway, showProject, projectIcons, subagents, onSelect, onSelectSubagent, onSelectShell, onKillShell, now, onRename, renameOn, editing, onEditingChange, actions, className }: SessionItemProps): import("react").JSX.Element;
1194
+ declare function SessionItem({ row, active, activeStepKey, showGateway, showProject, projectIcons, subagents, onSelect, onSelectSubagent, onSelectShell, onKillShell, onShellAgentWrite, now, onRename, renameOn, editing, onEditingChange, actions, className }: SessionItemProps): import("react").JSX.Element;
1169
1195
  //#endregion
1170
1196
  //#region src/components/agent/EngineIcon.d.ts
1171
1197
  declare function engineMark(engine: string, model?: string): string | undefined;
@@ -1189,11 +1215,17 @@ type Step = {
1189
1215
  title: string;
1190
1216
  onSelect: () => void;
1191
1217
  onKill?: () => void;
1218
+ agentWrite?: {
1219
+ granted: boolean;
1220
+ label: string;
1221
+ toggle: () => void;
1222
+ };
1192
1223
  };
1193
1224
  type ShellStepOptions = {
1194
1225
  now: number;
1195
1226
  onSelect: (shellId: string) => void;
1196
1227
  onKill?: (shellId: string) => void;
1228
+ onAgentWrite?: (shellId: string, enabled: boolean) => void;
1197
1229
  };
1198
1230
  declare function sessionSteps(info: SessionInfo, onSelect: (toolUseId: string) => void, show?: SubagentDisplay, shells?: ShellStepOptions): Step[];
1199
1231
  declare function StepRow({ step, active, onSelect }: {
@@ -1237,11 +1269,12 @@ interface ShellStripProps {
1237
1269
  cols?: number;
1238
1270
  onBack: () => void;
1239
1271
  onKill?: () => void;
1272
+ onAgentWrite?: (enabled: boolean) => void;
1240
1273
  terminal: boolean;
1241
1274
  fontSize?: number;
1242
1275
  lineHeight?: number;
1243
1276
  }
1244
- declare function ShellStrip({ shell, label, cols, onBack, onKill, terminal, fontSize, lineHeight }: ShellStripProps): import("react").JSX.Element;
1277
+ declare function ShellStrip({ shell, label, cols, onBack, onKill, onAgentWrite, terminal, fontSize, lineHeight }: ShellStripProps): import("react").JSX.Element;
1245
1278
  //#endregion
1246
1279
  //#region src/components/agent/use-shell-frame.d.ts
1247
1280
  type ShellFrameOptions = {
@@ -1278,6 +1311,7 @@ type ShellActions = {
1278
1311
  verify: (shellId: string) => Promise<boolean>;
1279
1312
  kill: (shellId: string) => Promise<boolean>;
1280
1313
  open?: (shellId: string) => void;
1314
+ agentWrite?: (shellId: string, enabled: boolean) => Promise<boolean>;
1281
1315
  };
1282
1316
  declare function ShellActionsProvider({ value, children }: {
1283
1317
  value: ShellActions | undefined;
@@ -1288,6 +1322,9 @@ declare function useShellActions(): ShellActions;
1288
1322
  //#region src/components/terminal/shell-row.d.ts
1289
1323
  declare const SHELL_GLYPH = "$";
1290
1324
  declare const SHELL_KILL_GLYPH = "✕";
1325
+ declare const SHELL_AGENT_WRITE_NOTE = "agent may type";
1326
+ declare function shellGrantable(shell: ShellInfo): boolean;
1327
+ declare function shellAgentWriteLabel(shell: ShellInfo): string;
1291
1328
  declare function shellInfoLabel(shell: ShellInfo): string;
1292
1329
  declare function shellTitle(shell: ShellInfo): string;
1293
1330
  declare function shellInfoFailed(shell: ShellInfo): boolean;
@@ -1350,5 +1387,5 @@ declare function copyText(value: string): Promise<boolean>;
1350
1387
  declare function toolIcon(toolName: string): LucideIcon;
1351
1388
  declare function isMutatingTool(toolName: string): boolean;
1352
1389
  //#endregion
1353
- 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, SHELL_GLYPH, SHELL_KILL_GLYPH, 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, 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, type StepKind, 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, shellInfoFailed, shellInfoLabel, shellInfoStatusText, shellTitle, skillPrompt, toast, toolIcon, toolInputPreview, useAffordances, useFileLinks, useMinuteClock, usePathLinks, usePromptAreaState, useShellActions, useShellFrame, useToolTitle, useTranscriptDensity, useTranscriptVariant, vendorMarkClass, vendorTextClass };
1390
+ 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, 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, ImageViewer, ImageViewerProvider, Ink, Input, Loader, McpDialog, type McpDialogProps, Menu, MenuContent, MenuItem, MenuSeparator, MenuTrigger, Message, MessageContent, type MessageProps, ModelSelect, type ModelSelectProps, type OpenImage, 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, SHELL_AGENT_WRITE_NOTE, SHELL_GLYPH, SHELL_KILL_GLYPH, 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, 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, type StepKind, 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 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, useMinuteClock, useOpenImage, usePathLinks, usePromptAreaState, useShellActions, useShellFrame, useToolTitle, useTranscriptVariant, vendorMarkClass, vendorTextClass };
1354
1391
  //# sourceMappingURL=index.d.mts.map
package/build/index.mjs CHANGED
@@ -1,4 +1,4 @@
1
- import { $ as useToolTitle, $t as DialogContent, At as rankComposerRows, B as SkillsDialog, Bt as segmentsToPlainText, C as SessionInfoDialog, Ct as toolIcon, D as QuestionPrompt, Dt as useTranscriptVariant, E as QUESTION_BEHAVIORS, Et as useTranscriptDensity, F as PERMISSION_MODES, Ft as launchTrigger, G as TaskList, Gt as CopyButton, H as HostFilesDialog, Ht as Splitter, I as PermissionModeSelect, It as mentionTrigger, J as Composer, Jt as TooltipContent, K as ContextDialog, Kt as copyText, L as permissionModeChoices, Lt as usePromptAreaState, M as SubagentStrip, Mt as skillPrompt, N as PermissionPrompt, Nt as commandTrigger, O as parseUserQuestions, Ot as matchClientCommand, P as Response, Pt as hashtagTrigger, Q as ToolTitleProvider, Qt as DialogClose, R as permissionModeMeta, Rt as PromptArea, S as STATUS_META, St as isMutatingTool, T as TerminalPermissionPrompt, Tt as TranscriptVariantProvider, Ut as CodeBlock, V as McpDialog, Vt as ProgressRing, W as TasksDialog, Wt as Spinner, X as ShellActionsProvider, Xt as Dialog, Y as TerminalSurface, Yt as TooltipProvider, Z as useShellActions, Zt as DialogBody, _ as Loader, _n as Badge, _t as shellInfoStatusText, a as UsageDialog, an as MenuItem, at as previewPatch, b as ConversationScrollButton, bn as buttonVariants, bt as SessionNamesProvider, c as Transcript, cn as Select, ct as Ink, d as Message, dn as SelectItemText, dt as WithActions, en as DialogHeader, et as TerminalMarkdown, f as MessageContent, fn as SelectTrigger, ft as useAffordances, g as SessionEmptyState, gn as Input, gt as shellInfoLabel, h as TerminalTranscript, hn as Textarea, ht as shellInfoFailed, i as SessionPanel, in as MenuContent, it as TerminalDiff, j as ShellStrip, jt as rankPeerSessions, k as useShellFrame, kt as mergeComposerRows, l as ToolCallCard, ln as SelectContent, lt as Row, m as TerminalItemView, mn as PortalScope, mt as SHELL_KILL_GLYPH, n as usePathLinks, nn as DialogTrigger, nt as useFileLinks, o as UsageMeters, on as MenuSeparator, ot as Band, p as FileCard, pn as SelectValue, pt as SHELL_GLYPH, q as contextNote, qt as Tip, r as matchPath, rn as Menu, rt as parseFileLink, s as useMinuteClock, sn as MenuTrigger, st as Blank, t as resolveAgainstCwd, tn as DialogRow, tt as FileLinkProvider, u as Reasoning, un as SelectItem, ut as CopyAction, v as Conversation, vn as badgeVariants, vt as shellTitle, w as TerminalQuestionPrompt, wt as TranscriptDensityProvider, x as StatusBar, xn as cn, xt as SkillNamesProvider, y as ConversationContent, yn as Button, yt as PromptTokenText, z as ModelSelect, zt as plainTextToSegments } from "./use-path-links-BgWXmfAS.mjs";
1
+ import { $ as shellAgentWriteLabel, $t as Tip, At as isMutatingTool, B as SkillsDialog, Bt as hashtagTrigger, C as SessionInfoDialog, Cn as Badge, Ct as AgentWriteIcon, D as QuestionPrompt, Dn as cn, Dt as PromptTokenText, E as QUESTION_BEHAVIORS, En as buttonVariants, Et as useAffordances, F as PERMISSION_MODES, Ft as mergeComposerRows, G as TaskList, Gt as plainTextToSegments, H as HostFilesDialog, Ht as mentionTrigger, I as PermissionModeSelect, It as rankComposerRows, J as Composer, Jt as Splitter, K as ContextDialog, Kt as segmentsToPlainText, L as permissionModeChoices, Lt as rankPeerSessions, M as SubagentStrip, Mt as TranscriptVariantProvider, N as PermissionPrompt, Nt as useTranscriptVariant, O as parseUserQuestions, Ot as SessionNamesProvider, P as Response, Pt as matchClientCommand, Q as SHELL_KILL_GLYPH, Qt as copyText, R as permissionModeMeta, Rt as skillPrompt, S as STATUS_META, Sn as Input, St as Row, T as TerminalPermissionPrompt, Tn as Button, Tt as WithActions, Ut as usePromptAreaState, V as McpDialog, Vt as launchTrigger, W as TasksDialog, Wt as PromptArea, X as SHELL_AGENT_WRITE_NOTE, Xt as Spinner, Y as TerminalSurface, Yt as CodeBlock, Z as SHELL_GLYPH, Zt as CopyButton, _ as Loader, _n as SelectItemText, _t as TerminalDiff, a as UsageDialog, an as DialogContent, at as ShellActionsProvider, b as ConversationScrollButton, bn as PortalScope, bt as Blank, c as Transcript, cn as DialogTrigger, ct as useToolTitle, d as Message, dn as MenuItem, dt as ImageViewerProvider, en as TooltipContent, et as shellGrantable, f as MessageContent, fn as MenuSeparator, ft as ViewableImage, g as SessionEmptyState, gn as SelectItem, gt as parseFileLink, h as TerminalTranscript, hn as SelectContent, ht as useFileLinks, i as SessionPanel, in as DialogClose, it as shellTitle, j as ShellStrip, jt as toolIcon, k as useShellFrame, kt as SkillNamesProvider, l as ToolCallCard, ln as Menu, lt as TerminalMarkdown, m as TerminalItemView, mn as Select, mt as FileLinkProvider, n as usePathLinks, nn as Dialog, nt as shellInfoLabel, o as UsageMeters, on as DialogHeader, ot as useShellActions, p as FileCard, pn as MenuTrigger, pt as useOpenImage, q as contextNote, qt as ProgressRing, r as matchPath, rn as DialogBody, rt as shellInfoStatusText, s as useMinuteClock, sn as DialogRow, st as ToolTitleProvider, t as resolveAgainstCwd, tn as TooltipProvider, tt as shellInfoFailed, u as Reasoning, un as MenuContent, ut as ImageViewer, v as Conversation, vn as SelectTrigger, vt as previewPatch, w as TerminalQuestionPrompt, wn as badgeVariants, wt as CopyAction, x as StatusBar, xn as Textarea, xt as Ink, y as ConversationContent, yn as SelectValue, yt as Band, z as ModelSelect, zt as commandTrigger } from "./use-path-links-BEWxt0ZM.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";
@@ -525,9 +525,10 @@ function sessionSteps(info, onSelect, show = "all", shells) {
525
525
  onSelect: () => onSelect(sub.toolUseId)
526
526
  }));
527
527
  if (shells === void 0) return agents;
528
- return [...agents, ...promotedShells(info, shells.now).map((shell) => shellStep(shell, shells))];
528
+ const grants = info.shellAgentWrite !== void 0;
529
+ return [...agents, ...promotedShells(info, shells.now).map((shell) => shellStep(shell, shells, grants))];
529
530
  }
530
- function shellStep(shell, options) {
531
+ function shellStep(shell, options, grants) {
531
532
  const status = shellInfoStatusText(shell);
532
533
  const running = shell.status === "running";
533
534
  return {
@@ -536,10 +537,15 @@ function shellStep(shell, options) {
536
537
  label: shellInfoLabel(shell),
537
538
  noun: "shell",
538
539
  state: shellInfoFailed(shell) ? "failed" : running ? "running" : "done",
539
- detail: running ? void 0 : status,
540
+ detail: running ? shell.agentWrite === true ? SHELL_AGENT_WRITE_NOTE : void 0 : status,
540
541
  title: `${shellTitle(shell)} · ${status}`,
541
542
  onSelect: () => options.onSelect(shell.id),
542
- onKill: running && options.onKill ? () => options.onKill?.(shell.id) : void 0
543
+ onKill: running && options.onKill ? () => options.onKill?.(shell.id) : void 0,
544
+ agentWrite: grants && options.onAgentWrite && shellGrantable(shell) ? {
545
+ granted: shell.agentWrite === true,
546
+ label: shellAgentWriteLabel(shell),
547
+ toggle: () => options.onAgentWrite?.(shell.id, shell.agentWrite !== true)
548
+ } : void 0
543
549
  };
544
550
  }
545
551
  function stepState(status) {
@@ -553,38 +559,56 @@ function StepRow({ step, active = false, onSelect }) {
553
559
  const body = step.state === "failed" ? "text-danger" : step.kind === "shell" ? "text-[var(--wd-shell-accent)]" : "text-success";
554
560
  return /* @__PURE__ */ jsxs("div", {
555
561
  className: cn("flex w-full items-center rounded-[4px] pr-1.5", active ? "bg-row-selected" : "hover:bg-row-active", body),
556
- children: [/* @__PURE__ */ jsxs("button", {
557
- type: "button",
558
- title: step.title,
559
- "aria-current": active || void 0,
560
- onClick: (e) => {
561
- e.stopPropagation();
562
- onSelect();
563
- },
564
- className: "flex min-w-0 flex-1 items-center gap-1.5 py-1 pr-1 pl-3.5 text-left text-micro outline-none",
565
- children: [
566
- /* @__PURE__ */ jsx(StepIcon, { step }),
567
- /* @__PURE__ */ jsx("span", {
568
- className: "min-w-0 flex-1 truncate",
569
- children: step.label
570
- }),
571
- step.detail ? /* @__PURE__ */ jsx("span", {
572
- className: "shrink-0 tabular-nums text-fg-4",
573
- children: step.detail
574
- }) : null,
575
- /* @__PURE__ */ jsx(ArrowRight, { className: "size-3.5 shrink-0 text-fg-4" })
576
- ]
577
- }), step.onKill ? /* @__PURE__ */ jsx("button", {
578
- type: "button",
579
- "aria-label": `Kill ${step.label}`,
580
- title: "Kill this shell",
581
- onClick: (e) => {
582
- e.stopPropagation();
583
- step.onKill?.();
584
- },
585
- className: "shrink-0 px-1 text-micro leading-none text-fg-4 outline-none hover:text-danger",
586
- children: "✕"
587
- }) : null]
562
+ children: [
563
+ /* @__PURE__ */ jsxs("button", {
564
+ type: "button",
565
+ title: step.title,
566
+ "aria-current": active || void 0,
567
+ onClick: (e) => {
568
+ e.stopPropagation();
569
+ onSelect();
570
+ },
571
+ className: "flex min-w-0 flex-1 items-center gap-1.5 py-1 pr-1 pl-3.5 text-left text-micro outline-none",
572
+ children: [
573
+ /* @__PURE__ */ jsx(StepIcon, { step }),
574
+ /* @__PURE__ */ jsx("span", {
575
+ className: "min-w-0 flex-1 truncate",
576
+ children: step.label
577
+ }),
578
+ step.detail ? /* @__PURE__ */ jsx("span", {
579
+ className: "shrink-0 tabular-nums text-fg-4",
580
+ children: step.detail
581
+ }) : null,
582
+ step.kind === "shell" ? null : /* @__PURE__ */ jsx(ArrowRight, { className: "size-3.5 shrink-0 text-fg-4" })
583
+ ]
584
+ }),
585
+ step.agentWrite ? /* @__PURE__ */ jsx("button", {
586
+ type: "button",
587
+ "aria-label": step.agentWrite.label,
588
+ "aria-pressed": step.agentWrite.granted,
589
+ title: step.agentWrite.label,
590
+ onClick: (e) => {
591
+ e.stopPropagation();
592
+ step.agentWrite?.toggle();
593
+ },
594
+ className: cn("shrink-0 px-1 text-micro leading-none outline-none", step.agentWrite.granted ? "text-warning" : "text-fg-4 hover:text-fg-1"),
595
+ children: /* @__PURE__ */ jsx(AgentWriteIcon, {
596
+ granted: step.agentWrite.granted,
597
+ className: "size-3.5"
598
+ })
599
+ }) : null,
600
+ step.onKill ? /* @__PURE__ */ jsx("button", {
601
+ type: "button",
602
+ "aria-label": `Kill ${step.label}`,
603
+ title: "Kill this shell",
604
+ onClick: (e) => {
605
+ e.stopPropagation();
606
+ step.onKill?.();
607
+ },
608
+ className: "shrink-0 px-1 text-micro leading-none text-fg-4 outline-none hover:text-danger",
609
+ children: "✕"
610
+ }) : null
611
+ ]
588
612
  });
589
613
  }
590
614
  function StepIcon({ step }) {
@@ -605,7 +629,7 @@ const NO_MODIFIERS = {
605
629
  ctrl: false,
606
630
  alt: false
607
631
  };
608
- function SessionItem({ row, active = false, activeStepKey, showGateway, showProject = true, projectIcons, subagents = "active", onSelect, onSelectSubagent, onSelectShell, onKillShell, now, onRename, renameOn = "doubleClick", editing, onEditingChange, actions, className }) {
632
+ function SessionItem({ row, active = false, activeStepKey, showGateway, showProject = true, projectIcons, subagents = "active", onSelect, onSelectSubagent, onSelectShell, onKillShell, onShellAgentWrite, now, onRename, renameOn = "doubleClick", editing, onEditingChange, actions, className }) {
609
633
  const { info } = row;
610
634
  const [ownEditing, setOwnEditing] = useState(false);
611
635
  const isEditing = editing ?? ownEditing;
@@ -643,7 +667,8 @@ function SessionItem({ row, active = false, activeStepKey, showGateway, showProj
643
667
  const steps = sessionSteps(info, (toolUseId) => onSelectSubagent ? onSelectSubagent(toolUseId) : onSelect?.(NO_MODIFIERS), subagents, {
644
668
  now: now ?? Date.now(),
645
669
  onSelect: (shellId) => onSelectShell ? onSelectShell(shellId) : onSelect?.(NO_MODIFIERS),
646
- onKill: onKillShell
670
+ onKill: onKillShell,
671
+ onAgentWrite: onShellAgentWrite
647
672
  });
648
673
  const holdsOpenStep = steps.some((s) => s.key === activeStepKey);
649
674
  return /* @__PURE__ */ jsxs("div", {
@@ -780,7 +805,7 @@ function NameEditor({ initial, onCommit, onCancel }) {
780
805
  function rowShapeClass(active) {
781
806
  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");
782
807
  }
783
- function SessionBrowser({ rows, config, onConfigChange, scope, activeId, activeSubagentId, activeShellId, now, onSelect, onDelete, onRename, onClearContext, onSelectSubagent, onSelectShell, onKillShell, emptyState, showControls = true, projectIcons, className }) {
808
+ function SessionBrowser({ rows, config, onConfigChange, scope, activeId, activeSubagentId, activeShellId, now, onSelect, onDelete, onRename, onClearContext, onSelectSubagent, onSelectShell, onKillShell, onShellAgentWrite, emptyState, showControls = true, projectIcons, className }) {
784
809
  const visible = useMemo(() => filterRows(rows, config, scope), [
785
810
  rows,
786
811
  config,
@@ -1015,7 +1040,8 @@ function SessionBrowser({ rows, config, onConfigChange, scope, activeId, activeS
1015
1040
  onClearContext,
1016
1041
  onSelectSubagent,
1017
1042
  onSelectShell,
1018
- onKillShell
1043
+ onKillShell,
1044
+ onShellAgentWrite
1019
1045
  }, `${row.hostId}:${row.info.id}`))]
1020
1046
  }, group.key))
1021
1047
  })
@@ -1026,7 +1052,7 @@ function iconSrcOf(row, icons) {
1026
1052
  const icon = row?.info.project?.icon;
1027
1053
  return icon?.type === "image" ? icons?.[icon.hash] : void 0;
1028
1054
  }
1029
- function SessionRowItem({ row, active, activeSubagentId, activeShellId, now, showGateway, showProject = true, subagents, projectIcons, onSelect, onDelete, onRename, onClearContext, onSelectSubagent, onSelectShell, onKillShell }) {
1055
+ function SessionRowItem({ row, active, activeSubagentId, activeShellId, now, showGateway, showProject = true, subagents, projectIcons, onSelect, onDelete, onRename, onClearContext, onSelectSubagent, onSelectShell, onKillShell, onShellAgentWrite }) {
1030
1056
  const { info } = row;
1031
1057
  const [editing, setEditing] = useState(false);
1032
1058
  return /* @__PURE__ */ jsx(SessionItem, {
@@ -1042,6 +1068,7 @@ function SessionRowItem({ row, active, activeSubagentId, activeShellId, now, sho
1042
1068
  onSelectSubagent: onSelectSubagent ? (id) => onSelectSubagent(row, id) : void 0,
1043
1069
  onSelectShell: onSelectShell ? (id) => onSelectShell(row, id) : void 0,
1044
1070
  onKillShell: onKillShell ? (id) => onKillShell(row, id) : void 0,
1071
+ onShellAgentWrite: onShellAgentWrite ? (id, enabled) => onShellAgentWrite(row, id, enabled) : void 0,
1045
1072
  onRename: onRename ? (title) => onRename(row, title) : void 0,
1046
1073
  renameOn: "external",
1047
1074
  editing,
@@ -1207,6 +1234,6 @@ function SubagentToggle({ value, onChange, className }) {
1207
1234
  })] });
1208
1235
  }
1209
1236
  //#endregion
1210
- 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, SHELL_GLYPH, SHELL_KILL_GLYPH, STATUS_META, SUBAGENT_DISPLAY_META, SUBAGENT_DISPLAY_ORDER, Select, SelectContent, SelectItem, SelectItemText, SelectTrigger, SelectValue, SessionBrowser, SessionEmptyState, SessionInfoDialog, SessionItem, SessionList, SessionListItem, SessionNamesProvider, SessionPanel, SessionStatusIcon, ShellActionsProvider, ShellStrip, 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, shellInfoFailed, shellInfoLabel, shellInfoStatusText, shellTitle, skillPrompt, toast, toolIcon, toolInputPreview, useAffordances, useFileLinks, useMinuteClock, usePathLinks, usePromptAreaState, useShellActions, useShellFrame, useToolTitle, useTranscriptDensity, useTranscriptVariant, vendorMarkClass, vendorTextClass };
1237
+ export { AgentWriteIcon, 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, ImageViewer, ImageViewerProvider, 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, SHELL_AGENT_WRITE_NOTE, SHELL_GLYPH, SHELL_KILL_GLYPH, STATUS_META, SUBAGENT_DISPLAY_META, SUBAGENT_DISPLAY_ORDER, Select, SelectContent, SelectItem, SelectItemText, SelectTrigger, SelectValue, SessionBrowser, SessionEmptyState, SessionInfoDialog, SessionItem, SessionList, SessionListItem, SessionNamesProvider, SessionPanel, SessionStatusIcon, ShellActionsProvider, ShellStrip, 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, 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, useMinuteClock, useOpenImage, usePathLinks, usePromptAreaState, useShellActions, useShellFrame, useToolTitle, useTranscriptVariant, vendorMarkClass, vendorTextClass };
1211
1238
 
1212
1239
  //# sourceMappingURL=index.mjs.map