zidane-ui 9.5.0 → 9.5.3

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 (88) hide show
  1. package/dist/chat/SessionList.d.ts +1 -1
  2. package/dist/chat/SessionList.js +1 -1
  3. package/dist/chat/Transcript.js +6 -2
  4. package/dist/chat/composer/ComposerEditor.js +1 -1
  5. package/dist/chat/composer/DraftPickers.d.ts +8 -2
  6. package/dist/chat/composer/DraftPickers.js +5 -3
  7. package/dist/chat/composer/ScopeToggle.d.ts +5 -2
  8. package/dist/chat/composer/ScopeToggle.js +3 -2
  9. package/dist/chat/composer/ServerScopeToggle.d.ts +5 -2
  10. package/dist/chat/composer/ServerScopeToggle.js +2 -1
  11. package/dist/chat/composer/use-draft-target.d.ts +7 -1
  12. package/dist/chat/composer/use-draft-target.js +19 -10
  13. package/dist/chat/headless/fixtures/demo-transcript-all-kinds.d.ts +6 -0
  14. package/dist/chat/headless/fixtures/demo-transcript-all-kinds.js +90 -2
  15. package/dist/chat/headless/index.d.ts +6 -5
  16. package/dist/chat/headless/index.js +4 -3
  17. package/dist/chat/headless/labels.d.ts +9 -0
  18. package/dist/chat/headless/labels.js +12 -3
  19. package/dist/chat/headless/session-list.d.ts +8 -0
  20. package/dist/chat/headless/session-list.js +7 -0
  21. package/dist/chat/headless/sidebar/inbox.d.ts +21 -5
  22. package/dist/chat/headless/sidebar/inbox.js +30 -12
  23. package/dist/chat/headless/sidebar/index.d.ts +2 -2
  24. package/dist/chat/headless/sidebar/index.js +2 -2
  25. package/dist/chat/headless/sidebar/labels.d.ts +7 -1
  26. package/dist/chat/headless/sidebar/labels.js +1 -1
  27. package/dist/chat/headless/sidebar/rows.d.ts +62 -5
  28. package/dist/chat/headless/sidebar/rows.js +93 -17
  29. package/dist/chat/headless/transcript/derive.d.ts +1 -0
  30. package/dist/chat/headless/transcript/derive.js +3 -1
  31. package/dist/chat/headless/transcript/fold.js +1 -0
  32. package/dist/chat/headless/transcript/index.d.ts +3 -2
  33. package/dist/chat/headless/transcript/index.js +2 -1
  34. package/dist/chat/headless/transcript/rail.js +1 -0
  35. package/dist/chat/headless/transcript/rows.d.ts +26 -2
  36. package/dist/chat/headless/transcript/select-stops.js +1 -0
  37. package/dist/chat/headless/transcript/session-groups.d.ts +36 -0
  38. package/dist/chat/headless/transcript/session-groups.js +94 -0
  39. package/dist/chat/index.d.ts +4 -3
  40. package/dist/chat/index.js +7 -6
  41. package/dist/chat/sidebar/InboxList.d.ts +14 -1
  42. package/dist/chat/sidebar/InboxList.js +33 -13
  43. package/dist/chat/sidebar/SessionSidebar.d.ts +13 -5
  44. package/dist/chat/sidebar/SessionSidebar.js +54 -34
  45. package/dist/chat/sidebar/SidebarGroupHeader.d.ts +7 -2
  46. package/dist/chat/sidebar/SidebarGroupHeader.js +22 -6
  47. package/dist/chat/sidebar/useInboxRows.d.ts +4 -1
  48. package/dist/chat/sidebar/useInboxRows.js +6 -3
  49. package/dist/chat/sidebar/useInboxTriage.d.ts +3 -0
  50. package/dist/chat/sidebar/useInboxTriage.js +3 -2
  51. package/dist/chat/testing/index.d.ts +2 -2
  52. package/dist/chat/testing/index.js +2 -2
  53. package/dist/chat/transcript/BadgeMenu.d.ts +9 -2
  54. package/dist/chat/transcript/BadgeMenu.js +20 -2
  55. package/dist/chat/transcript/SubagentBlock.js +24 -7
  56. package/dist/chat/transcript/TranscriptRail.js +3 -3
  57. package/dist/chat/transcript/TranscriptRow.js +8 -0
  58. package/dist/chat/transcript/frame.d.ts +7 -0
  59. package/dist/chat/transcript/frame.js +51 -5
  60. package/dist/chat/transcript/index.d.ts +4 -3
  61. package/dist/chat/transcript/index.js +3 -2
  62. package/dist/chat/transcript/notices.d.ts +9 -9
  63. package/dist/chat/transcript/notices.js +78 -81
  64. package/dist/chat/transcript/receipt-parts.d.ts +29 -2
  65. package/dist/chat/transcript/receipt-parts.js +40 -7
  66. package/dist/chat/transcript/row-estimate.js +4 -1
  67. package/dist/chat/transcript/run-rows.js +2 -5
  68. package/dist/chat/transcript/script-input.d.ts +1 -1
  69. package/dist/chat/transcript/session-groups.d.ts +21 -0
  70. package/dist/chat/transcript/session-groups.js +154 -0
  71. package/dist/chat/transcript/session-line.d.ts +63 -0
  72. package/dist/chat/transcript/session-line.js +114 -0
  73. package/dist/dist/{index-Bsp5Ku7r.d.ts → index-BsoTsm0E.d.ts} +17 -17
  74. package/dist/dist/index.d.ts +1 -1
  75. package/dist/session/ProjectName.js +1 -1
  76. package/dist/session/SessionHeader.js +1 -1
  77. package/dist/session/headless/labels.d.ts +1 -1
  78. package/dist/session/use-home-projects.d.ts +10 -3
  79. package/dist/session/use-home-projects.js +40 -4
  80. package/dist/settings/headless/mcp-requirement.js +4 -3
  81. package/dist/settings/headless/mcp.d.ts +2 -0
  82. package/dist/settings/headless/mcp.js +3 -2
  83. package/dist/settings/headless/search.d.ts +1 -1
  84. package/dist/settings/index.js +3 -3
  85. package/dist/settings/sections/mcp/McpSection.js +3 -5
  86. package/dist/styles.css +43 -0
  87. package/package.json +2 -2
  88. package/src/styles/transcript.css +39 -0
@@ -1,4 +1,5 @@
1
1
  import { Crossfade, Presence } from "../../motion/swap.js";
2
+ import { StatusDot } from "../StatusDot.js";
2
3
  import { useChatLabels } from "../useChatLabels.js";
3
4
  import { createContext, memo, useContext } from "react";
4
5
  import { jsx, jsxs } from "react/jsx-runtime";
@@ -71,10 +72,13 @@ const DOT_LINE_HEIGHT = {
71
72
  "spawn-end": "16px",
72
73
  "compact": "36px",
73
74
  "messages": "22.4px",
74
- "session-done": "30.4px",
75
- "session-error": "30.4px",
76
- "session-cancelled": "30.4px",
77
- "session-needs-attention": "30.4px"
75
+ "session-done": "22.4px",
76
+ "session-error": "22.4px",
77
+ "session-cancelled": "22.4px",
78
+ "session-needs-attention": "22.4px",
79
+ "session-group": "22.4px",
80
+ "session-project": "22.4px",
81
+ "session-worktree": "22.4px"
78
82
  };
