@workerdeck/ui 2.0.0 → 2.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -176,10 +176,10 @@ lose by forgetting a second mount isn't one.
176
176
  - **`transcriptDensity` and `transcriptFont` reach `cards` only.** A terminal has one line height
177
177
  and is monospace by construction. Under `terminal` both are inert rather than broken — a host
178
178
  offering them as settings should say so, or hide them (the dashboard hides them).
179
- - **`midTurnSend: 'hold'` is a client-side hold, not an engine setting.** There is no option that
180
- stops Claude Code folding a mid-turn message into the running turn, so `'hold'` queues the
181
- message in the panel and sends it once the turn ends (an interrupt counts). A held message is
182
- not in the transcript yet — `HeldSendsBar` is its only trace — so do not hide it.
179
+ - **`unseen` is catch-up mode's whole switch.** Passing a watermark draws the boundary, fades what
180
+ was already read and offers the "N new rows since you were last here" bar; passing `undefined`
181
+ draws none of it. The mark is frozen at mount, so it never walks down the transcript under the
182
+ reader. A host offering this as a setting owns the storage — the panel has no preference.
183
183
  - **`scrubber` and `stickyPrompt` reach `terminal` only**, and by construction rather than policy.
184
184
  Both rest on the theme's premise — one line height and one cell make a row's height computable —
185
185
  and under `cards` the flags are inert.
@@ -10907,65 +10907,6 @@ function Transcript({ state, fileUrl, attachmentUrl, canBrowseFiles, hostImage,
10907
10907
  });
10908
10908
  }
10909
10909
  //#endregion
10910
- //#region src/components/agent/held-sends.tsx
10911
- function useHeldSends(options) {
10912
- const [held, setHeld] = useState([]);
10913
- const queue = useRef([]);
10914
- const sendRef = useRef(options.send);
10915
- sendRef.current = options.send;
10916
- const flush = useCallback(() => {
10917
- const queued = queue.current;
10918
- if (queued.length === 0) return;
10919
- queue.current = [];
10920
- setHeld([]);
10921
- for (const item of queued) sendRef.current(item.text, item.attachmentIds);
10922
- }, []);
10923
- useEffect(() => {
10924
- if (!options.busy) flush();
10925
- }, [options.busy, flush]);
10926
- return {
10927
- held,
10928
- submit: useCallback((text, attachmentIds) => {
10929
- if (!options.hold || !options.busy) {
10930
- sendRef.current(text, attachmentIds);
10931
- return;
10932
- }
10933
- queue.current = [...queue.current, {
10934
- text,
10935
- attachmentIds
10936
- }];
10937
- setHeld(queue.current);
10938
- }, [options.hold, options.busy]),
10939
- flush
10940
- };
10941
- }
10942
- function HeldSendsBar({ held, onSendNow }) {
10943
- if (held.length === 0) return null;
10944
- return /* @__PURE__ */ jsx("div", {
10945
- className: "px-3 pt-2",
10946
- children: /* @__PURE__ */ jsxs("div", {
10947
- className: "mx-auto flex w-full max-w-[var(--wd-transcript-max-width)] items-center gap-2 rounded-md border border-border bg-surface px-3 py-1.5 text-label text-fg-3",
10948
- children: [
10949
- /* @__PURE__ */ jsx(Clock, { className: "size-3.5 shrink-0" }),
10950
- /* @__PURE__ */ jsxs("span", {
10951
- className: "min-w-0 flex-1 truncate",
10952
- children: [
10953
- held.length === 1 ? "1 message" : `${held.length} messages`,
10954
- " waiting for this turn to end — ",
10955
- held[held.length - 1].text
10956
- ]
10957
- }),
10958
- /* @__PURE__ */ jsx("button", {
10959
- type: "button",
10960
- onClick: onSendNow,
10961
- className: "shrink-0 underline-offset-2 hover:underline",
10962
- children: "Send now"
10963
- })
10964
- ]
10965
- })
10966
- });
10967
- }
10968
- //#endregion
10969
10910
  //#region src/components/agent/UsageMeters.tsx