79
83
  const DOT_OPTICAL_NUDGE = /* @__PURE__ */ new Set([
80
84
  "thinking",
@@ -159,6 +163,18 @@ const DOT_GLYPH = {
159
163
  "session-needs-attention": {
160
164
  icon: "i-ph-warning-circle",
161
165
  fg: "var(--zg-warn)"
166
+ },
167
+ "session-group": {
168
+ icon: "i-ph-stack",
169
+ fg: muted
170
+ },
171
+ "session-project": {
172
+ icon: "i-ph-folder",
173
+ fg: muted
174
+ },
175
+ "session-worktree": {
176
+ icon: "i-ph-git-branch",
177
+ fg: muted
162
178
  }
163
179
  };
164
180
  const DOT_LINE_STYLE = Object.fromEntries(Object.keys(DOT_LINE_HEIGHT).map((variant) => [variant, DOT_OPTICAL_NUDGE.has(variant) ? {
@@ -177,6 +193,22 @@ const ORBIT_STYLE = {
177
193
  animation: "zg-orbit 1.1s linear infinite"
178
194
  };
179
195
  /**
196
+ * A worker's report shows its outcome as the sidebar shows a session's
197
+ * state (`StatusDot`): the color is the status, so the row needs no verb.
198
+ */
199
+ const SESSION_EVENT_DOT = {
200
+ "done": "completed",
201
+ "error": "error",
202
+ "cancelled": "idle",
203
+ "needs-attention": "attention"
204
+ };
205
+ const SESSION_DOT_VARIANTS = {
206
+ "session-done": SESSION_EVENT_DOT.done,
207
+ "session-error": SESSION_EVENT_DOT.error,
208
+ "session-cancelled": SESSION_EVENT_DOT.cancelled,
209
+ "session-needs-attention": SESSION_EVENT_DOT["needs-attention"]
210
+ };
211
+ /**
180
212
  * The disclosure caret of a collapsible header: points right, turns down while open.
181
213
  *
182
214
  * @param props - Caret props: `open` and an optional `className`.
@@ -197,6 +229,20 @@ const Dot = memo(({ variant, line, className, style }) => {
197
229
  if (!useRowIcons()) return null;
198
230
  const icon = DOT_GLYPH[variant].icon;
199
231
  const lineStyle = line !== void 0 ? { height: line } : DOT_LINE_STYLE[variant];
232
+ const sessionDot = SESSION_DOT_VARIANTS[variant];
233
+ if (sessionDot) return /* @__PURE__ */ jsx("span", {
234
+ "aria-hidden": true,
235
+ "data-row-icon": variant,
236
+ className: ["relative z-10 inline-flex items-center shrink-0", className].filter(Boolean).join(" "),
237
+ style: style ? {
238
+ ...lineStyle,
239
+ ...style
240
+ } : lineStyle,
241
+ children: /* @__PURE__ */ jsx("span", {
242
+ className: "flex items-center justify-center w-4 h-4",
243
+ children: /* @__PURE__ */ jsx(StatusDot, { state: sessionDot })
244
+ })
245
+ });
200
246
  return /* @__PURE__ */ jsx("span", {
201
247
  "aria-hidden": true,
202
248
  "data-row-icon": variant,
@@ -224,4 +270,4 @@ const Dot = memo(({ variant, line, className, style }) => {
224
270
  });
225
271
  });
226
272
  Dot.displayName = "Dot";
227
- export { Caret, Dot, FailedMark, GUTTER_STEP_PX, RowFrame, RowIconsContext, lineStateOf, useRowIcons };
273
+ export { Caret, Dot, FailedMark, GUTTER_STEP_PX, RowFrame, RowIconsContext, SESSION_EVENT_DOT, lineStateOf, useRowIcons };
@@ -8,7 +8,7 @@ import { AnsiSpans, AnsiSpansProps, AnsiText, AnsiTextProps } from "./AnsiText.j
8
8
  import { TranscriptRenderersProvider, TranscriptRenderersProviderProps } from "./renderer-slots.js";
9
9
  import { AuthFailureCard, AuthFailureCardProps } from "./AuthFailureCard.js";
10
10
  import { ToolMediaItem, parseToolMedia } from "../headless/transcript/tool-media.js";
11
- import { BadgeEffectContext, BadgeMenuBrowser, BadgeMenuComposer, BadgeMenuProvider, BadgeMenuProviderProps, BadgeMenuSystem, OpenBadgeMenu, useBadgeMenu } from "./BadgeMenu.js";
11
+ import { BadgeEffectContext, BadgeMenuBrowser, BadgeMenuComposer, BadgeMenuOpenAction, BadgeMenuProvider, BadgeMenuProviderProps, BadgeMenuSystem, OpenBadgeMenu, useBadgeMenu } from "./BadgeMenu.js";
12
12
  import { BADGE_GLYPH, FileBadgeIcon, FileBadgeIconProps, LinkBadge, LinkBadgeProps, LinkIcon, LinkIconProps, fileBadgeName, fileBadgeSpec, linkGlyph, siteIconValue } from "./badges.js";
13
13
  import { CardMarkdown, CardMarkdownProps } from "./CardMarkdown.js";
14
14
  import { useCommand, useCommitInfo, useReferencedSession, useSkill, useTokenSession } from "./chip-details.js";
@@ -23,7 +23,7 @@ import { EnvironmentSetupDetails, EnvironmentSetupDetailsProps, EnvironmentSetup
23
23
  import { InlineCode, InlineCodeProps, RefChip, RefChipProps } from "./FileChip.js";
24
24
  import { ExchangeFoldRow, ExchangeFoldRowProps, FoldHeader, FoldHeaderProps, LiveScriptsContext } from "./fold.js";
25
25
  import { WorkerDetails, WorkerDetailsProps } from "./fold-worker.js";
26
- import { Caret, CaretProps, Dot, DotProps, FailedMark, FailedMarkProps, GUTTER_STEP_PX, LineState, RowFrame, RowFrameProps, RowIconsContext, lineStateOf, useRowIcons } from "./frame.js";
26
+ import { Caret, CaretProps, Dot, DotProps, FailedMark, FailedMarkProps, GUTTER_STEP_PX, LineState, RowFrame, RowFrameProps, RowIconsContext, SESSION_EVENT_DOT, lineStateOf, useRowIcons } from "./frame.js";
27
27
  import { ImageGenerationBlock, ImageGenerationBlockProps, drawsImageGeneration, imageRequestsOf, savedPaths } from "./ImageGenerationBlock.js";
28
28
  import { InlineChipText, InlineChipTextProps } from "./InlineChipText.js";
29
29
  import { InteractionTool, InteractionToolBody, InteractionToolBodyProps, hasInteractionBody } from "./InteractionToolBody.js";
@@ -49,6 +49,7 @@ import { CompactSummaryRow, CompactSummaryRowProps, RunReceiptInline, RunReceipt
49
49
  import { SelectCursor, SelectCursorProps } from "./SelectCursor.js";
50
50
  import { SelectTurnExit, SelectTurnHintKeys, SelectTurnHintKeysProps } from "./SelectTurnHint.js";
51
51
  import { SelectTurnCommands, SelectTurnProvider, SelectTurnProviderProps, SelectTurnState, SelectTurnValue, useSelectTurn } from "./SelectTurnProvider.js";
52
+ import { SessionEventGroupRow, SessionEventGroupRowProps } from "./session-groups.js";
52
53
  import { RunnableCodeBlock, ShellBlockProvider, ShellBlockProviderProps } from "./shell-block.js";
53
54
  import { useSiteIcon } from "./site-icons.js";
54
55
  import { RunnableCodeBlockProps, ShellBlockScope, useShellBlockScope } from "./shell-block-scope.js";
@@ -78,4 +79,4 @@ import { MAX_MATCHES, SearchHighlightStyle, TranscriptSearchOptions, TranscriptS
78
79
  import { useTranscriptSelectionCopy } from "./useTranscriptSelectionCopy.js";
79
80
  import { useWheelHoverPause } from "./useWheelHoverPause.js";
80
81
  import { MarkdownViews, MarkdownViewsProps } from "./view-scope.js";
81
- export { AUTO_FILL_PAGES, AnsiSpans, type AnsiSpansProps, AnsiText, type AnsiTextProps, AttachmentIcon, AttachmentIconProps, AttachmentLabelParts, AuthFailureCard, AuthFailureCardProps, BADGE_GLYPH, BadgeEffectContext, BadgeMenuBrowser, BadgeMenuComposer, BadgeMenuProvider, BadgeMenuProviderProps, BadgeMenuSystem, CHIP_CARD_WIDTH, CODE_PANEL, COMMAND_DETAIL_LINE, CardMarkdown, CardMarkdownProps, Caret, CaretProps, ChipCard, ChipCardProps, ChipHover, ChipHoverProps, ChipOpener, CodeBlockSlotProps, CodemodeScript, type CodemodeScriptProps, CommandCard, CommandCardProps, CommandDetailRow, CommandDetailRowProps, CommandNoteRow, CommandNoteRowProps, CommandScope, CommandScopeContext, CommitCard, CommitCardProps, CompactSummaryRow, CompactSummaryRowProps, ComposerSearch, CvRow, CvRowProps, DEFAULT_TRANSCRIPT_RENDERERS, DefaultInlineText, DefaultInlineTextProps, DefaultMarkdown, DefaultMarkdownProps, DefaultPrompt, DefaultPromptProps, DefaultSessionTitle, DefaultSessionTitleProps, DiffLines, DiffLinesProps, Dot, DotProps, EditDiffBlock, EditDiffBlockProps, EnvironmentSetupDetails, EnvironmentSetupDetailsProps, EnvironmentSetupRow, EnvironmentSetupRowProps, ErrorRow, ErrorRowProps, ExchangeFoldRow, ExchangeFoldRowProps, FILL_MIN_PROMPTS, FailedMark, FailedMarkProps, FailureRow, FailureRowProps, FileBadgeIcon, FileBadgeIconProps, FoldHeader, FoldHeaderProps, ForcedRows, GUTTER_STEP_PX, HostTurnMenuOptions, INLINE_CODE_CLASS, ImageGenerationBlock, ImageGenerationBlockProps, InfoRow, InfoRowProps, InlineChipText, InlineChipTextProps, InlineCode, InlineCodeProps, InlineTextSlotProps, InteractionTool, InteractionToolBody, InteractionToolBodyProps, LazyRow, LazyRowProps, LineState, LinkBadge, LinkBadgeProps, LinkIcon, LinkIconProps, LiveOutput, type LiveOutputProps, LiveScriptsContext, LoadEarlierRow, LoadEarlierRowProps, LoadFullOutputButton, LoadFullOutputButtonProps, MAX_MATCHES, Markdown, MarkdownContext, MarkdownContextValue, MarkdownDiagrams, MarkdownDiagramsProps, MarkdownImageProps, MarkdownLinkProps, MarkdownProps, MarkdownSlotProps, MarkdownViews, type MarkdownViewsProps, MermaidDiagram, type MermaidDiagramProps, MessageGroupRow, MessageGroupRowProps, ModelVerdict, ModelVerdictProps, NestedToolCalls, NestedToolCallsProps, NoticeRow, NoticeRowProps, OpenBadgeMenu, OpenSessionContext, ParsedRef, ParsedReferenceUrl, PromptEcho, PromptEchoProps, PromptLines, PromptLinesProps, PromptSlotProps, ProseMarkdown, ProseMarkdownProps, ReadFileBlock, ReadFileBlockProps, RefChip, RefChipProps, RefMatch, ReferenceChip, ReferenceChipProps, ReferenceText, ReferenceTextProps, RepairedRow, RepairedRowProps, RowContext, RowFrame, RowFrameProps, RowIconsContext, RowPlace, RunReceiptInline, RunReceiptInlineProps, RunSummaryRow, RunSummaryRowProps, RunnableCodeBlock, type RunnableCodeBlockProps, ScrollPosition, SearchHighlightStyle, SelectCursor, SelectCursorProps, SelectTurnCommands, SelectTurnExit, SelectTurnHintKeys, SelectTurnHintKeysProps, SelectTurnKeysOptions, SelectTurnProvider, SelectTurnProviderProps, SelectTurnState, SelectTurnValue, SessionCard, SessionCardProps, SessionEventRow, SessionEventRowProps, SessionTitleSlotProps, SetupChangedRow, SetupChangedRowProps, ShellBlockProvider, type ShellBlockProviderProps, type ShellBlockScope, SkillCard, SkillCardProps, SkillGroupCard, SkillGroupCardProps, SlotEntry, SpawnEndRow, SpawnEndRowProps, SpawnStartRow, SpawnStartRowProps, StickToBottomOptions, SubagentBlock, SubagentBlockProps, TaskBatchRow, TaskBatchRowProps, TaskRow, TaskRowProps, TextPreviewSlotProps, TextRow, TextRowProps, ThinkingBatchRow, ThinkingBatchRowProps, ThinkingRow, ThinkingRowProps, ToolBatchRow, ToolBatchRowProps, ToolBodySlotProps, ToolDetails, ToolDetailsProps, ToolGlyph, ToolGlyphProps, ToolInput, ToolInputProps, ToolMedia, type ToolMediaItem, ToolMediaProps, ToolRow, ToolRowProps, ToolTiming, ToolTimingProps, TranscriptAccounts, TranscriptActions, TranscriptActionsProvider, TranscriptActionsProviderProps, TranscriptFind, TranscriptFindKeyOptions, TranscriptFindOptions, TranscriptFindTarget, TranscriptRail, type TranscriptRailProps, TranscriptRailProvider, type TranscriptRailProviderProps, TranscriptRenderers, TranscriptRenderersProvider, type TranscriptRenderersProviderProps, TranscriptRow, TranscriptRowProps, TranscriptRowSlot, TranscriptRowSlotProps, TranscriptRows, TranscriptRowsInput, TranscriptScrollInputs, TranscriptSearch, TranscriptSearchOptions, TranscriptSearchProps, TranscriptSearchState, TranscriptSettling, TranscriptSource, TranscriptTurnMenu, TurnCommands, TurnCommandsOptions, TurnMenuActions, TurnMenuTarget, UserBashRow, UserBashRowProps, UserPromptAttachments, UserPromptAttachmentsProps, UserPromptRow, UserPromptRowProps, WorkerDetails, WorkerDetailsProps, attachmentSrcOf, classifyInlineRef, copyPromptLines, createTurnCommands, defaultAttachmentLabel, drawsImageGeneration, fileBadgeName, fileBadgeSpec, findRefs, hasInteractionBody, holdForceMountRows, imageRequestsOf, isHiddenRow, lineStateOf, linkGlyph, numberRef, parseRefUrl, parseReferenceUrl, parseToolMedia, refHref, referenceUrl, remarkReferences, remarkRefs, revealRow, savedPaths, siteIconValue, toolMediaSrcOf, turnViewsOf, useBackgroundMount, useBadgeMenu, useChipResolution, useCommand, useCommitInfo, useComposerSearch, useFillViewportScrollback, useForceMountRows, useForcedRows, useFullOutput, useFullToolCall, useHostTurnMenu, useModelName, useRailOutline, useReferenceMatches, useReferenceProviders, useReferenceView, useReferencedSession, useResolveChipNow, useRowIcons, useSelectStops, useSelectTurn, useSelectTurnKeys, useSettledReveal, useShellBlockScope, useSiteIcon, useSkill, useStickToBottom, useTokenSession, useToolMedia, useTranscriptActions, useTranscriptFind, useTranscriptFindKey, useTranscriptRailStore, useTranscriptRenderers, useTranscriptRows, useTranscriptScroll, useTranscriptSearch, useTranscriptSelectionCopy, useTurnCommands, useTurnMenu, useWheelHoverPause };
82
+ export { AUTO_FILL_PAGES, AnsiSpans, type AnsiSpansProps, AnsiText, type AnsiTextProps, AttachmentIcon, AttachmentIconProps, AttachmentLabelParts, AuthFailureCard, AuthFailureCardProps, BADGE_GLYPH, BadgeEffectContext, BadgeMenuBrowser, BadgeMenuComposer, BadgeMenuOpenAction, BadgeMenuProvider, BadgeMenuProviderProps, BadgeMenuSystem, CHIP_CARD_WIDTH, CODE_PANEL, COMMAND_DETAIL_LINE, CardMarkdown, CardMarkdownProps, Caret, CaretProps, ChipCard, ChipCardProps, ChipHover, ChipHoverProps, ChipOpener, CodeBlockSlotProps, CodemodeScript, type CodemodeScriptProps, CommandCard, CommandCardProps, CommandDetailRow, CommandDetailRowProps, CommandNoteRow, CommandNoteRowProps, CommandScope, CommandScopeContext, CommitCard, CommitCardProps, CompactSummaryRow, CompactSummaryRowProps, ComposerSearch, CvRow, CvRowProps, DEFAULT_TRANSCRIPT_RENDERERS, DefaultInlineText, DefaultInlineTextProps, DefaultMarkdown, DefaultMarkdownProps, DefaultPrompt, DefaultPromptProps, DefaultSessionTitle, DefaultSessionTitleProps, DiffLines, DiffLinesProps, Dot, DotProps, EditDiffBlock, EditDiffBlockProps, EnvironmentSetupDetails, EnvironmentSetupDetailsProps, EnvironmentSetupRow, EnvironmentSetupRowProps, ErrorRow, ErrorRowProps, ExchangeFoldRow, ExchangeFoldRowProps, FILL_MIN_PROMPTS, FailedMark, FailedMarkProps, FailureRow, FailureRowProps, FileBadgeIcon, FileBadgeIconProps, FoldHeader, FoldHeaderProps, ForcedRows, GUTTER_STEP_PX, HostTurnMenuOptions, INLINE_CODE_CLASS, ImageGenerationBlock, ImageGenerationBlockProps, InfoRow, InfoRowProps, InlineChipText, InlineChipTextProps, InlineCode, InlineCodeProps, InlineTextSlotProps, InteractionTool, InteractionToolBody, InteractionToolBodyProps, LazyRow, LazyRowProps, LineState, LinkBadge, LinkBadgeProps, LinkIcon, LinkIconProps, LiveOutput, type LiveOutputProps, LiveScriptsContext, LoadEarlierRow, LoadEarlierRowProps, LoadFullOutputButton, LoadFullOutputButtonProps, MAX_MATCHES, Markdown, MarkdownContext, MarkdownContextValue, MarkdownDiagrams, MarkdownDiagramsProps, MarkdownImageProps, MarkdownLinkProps, MarkdownProps, MarkdownSlotProps, MarkdownViews, type MarkdownViewsProps, MermaidDiagram, type MermaidDiagramProps, MessageGroupRow, MessageGroupRowProps, ModelVerdict, ModelVerdictProps, NestedToolCalls, NestedToolCallsProps, NoticeRow, NoticeRowProps, OpenBadgeMenu, OpenSessionContext, ParsedRef, ParsedReferenceUrl, PromptEcho, PromptEchoProps, PromptLines, PromptLinesProps, PromptSlotProps, ProseMarkdown, ProseMarkdownProps, ReadFileBlock, ReadFileBlockProps, RefChip, RefChipProps, RefMatch, ReferenceChip, ReferenceChipProps, ReferenceText, ReferenceTextProps, RepairedRow, RepairedRowProps, RowContext, RowFrame, RowFrameProps, RowIconsContext, RowPlace, RunReceiptInline, RunReceiptInlineProps, RunSummaryRow, RunSummaryRowProps, RunnableCodeBlock, type RunnableCodeBlockProps, SESSION_EVENT_DOT, ScrollPosition, SearchHighlightStyle, SelectCursor, SelectCursorProps, SelectTurnCommands, SelectTurnExit, SelectTurnHintKeys, SelectTurnHintKeysProps, SelectTurnKeysOptions, SelectTurnProvider, SelectTurnProviderProps, SelectTurnState, SelectTurnValue, SessionCard, SessionCardProps, SessionEventGroupRow, SessionEventGroupRowProps, SessionEventRow, SessionEventRowProps, SessionTitleSlotProps, SetupChangedRow, SetupChangedRowProps, ShellBlockProvider, type ShellBlockProviderProps, type ShellBlockScope, SkillCard, SkillCardProps, SkillGroupCard, SkillGroupCardProps, SlotEntry, SpawnEndRow, SpawnEndRowProps, SpawnStartRow, SpawnStartRowProps, StickToBottomOptions, SubagentBlock, SubagentBlockProps, TaskBatchRow, TaskBatchRowProps, TaskRow, TaskRowProps, TextPreviewSlotProps, TextRow, TextRowProps, ThinkingBatchRow, ThinkingBatchRowProps, ThinkingRow, ThinkingRowProps, ToolBatchRow, ToolBatchRowProps, ToolBodySlotProps, ToolDetails, ToolDetailsProps, ToolGlyph, ToolGlyphProps, ToolInput, ToolInputProps, ToolMedia, type ToolMediaItem, ToolMediaProps, ToolRow, ToolRowProps, ToolTiming, ToolTimingProps, TranscriptAccounts, TranscriptActions, TranscriptActionsProvider, TranscriptActionsProviderProps, TranscriptFind, TranscriptFindKeyOptions, TranscriptFindOptions, TranscriptFindTarget, TranscriptRail, type TranscriptRailProps, TranscriptRailProvider, type TranscriptRailProviderProps, TranscriptRenderers, TranscriptRenderersProvider, type TranscriptRenderersProviderProps, TranscriptRow, TranscriptRowProps, TranscriptRowSlot, TranscriptRowSlotProps, TranscriptRows, TranscriptRowsInput, TranscriptScrollInputs, TranscriptSearch, TranscriptSearchOptions, TranscriptSearchProps, TranscriptSearchState, TranscriptSettling, TranscriptSource, TranscriptTurnMenu, TurnCommands, TurnCommandsOptions, TurnMenuActions, TurnMenuTarget, UserBashRow, UserBashRowProps, UserPromptAttachments, UserPromptAttachmentsProps, UserPromptRow, UserPromptRowProps, WorkerDetails, WorkerDetailsProps, attachmentSrcOf, classifyInlineRef, copyPromptLines, createTurnCommands, defaultAttachmentLabel, drawsImageGeneration, fileBadgeName, fileBadgeSpec, findRefs, hasInteractionBody, holdForceMountRows, imageRequestsOf, isHiddenRow, lineStateOf, linkGlyph, numberRef, parseRefUrl, parseReferenceUrl, parseToolMedia, refHref, referenceUrl, remarkReferences, remarkRefs, revealRow, savedPaths, siteIconValue, toolMediaSrcOf, turnViewsOf, useBackgroundMount, useBadgeMenu, useChipResolution, useCommand, useCommitInfo, useComposerSearch, useFillViewportScrollback, useForceMountRows, useForcedRows, useFullOutput, useFullToolCall, useHostTurnMenu, useModelName, useRailOutline, useReferenceMatches, useReferenceProviders, useReferenceView, useReferencedSession, useResolveChipNow, useRowIcons, useSelectStops, useSelectTurn, useSelectTurnKeys, useSettledReveal, useShellBlockScope, useSiteIcon, useSkill, useStickToBottom, useTokenSession, useToolMedia, useTranscriptActions, useTranscriptFind, useTranscriptFindKey, useTranscriptRailStore, useTranscriptRenderers, useTranscriptRows, useTranscriptScroll, useTranscriptSearch, useTranscriptSelectionCopy, useTurnCommands, useTurnMenu, useWheelHoverPause };
@@ -18,7 +18,7 @@ import { useShellBlockScope } from "./shell-block-scope.js";
18
18
  import { ExchangeFoldRow, FoldHeader, LiveScriptsContext } from "./fold.js";
19
19
  import { WorkerDetails } from "./fold-worker.js";
20
20
  import { parseToolMedia } from "../headless/transcript/tool-media.js";
21
- import { Caret, Dot, FailedMark, GUTTER_STEP_PX, RowFrame, RowIconsContext, lineStateOf, useRowIcons } from "./frame.js";
21
+ import { Caret, Dot, FailedMark, GUTTER_STEP_PX, RowFrame, RowIconsContext, SESSION_EVENT_DOT, lineStateOf, useRowIcons } from "./frame.js";
22
22
  import { ImageGenerationBlock, drawsImageGeneration, imageRequestsOf, savedPaths } from "./ImageGenerationBlock.js";
23
23
  import { InlineChipText } from "./InlineChipText.js";
24
24
  import { InteractionToolBody, hasInteractionBody } from "./InteractionToolBody.js";
@@ -45,6 +45,7 @@ import { CompactSummaryRow, RunReceiptInline, RunSummaryRow } from "./run-rows.j
45
45
  import { SelectCursor } from "./SelectCursor.js";
46
46
  import { SelectTurnExit, SelectTurnHintKeys } from "./SelectTurnHint.js";
47
47
  import { SelectTurnProvider, useSelectTurn } from "./SelectTurnProvider.js";
48
+ import { SessionEventGroupRow } from "./session-groups.js";
48
49
  import { RunnableCodeBlock, ShellBlockProvider } from "./shell-block.js";
49
50
  import { useSiteIcon } from "./site-icons.js";
50
51
  import { SubagentBlock } from "./SubagentBlock.js";
@@ -73,4 +74,4 @@ import { MAX_MATCHES, SearchHighlightStyle, useTranscriptSearch } from "./useTra
73
74
  import { useTranscriptSelectionCopy } from "./useTranscriptSelectionCopy.js";
74
75
  import { useWheelHoverPause } from "./useWheelHoverPause.js";
75
76
  import { MarkdownViews } from "./view-scope.js";
76
- export { AUTO_FILL_PAGES, AnsiSpans, AnsiText, AttachmentIcon, AuthFailureCard, BADGE_GLYPH, BadgeMenuProvider, CHIP_CARD_WIDTH, CODE_PANEL, COMMAND_DETAIL_LINE, CardMarkdown, Caret, ChipCard, ChipHover, CodemodeScript, CommandCard, CommandDetailRow, CommandNoteRow, CommandScopeContext, CommitCard, CompactSummaryRow, CvRow, DEFAULT_TRANSCRIPT_RENDERERS, DefaultInlineText, DefaultMarkdown, DefaultPrompt, DefaultSessionTitle, DiffLines, Dot, EditDiffBlock, EnvironmentSetupDetails, EnvironmentSetupRow, ErrorRow, ExchangeFoldRow, FILL_MIN_PROMPTS, FailedMark, FailureRow, FileBadgeIcon, FoldHeader, GUTTER_STEP_PX, INLINE_CODE_CLASS, ImageGenerationBlock, InfoRow, InlineChipText, InlineCode, InteractionToolBody, LazyRow, LinkBadge, LinkIcon, LiveOutput, LiveScriptsContext, LoadEarlierRow, LoadFullOutputButton, MAX_MATCHES, Markdown, MarkdownContext, MarkdownDiagrams, MarkdownViews, MermaidDiagram, MessageGroupRow, ModelVerdict, NestedToolCalls, NoticeRow, OpenSessionContext, PromptEcho, PromptLines, ProseMarkdown, ReadFileBlock, RefChip, ReferenceChip, ReferenceText, RepairedRow, RowFrame, RowIconsContext, RunReceiptInline, RunSummaryRow, RunnableCodeBlock, SearchHighlightStyle, SelectCursor, SelectTurnExit, SelectTurnHintKeys, SelectTurnProvider, SessionCard, SessionEventRow, SetupChangedRow, ShellBlockProvider, SkillCard, SkillGroupCard, SpawnEndRow, SpawnStartRow, SubagentBlock, TaskBatchRow, TaskRow, TextRow, ThinkingBatchRow, ThinkingRow, ToolBatchRow, ToolDetails, ToolGlyph, ToolInput, ToolMedia, ToolRow, ToolTiming, TranscriptActionsProvider, TranscriptRail, TranscriptRailProvider, TranscriptRenderersProvider, TranscriptRow, TranscriptRowSlot, TranscriptSearch, TranscriptSettling, UserBashRow, UserPromptAttachments, UserPromptRow, WorkerDetails, attachmentSrcOf, classifyInlineRef, copyPromptLines, createTurnCommands, defaultAttachmentLabel, drawsImageGeneration, fileBadgeName, fileBadgeSpec, findRefs, hasInteractionBody, holdForceMountRows, imageRequestsOf, isHiddenRow, lineStateOf, linkGlyph, numberRef, parseRefUrl, parseReferenceUrl, parseToolMedia, refHref, referenceUrl, remarkReferences, remarkRefs, revealRow, savedPaths, siteIconValue, toolMediaSrcOf, turnViewsOf, useBackgroundMount, useBadgeMenu, useChipResolution, useCommand, useCommitInfo, useComposerSearch, useFillViewportScrollback, useForceMountRows, useForcedRows, useFullOutput, useFullToolCall, useHostTurnMenu, useModelName, useRailOutline, useReferenceMatches, useReferenceProviders, useReferenceView, useReferencedSession, useResolveChipNow, useRowIcons, useSelectStops, useSelectTurn, useSelectTurnKeys, useSettledReveal, useShellBlockScope, useSiteIcon, useSkill, useStickToBottom, useTokenSession, useToolMedia, useTranscriptActions, useTranscriptFind, useTranscriptFindKey, useTranscriptRailStore, useTranscriptRenderers, useTranscriptRows, useTranscriptScroll, useTranscriptSearch, useTranscriptSelectionCopy, useTurnCommands, useTurnMenu, useWheelHoverPause };
77
+ export { AUTO_FILL_PAGES, AnsiSpans, AnsiText, AttachmentIcon, AuthFailureCard, BADGE_GLYPH, BadgeMenuProvider, CHIP_CARD_WIDTH, CODE_PANEL, COMMAND_DETAIL_LINE, CardMarkdown, Caret, ChipCard, ChipHover, CodemodeScript, CommandCard, CommandDetailRow, CommandNoteRow, CommandScopeContext, CommitCard, CompactSummaryRow, CvRow, DEFAULT_TRANSCRIPT_RENDERERS, DefaultInlineText, DefaultMarkdown, DefaultPrompt, DefaultSessionTitle, DiffLines, Dot, EditDiffBlock, EnvironmentSetupDetails, EnvironmentSetupRow, ErrorRow, ExchangeFoldRow, FILL_MIN_PROMPTS, FailedMark, FailureRow, FileBadgeIcon, FoldHeader, GUTTER_STEP_PX, INLINE_CODE_CLASS, ImageGenerationBlock, InfoRow, InlineChipText, InlineCode, InteractionToolBody, LazyRow, LinkBadge, LinkIcon, LiveOutput, LiveScriptsContext, LoadEarlierRow, LoadFullOutputButton, MAX_MATCHES, Markdown, MarkdownContext, MarkdownDiagrams, MarkdownViews, MermaidDiagram, MessageGroupRow, ModelVerdict, NestedToolCalls, NoticeRow, OpenSessionContext, PromptEcho, PromptLines, ProseMarkdown, ReadFileBlock, RefChip, ReferenceChip, ReferenceText, RepairedRow, RowFrame, RowIconsContext, RunReceiptInline, RunSummaryRow, RunnableCodeBlock, SESSION_EVENT_DOT, SearchHighlightStyle, SelectCursor, SelectTurnExit, SelectTurnHintKeys, SelectTurnProvider, SessionCard, SessionEventGroupRow, SessionEventRow, SetupChangedRow, ShellBlockProvider, SkillCard, SkillGroupCard, SpawnEndRow, SpawnStartRow, SubagentBlock, TaskBatchRow, TaskRow, TextRow, ThinkingBatchRow, ThinkingRow, ToolBatchRow, ToolDetails, ToolGlyph, ToolInput, ToolMedia, ToolRow, ToolTiming, TranscriptActionsProvider, TranscriptRail, TranscriptRailProvider, TranscriptRenderersProvider, TranscriptRow, TranscriptRowSlot, TranscriptSearch, TranscriptSettling, UserBashRow, UserPromptAttachments, UserPromptRow, WorkerDetails, attachmentSrcOf, classifyInlineRef, copyPromptLines, createTurnCommands, defaultAttachmentLabel, drawsImageGeneration, fileBadgeName, fileBadgeSpec, findRefs, hasInteractionBody, holdForceMountRows, imageRequestsOf, isHiddenRow, lineStateOf, linkGlyph, numberRef, parseRefUrl, parseReferenceUrl, parseToolMedia, refHref, referenceUrl, remarkReferences, remarkRefs, revealRow, savedPaths, siteIconValue, toolMediaSrcOf, turnViewsOf, useBackgroundMount, useBadgeMenu, useChipResolution, useCommand, useCommitInfo, useComposerSearch, useFillViewportScrollback, useForceMountRows, useForcedRows, useFullOutput, useFullToolCall, useHostTurnMenu, useModelName, useRailOutline, useReferenceMatches, useReferenceProviders, useReferenceView, useReferencedSession, useResolveChipNow, useRowIcons, useSelectStops, useSelectTurn, useSelectTurnKeys, useSettledReveal, useShellBlockScope, useSiteIcon, useSkill, useStickToBottom, useTokenSession, useToolMedia, useTranscriptActions, useTranscriptFind, useTranscriptFindKey, useTranscriptRailStore, useTranscriptRenderers, useTranscriptRows, useTranscriptScroll, useTranscriptSearch, useTranscriptSelectionCopy, useTurnCommands, useTurnMenu, useWheelHoverPause };
@@ -152,15 +152,15 @@ export interface SessionEventRowProps {
152
152
  style?: CSSProperties;
153
153
  }
154
154
  /**
155
- * Orchestration: a worker session reported an outcome. Drawn as a session
156
- * thread draws its steps (the fold head / ToolRow idiom): a flat
157
- * `.zg-disclosure` row, the title in the content voice, the receipt in
158
- * `.zg-meta`, and a muted two-line excerpt of the worker's last word. No
159
- * card, tint or line: status lives on the timeline dot and the verb's color. The whole row is a button that jumps to the
160
- * reporting session (`onOpenSession`; without it the row is inert);
161
- * `needs-attention` is the loud one, since it is the one status a human, not
162
- * the main, has to act on. Falls back to a plain, non-clickable text row
163
- * when `sessionEvent` is absent (malformed signal).
155
+ * Orchestration: a worker session reported an outcome. One bar at the
156
+ * conversation's size (`SessionLine`): the sidebar's status dot (its color
157
+ * is the outcome, so there is no verb on screen), the title, the report's
158
+ * excerpt, then the run's duration and turns in their fixed slots, the open
159
+ * button, the caret. Opened, the report shows in full, rendered as markdown,
160
+ * with the rest of the run's receipt under it. Under its conversation's
161
+ * header the bar reads its time instead of the title. Where the session ran
162
+ * is the group's to say (its project and worktree sections). Falls back to a
163
+ * plain text row when `sessionEvent` is absent (malformed signal).
164
164
  */
165
165
  export declare const SessionEventRow: import("react").MemoExoticComponent<({ event, onOpenSession, className, style }: SessionEventRowProps) => import("react").JSX.Element>;
166
166
  /**
@@ -2,15 +2,18 @@ import { useOptionalConfirm } from "../../app/useConfirm.js";
2
2
  import { useTooltip } from "../../components/Tooltip.js";
3
3
  import { useStaysMounted } from "../../motion/collapse.js";
4
4
  import { failureTooltip } from "../headless/transcript/run-failures.js";
5
+ import { StatusDot } from "../StatusDot.js";
5
6
  import { useChatLabels } from "../useChatLabels.js";
6
7
  import { useTranscriptActions } from "./actions.js";
7
8
  import { AuthFailureCard } from "./AuthFailureCard.js";
8
- import { Caret } from "./frame.js";
9
+ import { Caret, SESSION_EVENT_DOT, useRowIcons } from "./frame.js";
10
+ import { ProseMarkdown } from "./ProseMarkdown.js";
9
11
  import { useTranscriptRenderers } from "./renderers.js";
10
12
  import { useRowPartKey, useRowUiState } from "./row-ui-state.js";
13
+ import { SessionLine, useSessionEventScope } from "./session-line.js";
11
14
  import { memo, useEffect, useId, useRef, useState } from "react";
12
15
  import { Fragment as Fragment$1, jsx, jsxs } from "react/jsx-runtime";
13
- import { CONTINUE_PROMPT, SESSION_EVENT_STATUS_STYLE, SETUP_CHANGED_LABEL, describeSpawnEnd, sessionDirLabel, sessionEventExcerpt, sessionEventMeta, shortSessionId, spawnStartParts } from "zidane/chat/pure";
16
+ import { CONTINUE_PROMPT, SESSION_EVENT_STATUS_STYLE, SETUP_CHANGED_LABEL, describeSpawnEnd, fmtCost, formatTokenCount, sessionEventExcerpt, sessionEventReport, shortSessionId, spawnStartParts } from "zidane/chat/pure";
14
17
  // src/chat/transcript/notices.tsx
15
18
  /**
16
19
  * Command steps, outputs and a run's error line read at the transcript's
@@ -340,30 +343,22 @@ const FailureRow = memo(({ text, detail, failure, stoppedBy, resumable, onResume
340
343
  });
341
344
  });
342
345
  /**
343
- * `SessionEventTone` → the verb's color in `SessionEventRow`. A finished run
344
- * is the common case, so it stays plain text; only the states that need a
345
- * look carry color (the timeline dot already says "done").
346
- */
347
- const SESSION_EVENT_VERB_COLOR = {
348
- accent: "text-[var(--zg-text-muted)]",
349
- error: "text-zg-danger",
350
- dim: "text-[var(--zg-text-muted)]",
351
- warn: "text-zg-warn"
352
- };
353
- /**
354
- * Orchestration: a worker session reported an outcome. Drawn as a session
355
- * thread draws its steps (the fold head / ToolRow idiom): a flat
356
- * `.zg-disclosure` row, the title in the content voice, the receipt in
357
- * `.zg-meta`, and a muted two-line excerpt of the worker's last word. No
358
- * card, tint or line: status lives on the timeline dot and the verb's color. The whole row is a button that jumps to the
359
- * reporting session (`onOpenSession`; without it the row is inert);
360
- * `needs-attention` is the loud one, since it is the one status a human, not
361
- * the main, has to act on. Falls back to a plain, non-clickable text row
362
- * when `sessionEvent` is absent (malformed signal).
346
+ * Orchestration: a worker session reported an outcome. One bar at the
347
+ * conversation's size (`SessionLine`): the sidebar's status dot (its color
348
+ * is the outcome, so there is no verb on screen), the title, the report's
349
+ * excerpt, then the run's duration and turns in their fixed slots, the open
350
+ * button, the caret. Opened, the report shows in full, rendered as markdown,
351
+ * with the rest of the run's receipt under it. Under its conversation's
352
+ * header the bar reads its time instead of the title. Where the session ran
353
+ * is the group's to say (its project and worktree sections). Falls back to a
354
+ * plain text row when `sessionEvent` is absent (malformed signal).
363
355
  */
364
356
  const SessionEventRow = memo(({ event, onOpenSession, className, style }) => {
365
- const labels = useChatLabels();
366
357
  const { SessionTitle } = useTranscriptRenderers();
358
+ const scope = useSessionEventScope();
359
+ const icons = useRowIcons();
360
+ const [open, setOpen] = useRowUiState(useRowPartKey("session-event"), false);
361
+ const mounted = useStaysMounted(open);
367
362
  const id = useId();
368
363
  if (!event.sessionEvent) return /* @__PURE__ */ jsxs("div", {
369
364
  className: ["flex items-start gap-2 text-xs", className].filter(Boolean).join(" "),
@@ -378,68 +373,70 @@ const SessionEventRow = memo(({ event, onOpenSession, className, style }) => {
378
373
  })]
379
374
  });
380
375
  const sessionEvent = event.sessionEvent;
381
- const { tone, verb } = SESSION_EVENT_STATUS_STYLE[sessionEvent.status];
382
- const verbColor = SESSION_EVENT_VERB_COLOR[tone];
383
- const needsAttention = sessionEvent.status === "needs-attention";
384
- const dir = sessionDirLabel(sessionEvent.cwd);
385
- const receipt = sessionEventMeta(sessionEvent).slice(dir ? 1 : 0);
386
- const excerpt = sessionEventExcerpt(sessionEvent);
387
- return /* @__PURE__ */ jsx("button", {
388
- type: "button",
389
- onClick: onOpenSession ? () => onOpenSession(sessionEvent.sessionId) : void 0,
390
- disabled: !onOpenSession,
391
- "aria-labelledby": `${id}-title ${id}-verb${needsAttention && onOpenSession ? ` ${id}-answer` : ""}`,
392
- className: [`group zg-disclosure zg-press-subtle flex items-start w-full py-1 text-left ${onOpenSession ? "cursor-pointer" : "cursor-default"}`, className].filter(Boolean).join(" "),
376
+ const { sessionId } = sessionEvent;
377
+ const report = sessionEventReport(sessionEvent);
378
+ const receipt = [
379
+ ...sessionEvent.tokens !== void 0 ? [`${formatTokenCount(sessionEvent.tokens)} tok`] : [],
380
+ ...sessionEvent.costUsd !== void 0 ? [fmtCost(sessionEvent.costUsd)] : [],
381
+ shortSessionId(sessionId)
382
+ ];
383
+ return /* @__PURE__ */ jsxs("div", {
384
+ className,
393
385
  style,
394
- children: /* @__PURE__ */ jsxs("div", {
395
- className: "min-w-0 flex-1",
396
- children: [/* @__PURE__ */ jsxs("div", {
397
- className: "flex items-baseline gap-x-2 min-w-0 text-xs",
398
- children: [
399
- /* @__PURE__ */ jsx("span", {
400
- id: `${id}-title`,
401
- className: "shrink-0 max-w-[60%] truncate text-zg-body leading-zg-chat font-medium text-[var(--zg-text)]",
402
- children: /* @__PURE__ */ jsx(SessionTitle, {
403
- id: sessionEvent.sessionId,
404
- fallback: sessionEvent.title,
405
- plain: true
406
- })
407
- }),
408
- /* @__PURE__ */ jsx("span", {
409
- id: `${id}-verb`,
410
- className: `shrink-0 ${verbColor}`,
411
- children: verb
412
- }),
413
- dir && /* @__PURE__ */ jsxs("span", {
414
- className: "zg-meta-chip shrink-0 self-center gap-1 text-zg-meta text-zg-text/80",
415
- children: [/* @__PURE__ */ jsx("span", {
416
- "aria-hidden": true,
417
- className: "i-ph-folder text-zg-meta"
418
- }), dir]
419
- }),
420
- /* @__PURE__ */ jsxs("span", {
421
- className: "zg-meta ml-auto min-w-0 overflow-hidden pl-3 self-center flex items-center gap-1 opacity-0 group-hover:opacity-100 group-focus-visible:opacity-100 transition-opacity",
422
- children: [receipt.map((cell) => /* @__PURE__ */ jsx("span", {
423
- className: "zg-meta-chip shrink-0",
386
+ "data-testid": "session-event",
387
+ children: [/* @__PURE__ */ jsx(SessionLine, {
388
+ session: {
389
+ id: sessionId,
390
+ title: sessionEvent.title,
391
+ link: sessionEvent.link
392
+ },
393
+ id,
394
+ open,
395
+ onToggle: () => setOpen((current) => !current),
396
+ lead: icons ? void 0 : /* @__PURE__ */ jsx(StatusDot, {
397
+ state: SESSION_EVENT_DOT[sessionEvent.status],
398
+ className: "self-center"
399
+ }),
400
+ title: scope.conversation ? updateTime(sessionEvent.at) : /* @__PURE__ */ jsx(SessionTitle, {
401
+ id: sessionId,
402
+ fallback: sessionEvent.title,
403
+ plain: true
404
+ }),
405
+ titleIsMeta: scope.conversation,
406
+ spoken: SESSION_EVENT_STATUS_STYLE[sessionEvent.status].verb,
407
+ excerpt: sessionEventExcerpt(sessionEvent),
408
+ durationMs: sessionEvent.durationMs,
409
+ turns: sessionEvent.turns,
410
+ answer: sessionEvent.status === "needs-attention",
411
+ onOpen: onOpenSession ? () => onOpenSession(sessionId) : void 0
412
+ }), /* @__PURE__ */ jsx("div", {
413
+ className: "zg-collapsible",
414
+ "data-open": open,
415
+ id: `${id}-body`,
416
+ inert: !open || void 0,
417
+ children: /* @__PURE__ */ jsx("div", {
418
+ className: "zg-collapsible-inner",
419
+ children: /* @__PURE__ */ jsx("div", {
420
+ className: "pt-1 flex flex-col gap-1.5",
421
+ children: mounted && /* @__PURE__ */ jsxs(Fragment$1, { children: [report.trim() && /* @__PURE__ */ jsx(ProseMarkdown, { children: report }), /* @__PURE__ */ jsx("div", {
422
+ className: "zg-meta flex flex-wrap gap-x-3",
423
+ children: receipt.map((cell, i) => /* @__PURE__ */ jsx("span", {
424
+ className: i === receipt.length - 1 ? "opacity-60" : void 0,
424
425
  children: cell
425
- }, cell)), /* @__PURE__ */ jsx("span", {
426
- className: "zg-meta-chip shrink-0 opacity-60",
427
- children: shortSessionId(sessionEvent.sessionId)
428
- })]
429
- }),
430
- needsAttention && onOpenSession && /* @__PURE__ */ jsx("span", {
431
- id: `${id}-answer`,
432
- className: "zg-meta-chip shrink-0 self-center text-zg-meta text-zg-warn",
433
- children: labels.clickToAnswer
434
- })
435
- ]
436
- }), excerpt && /* @__PURE__ */ jsx("div", {
437
- className: "zg-line-clamp-2 mt-0.5 text-zg-ui leading-zg-ui text-[var(--zg-text-muted)]",
438
- children: excerpt
439
- })]
440
- })
426
+ }, cell))
427
+ })] })
428
+ })
429
+ })
430
+ })]
441
431
  });
442
432
  });
433
+ /** An update's time of day, as its line's name under its conversation's header. */
434
+ function updateTime(at) {
435
+ return new Date(at).toLocaleTimeString(void 0, {
436
+ hour: "numeric",
437
+ minute: "2-digit"
438
+ });
439
+ }
443
440
  /**
444
441
  * The gutter line height of a command-detail row's Dot: a `text-sm` × 1.6
445
442
  * line (22.4px) plus the header button's `py-0.5`. A body-less detail has
@@ -4,13 +4,40 @@
4
4
  */
5
5
  import { RunReceiptCell, RunReceiptSegment } from "zidane/chat/pure";
6
6
  import { StreamEvent } from "zidane/chat";
7
+ import { ThinkingLevel } from "zidane/types";
7
8
  export declare const RUN_RECEIPT_TINT: Record<RunReceiptCell['kind'], string>;
8
9
  export declare const RUN_RECEIPT_SEGMENT_TINT: Record<RunReceiptSegment['kind'], string>;
9
- /** A receipt value (`↻3`, `↑520k`), its leading glyph as an icon. */
10
- export declare function ReceiptValue({ text, className }: {
10
+ /** A receipt value (`↻3`, `↑520k`), its leading glyph as an icon. `label` names the glyph for assistive tech, else it reads the glyph. */
11
+ export declare function ReceiptValue({ text, className, label }: {
11
12
  text: string;
12
13
  className: string;
14
+ label?: string;
13
15
  }): import("react").JSX.Element;
16
+ /** A cell's parts, each tinted by meaning: the token cell's halves, or a model badge's name, effort and fast icon. Spaced by the parent's gap, no other mark. */
17
+ export declare function ReceiptSegments({ segments }: {
18
+ segments: readonly RunReceiptSegment[];
19
+ }): import("react").JSX.Element[];
20
+ /** Props for {@link ModelBadge}. */
21
+ export interface ModelBadgeProps {
22
+ /** Model id, named as the surface's picker names it. */
23
+ model: string;
24
+ /** Provider key, so the name reads as the picker's. */
25
+ providerKey?: string;
26
+ /** The reasoning effort it ran with, absent with thinking off. */
27
+ effort?: ThinkingLevel;
28
+ /** It ran in fast mode. */
29
+ fast?: boolean;
30
+ /** Extra classes on the root element. */
31
+ className?: string;
32
+ }
33
+ /**
34
+ * A model with the effort and fast mode it ran with, as the receipt's model
35
+ * cell draws it (`Opus 4.8 high` and a lightning icon). The subagent header
36
+ * shows it.
37
+ *
38
+ * @param props - Component props.
39
+ */
40
+ export declare function ModelBadge({ model, providerKey, effort, fast, className }: ModelBadgeProps): import("react").JSX.Element;
14
41
  /**
15
42
  * A compaction's facts as one quiet line: the summary call's model, its cost
16
43
  * when priced, and the tokens it sent and received. The compaction card and
@@ -1,6 +1,7 @@
1
+ import { useChatLabels } from "../useChatLabels.js";
1
2
  import { useModelName } from "./actions.js";
2
3
  import { jsx, jsxs } from "react/jsx-runtime";
3
- import { RUN_RECEIPT_SWITCH_GLYPH, RUN_RECEIPT_TURN_GLYPH, formatCostUsd, formatTokenCount } from "zidane/chat/pure";
4
+ import { RUN_RECEIPT_FAST_GLYPH, RUN_RECEIPT_SWITCH_GLYPH, RUN_RECEIPT_TURN_GLYPH, formatCostUsd, formatTokenCount, modelBadgeSegments } from "zidane/chat/pure";
4
5
  // src/chat/transcript/receipt-parts.tsx
5
6
  const RUN_RECEIPT_TINT = {
6
7
  agent: "text-zg-text/80",
@@ -13,16 +14,20 @@ const RUN_RECEIPT_TINT = {
13
14
  };
14
15
  const RUN_RECEIPT_SEGMENT_TINT = {
15
16
  "tokens-in": "zg-soft-tint zg-tint-accent",
16
- "tokens-out": "zg-soft-tint zg-tint-accent-alt"
17
+ "tokens-out": "zg-soft-tint zg-tint-accent-alt",
18
+ "model": RUN_RECEIPT_TINT.model,
19
+ "effort": "text-[var(--zg-text-muted)]",
20
+ "fast": "zg-soft-tint zg-tint-warn"
17
21
  };
18
22
  const RECEIPT_GLYPH_ICON = {
19
23
  [RUN_RECEIPT_TURN_GLYPH]: "i-ph-arrow-clockwise-bold",
20
24
  [RUN_RECEIPT_SWITCH_GLYPH]: "i-ph-arrows-left-right-bold",
21
25
  "↑": "i-ph-arrow-up-bold",
22
- "↓": "i-ph-arrow-down-bold"
26
+ "↓": "i-ph-arrow-down-bold",
27
+ [RUN_RECEIPT_FAST_GLYPH]: "i-ph-lightning-fill"
23
28
  };
24
- /** A receipt value (`↻3`, `↑520k`), its leading glyph as an icon. */
25
- function ReceiptValue({ text, className }) {
29
+ /** A receipt value (`↻3`, `↑520k`), its leading glyph as an icon. `label` names the glyph for assistive tech, else it reads the glyph. */
30
+ function ReceiptValue({ text, className, label }) {
26
31
  const icon = RECEIPT_GLYPH_ICON[text.charAt(0)];
27
32
  if (!icon) return /* @__PURE__ */ jsx("span", {
28
33
  className,
@@ -32,11 +37,39 @@ function ReceiptValue({ text, className }) {
32
37
  className,
33
38
  children: [/* @__PURE__ */ jsx("span", {
34
39
  role: "img",
35
- "aria-label": text.charAt(0),
40
+ "aria-label": label ?? text.charAt(0),
36
41
  className: `${icon} inline-block mr-px text-[0.8em] align-[calc(0.625cap_-_0.5em)]`
37
42
  }), text.slice(1)]
38
43
  });
39
44
  }
45
+ /** A cell's parts, each tinted by meaning: the token cell's halves, or a model badge's name, effort and fast icon. Spaced by the parent's gap, no other mark. */
46
+ function ReceiptSegments({ segments }) {
47
+ const labels = useChatLabels();
48
+ return segments.map((seg, j) => /* @__PURE__ */ jsx(ReceiptValue, {
49
+ text: seg.text,
50
+ className: RUN_RECEIPT_SEGMENT_TINT[seg.kind],
51
+ ...seg.kind === "fast" ? { label: labels.receiptFast } : {}
52
+ }, `${seg.kind}-${j}`));
53
+ }
54
+ /**
55
+ * A model with the effort and fast mode it ran with, as the receipt's model
56
+ * cell draws it (`Opus 4.8 high` and a lightning icon). The subagent header
57
+ * shows it.
58
+ *
59
+ * @param props - Component props.
60
+ */
61
+ function ModelBadge({ model, providerKey, effort, fast, className = "" }) {
62
+ const modelName = useModelName();
63
+ const segments = modelBadgeSegments(modelName(model, providerKey), {
64
+ ...effort ? { effort } : {},
65
+ ...fast ? { fast } : {}
66
+ });
67
+ return /* @__PURE__ */ jsx("span", {
68
+ className: `zg-meta inline-flex items-center gap-1 shrink-0 ${className}`,
69
+ title: model,
70
+ children: /* @__PURE__ */ jsx(ReceiptSegments, { segments })
71
+ });
72
+ }
40
73
  /**
41
74
  * A compaction's facts as one quiet line: the summary call's model, its cost
42
75
  * when priced, and the tokens it sent and received. The compaction card and
@@ -84,4 +117,4 @@ function CompactMeta({ meta, className = "" }) {
84
117
  ]
85
118
  });
86
119
  }
87
- export { CompactMeta, RUN_RECEIPT_SEGMENT_TINT, RUN_RECEIPT_TINT, ReceiptValue };
120
+ export { CompactMeta, ModelBadge, RUN_RECEIPT_SEGMENT_TINT, RUN_RECEIPT_TINT, ReceiptSegments, ReceiptValue };
@@ -79,6 +79,9 @@ function estimateRowPx(row) {
79
79
  case "message-group":
80
80
  px = (row.messages.length > 0 ? 35 : 0) + (row.live ? row.messages.slice(-2).reduce((n, m) => n + (m.kind === "markdown" ? 8 + estimateTextPx(m.text, 400) : 0), 0) : 0) + row.between.reduce((n, r) => n + rowEstimatePx(r), 0) + (row.current.kind === "markdown" ? 12 + estimateTextPx(row.current.text, 400) : 35);
81
81
  break;
82
+ case "session-event-group":
83
+ px = 35;
84
+ break;
82
85
  case "exchange-fold":
83
86
  px = 35 + (row.live ? Math.min(3, row.stats.tools + row.stats.thoughts + row.stats.subagents) * 30 : 0);
84
87
  break;
@@ -99,7 +102,7 @@ function estimateRowPx(row) {
99
102
  px = 34;
100
103
  break;
101
104
  case "session-event":
102
- px = row.sessionEvent ? 80 : 26;
105
+ px = row.sessionEvent ? 35 : 26;
103
106
  break;
104
107
  default: px = 26;
105
108
  }
@@ -3,7 +3,7 @@ import { useStaysMounted } from "../../motion/collapse.js";
3
3
  import { useChatLabels } from "../useChatLabels.js";
4
4
  import { useModelName } from "./actions.js";
5
5
  import { Caret } from "./frame.js";
6
- import { CompactMeta, RUN_RECEIPT_SEGMENT_TINT, RUN_RECEIPT_TINT, ReceiptValue } from "./receipt-parts.js";
6
+ import { CompactMeta, RUN_RECEIPT_TINT, ReceiptSegments, ReceiptValue } from "./receipt-parts.js";
7
7
  import { useTranscriptRenderers } from "./renderers.js";
8
8
  import { useRowPartKey, useRowUiState } from "./row-ui-state.js";
9
9
  import { memo } from "react";
@@ -52,10 +52,7 @@ function RunReceiptInline({ receipt, className = "", style }) {
52
52
  children: /* @__PURE__ */ jsx("span", {
53
53
  className: "zg-meta-chip shrink-0 gap-1 cursor-default",
54
54
  "data-cell": cell.kind,
55
- children: cell.segments ? cell.segments.map((seg, j) => /* @__PURE__ */ jsx(ReceiptValue, {
56
- text: seg.text,
57
- className: RUN_RECEIPT_SEGMENT_TINT[seg.kind]
58
- }, `${seg.kind}-${j}`)) : /* @__PURE__ */ jsx(ReceiptValue, {
55
+ children: cell.segments ? /* @__PURE__ */ jsx(ReceiptSegments, { segments: cell.segments }) : /* @__PURE__ */ jsx(ReceiptValue, {
59
56
  text: cell.text,
60
57
  className: RUN_RECEIPT_TINT[cell.kind]
61
58
  })
@@ -1,5 +1,5 @@
1
1
  /** What a Codemode script's input panel reads besides its input. Internal to the transcript. */
2
- import { gz as ScriptProgress } from "../../dist/index-Bsp5Ku7r.js";
2
+ import { vz as ScriptProgress } from "../../dist/index-BsoTsm0E.js";
3
3
  import { ToolRowModel } from "../headless/transcript/rows.js";
4
4
  import "../headless/transcript/index.js";
5
5
  /**
@@ -0,0 +1,21 @@
1
+ import { Cluster, Row } from "../headless/transcript/rows.js";
2
+ import "../headless/transcript/index.js";
3
+ type GroupRow = Extract<Row, {
4
+ kind: 'session-event-group';
5
+ }>;
6
+ /** Props for {@link SessionEventGroupRow}. */
7
+ export interface SessionEventGroupRowProps {
8
+ /** The group. */
9
+ row: GroupRow;
10
+ /** Renders clusters with the transcript's row components, for what the group holds. */
11
+ renderRows: (c: readonly Cluster[]) => React.ReactNode[];
12
+ /** Opens a session by its id on the transcript's host. Absent: no open button, no Open row. */
13
+ onOpenSession?: ((sessionId: string) => void) | undefined;
14
+ /** Extra classes on the root element. */
15
+ className?: string;
16
+ /** Inline styles on the root element, merged after the component's own. */
17
+ style?: React.CSSProperties;
18
+ }
19
+ /** Renders a group of updates from other sessions at any of its levels: its header line, and its rows when open. */
20
+ export declare const SessionEventGroupRow: import("react").MemoExoticComponent<({ row, renderRows, onOpenSession, className, style }: SessionEventGroupRowProps) => import("react").JSX.Element>;
21
+ export {};