10970
10911
  function useMinuteClock(active = true) {
10971
10912
  const [now, setNow] = useState(() => Date.now());
@@ -11117,7 +11058,7 @@ const INTERACTIVE = [
11117
11058
  "[role=\"radio\"]",
11118
11059
  "[role=\"tab\"]"
11119
11060
  ].join(",");
11120
- function SessionPanel({ client, sessionId, header, panelSurface = "internal", statusSurface = "internal", statusPlacement = "top", onOpenPanel, onVitals, transcriptVariant = "cards", transcriptDensity = "comfortable", transcriptFont = "sans", midTurnSend = "fold", affordances, terminalMetrics, scrubber = false, bookmarks, onToggleBookmark, reveal, subagents, openSubagent, onSubagentChange, stickyPrompt = false, controlsSurface = "internal", onControls, focusComposerOnClick = false, unseen, readOnly = false, toolHost, clientTools, cacheTranscript, emptyState, onLinkClick, fontSize, className }) {
11061
+ function SessionPanel({ client, sessionId, header, panelSurface = "internal", statusSurface = "internal", statusPlacement = "top", onOpenPanel, onVitals, transcriptVariant = "cards", transcriptDensity = "comfortable", transcriptFont = "sans", affordances, terminalMetrics, scrubber = false, bookmarks, onToggleBookmark, reveal, subagents, openSubagent, onSubagentChange, stickyPrompt = false, controlsSurface = "internal", onControls, focusComposerOnClick = false, unseen, readOnly = false, toolHost, clientTools, cacheTranscript, emptyState, onLinkClick, fontSize, className }) {
11121
11062
  const effectiveTermFontSize = terminalMetrics?.fontSize ?? fontSize;
11122
11063
  const effectiveTermLineHeight = terminalMetrics?.lineHeight ?? (fontSize !== void 0 ? Math.round(fontSize * (18 / 13)) : void 0);
11123
11064
  const external = panelSurface === "external";
@@ -11287,11 +11228,6 @@ function SessionPanel({ client, sessionId, header, panelSurface = "internal", st
11287
11228
  argumentHint: "<model>"
11288
11229
  }, ...state.commands];
11289
11230
  }, [state.commands]);
11290
- const heldSends = useHeldSends({
11291
- hold: midTurnSend === "hold",
11292
- busy: busy && !ended,
11293
- send
11294
- });
11295
11231
  const handleSend = (text, attachmentIds) => {
11296
11232
  if (attachmentIds.length === 0) {
11297
11233
  const modelCommand = /^\/model\s+(\S+)$/.exec(text);
@@ -11306,7 +11242,7 @@ function SessionPanel({ client, sessionId, header, panelSurface = "internal", st
11306
11242
  }
11307
11243
  setCaughtUp(true);
11308
11244
  repinTranscript.current?.();
11309
- heldSends.submit(text, attachmentIds);
11245
+ send(text, attachmentIds);
11310
11246
  };
11311
11247
  const actionsMenu = /* @__PURE__ */ jsxs(Menu$1, { children: [/* @__PURE__ */ jsx(MenuTrigger, { render: /* @__PURE__ */ jsx(Button, {
11312
11248
  variant: "ghost",
@@ -11532,10 +11468,7 @@ function SessionPanel({ client, sessionId, header, panelSurface = "internal", st
11532
11468
  })
11533
11469
  })
11534
11470
  }) : null,
11535
- readOnly || subagentId !== void 0 ? null : /* @__PURE__ */ jsxs(Fragment$1, { children: [/* @__PURE__ */ jsx(HeldSendsBar, {
11536
- held: heldSends.held,
11537
- onSendNow: heldSends.flush
11538
- }), /* @__PURE__ */ jsx(Composer, {
11471
+ readOnly || subagentId !== void 0 ? null : /* @__PURE__ */ jsx(Fragment$1, { children: /* @__PURE__ */ jsx(Composer, {
11539
11472
  ref: composerRef,
11540
11473
  onSend: handleSend,
11541
11474
  onInterrupt: interrupt,
@@ -11551,7 +11484,7 @@ function SessionPanel({ client, sessionId, header, panelSurface = "internal", st
11551
11484
  fontSize: effectiveTermFontSize,
11552
11485
  lineHeight: effectiveTermLineHeight,
11553
11486
  affordances
11554
- })] }),
11487
+ }) }),
11555
11488
  statusPlacement === "bottom" ? statusBar : null,
11556
11489
  !external ? /* @__PURE__ */ jsxs(Fragment$1, { children: [
11557
11490
  /* @__PURE__ */ jsx(SessionInfoDialog, {
@@ -11679,6 +11612,6 @@ function Notice({ level, onDismiss, children }) {
11679
11612
  });
11680
11613
  }
11681
11614
  //#endregion
11682
- export { Band as $, PermissionPrompt as A, DialogClose as At, EntryIcon as B, Select$1 as Bt, SessionInfoDialog as C, CopyButton as Ct, QuestionPrompt as D, TooltipProvider as Dt, QUESTION_BEHAVIORS as E, TooltipContent as Et, permissionModeMeta as F, Menu$1 as Ft, Composer as G, SelectValue as Gt, TaskList as H, SelectItem as Ht, ModelSelect as I, MenuContent as It, ToolTitleProvider as J, Badge as Jt, skillPrompt as K, PortalScope as Kt, SkillsDialog as L, MenuItem as Lt, PERMISSION_MODES as M, DialogHeader as Mt, PermissionModeSelect as N, DialogRow as Nt, parseUserQuestions as O, Dialog$1 as Ot, permissionModeChoices as P, DialogTrigger as Pt, previewPatch as Q, cn as Qt, McpDialog as R, MenuSeparator as Rt, STATUS_META as S, Spinner as St, TerminalPermissionPrompt as T, Tip as Tt, ContextDialog as U, SelectItemText as Ut, TasksDialog as V, SelectContent as Vt, contextNote as W, SelectTrigger as Wt, TerminalMarkdown as X, Button as Xt, useToolTitle as Y, badgeVariants as Yt, TerminalDiff as Z, buttonVariants as Zt, Loader as _, plainTextToSegments as _t, HeldSendsBar as a, useAffordances as at, ConversationScrollButton as b, Splitter as bt, ToolCallCard as c, TranscriptDensityProvider as ct, Message as d, useTranscriptVariant as dt, Blank as et, MessageContent as f, commandTrigger as ft, SessionEmptyState as g, PromptArea as gt, TerminalTranscript as h, usePromptAreaState as ht, useMinuteClock as i, WithActions as it, Response as j, DialogContent as jt, SubagentStrip as k, DialogBody as kt, Reasoning as l, TranscriptVariantProvider as lt, TerminalItemView as m, mentionTrigger as mt, UsageDialog as n, Row as nt, useHeldSends as o, isMutatingTool as ot, FileCard as p, hashtagTrigger as pt, TerminalSurface as q, Input as qt, UsageMeters as r, CopyAction as rt, Transcript as s, toolIcon as st, SessionPanel as t, Ink as tt, PromptTokenText as u, useTranscriptDensity as ut, Conversation as v, segmentsToPlainText as vt, TerminalQuestionPrompt as w, copyText as wt, StatusBar as x, CodeBlock as xt, ConversationContent as y, ProgressRing as yt, HostFilesDialog as z, MenuTrigger as zt };
11615
+ export { Ink as $, PERMISSION_MODES as A, DialogHeader as At, TaskList as B, SelectItem as Bt, TerminalPermissionPrompt as C, Tip as Ct, SubagentStrip as D, DialogBody as Dt, parseUserQuestions as E, Dialog$1 as Et, SkillsDialog as F, MenuItem as Ft, TerminalSurface as G, Input as Gt, contextNote as H, SelectTrigger as Ht, McpDialog as I, MenuSeparator as It, TerminalMarkdown as J, Button as Jt, ToolTitleProvider as K, Badge as Kt, HostFilesDialog as L, MenuTrigger as Lt, permissionModeChoices as M, DialogTrigger as Mt, permissionModeMeta as N, Menu$1 as Nt, PermissionPrompt as O, DialogClose as Ot, ModelSelect as P, MenuContent as Pt, Blank as Q, EntryIcon as R, Select$1 as Rt, TerminalQuestionPrompt as S, copyText as St, QuestionPrompt as T, TooltipProvider as Tt, Composer as U, SelectValue as Ut, ContextDialog as V, SelectItemText as Vt, skillPrompt as W, PortalScope as Wt, previewPatch as X, cn as Xt, TerminalDiff as Y, buttonVariants as Yt, Band as Z, ConversationContent as _, ProgressRing as _t, Transcript as a, toolIcon as at, STATUS_META as b, Spinner as bt, PromptTokenText as c, useTranscriptDensity as ct, FileCard as d, hashtagTrigger as dt, Row as et, TerminalItemView as f, mentionTrigger as ft, Conversation as g, segmentsToPlainText as gt, Loader as h, plainTextToSegments as ht, useMinuteClock as i, isMutatingTool as it, PermissionModeSelect as j, DialogRow as jt, Response as k, DialogContent as kt, Message as l, useTranscriptVariant as lt, SessionEmptyState as m, PromptArea as mt, UsageDialog as n, WithActions as nt, ToolCallCard as o, TranscriptDensityProvider as ot, TerminalTranscript as p, usePromptAreaState as pt, useToolTitle as q, badgeVariants as qt, UsageMeters as r, useAffordances as rt, Reasoning as s, TranscriptVariantProvider as st, SessionPanel as t, CopyAction as tt, MessageContent as u, commandTrigger as ut, ConversationScrollButton as v, Splitter as vt, QUESTION_BEHAVIORS as w, TooltipContent as wt, SessionInfoDialog as x, CopyButton as xt, StatusBar as y, CodeBlock as yt, TasksDialog as z, SelectContent as zt };
11683
11616
 
11684
- //# sourceMappingURL=SessionPanel-CE5AVkg6.mjs.map
11617
+ //# sourceMappingURL=SessionPanel-DrMj8Yv0.mjs.map