@workerdeck/ui 1.2.0 → 1.3.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.
Files changed (43) hide show
  1. package/README.md +4 -0
  2. package/build/{SessionPanel-yNO60Tzw.d.mts → SessionPanel-BSwUJDwg.d.mts} +3 -8
  3. package/build/{SessionPanel-DVhnUwXw.mjs → SessionPanel-DQp2oStr.mjs} +384 -277
  4. package/build/SessionPanel-DQp2oStr.mjs.map +1 -0
  5. package/build/{format-C4h4jZL_.d.mts → format-TVRJzYUj.d.mts} +1 -9
  6. package/build/format.d.mts +1 -6
  7. package/build/format.mjs +1 -1
  8. package/build/index.d.mts +35 -10
  9. package/build/index.mjs +38 -12
  10. package/build/index.mjs.map +1 -1
  11. package/build/scoped.css +7 -0
  12. package/build/{status-BW2xj79g.mjs → status-C4TAgVSc.mjs} +1 -14
  13. package/build/status-C4TAgVSc.mjs.map +1 -0
  14. package/build/workspace.d.mts +3 -2
  15. package/build/workspace.mjs +4 -3
  16. package/build/workspace.mjs.map +1 -1
  17. package/package.json +4 -4
  18. package/src/components/agent/Composer.tsx +2 -4
  19. package/src/components/agent/ContextDialog.tsx +17 -2
  20. package/src/components/agent/ContextRing.tsx +36 -7
  21. package/src/components/agent/EntryIcon.tsx +2 -4
  22. package/src/components/agent/McpDialog.tsx +2 -0
  23. package/src/components/agent/SessionItem.tsx +1 -1
  24. package/src/components/agent/SessionPanel.tsx +198 -186
  25. package/src/components/agent/SessionWorkspace.tsx +3 -0
  26. package/src/components/agent/StatusBar.tsx +12 -4
  27. package/src/components/agent/ToolCallCard.tsx +6 -1
  28. package/src/components/agent/TranscriptItemView.tsx +1 -6
  29. package/src/components/agent/TranscriptRows.tsx +4 -6
  30. package/src/components/agent/held-sends.tsx +73 -0
  31. package/src/components/agent/tool-titles.tsx +12 -0
  32. package/src/components/agent/use-subagent-frame.ts +8 -10
  33. package/src/components/agent/use-transcript-jumps.ts +7 -9
  34. package/src/components/terminal/TerminalTranscript.tsx +12 -1
  35. package/src/components/terminal/height.ts +0 -2
  36. package/src/components/terminal/items.tsx +5 -7
  37. package/src/index.ts +2 -0
  38. package/src/lib/context-note.ts +24 -0
  39. package/src/lib/css.ts +3 -5
  40. package/src/lib/format.ts +1 -8
  41. package/src/lib/status.ts +3 -5
  42. package/build/SessionPanel-DVhnUwXw.mjs.map +0 -1
  43. package/build/status-BW2xj79g.mjs.map +0 -1
@@ -1,12 +1,4 @@
1
1
  //#region src/lib/format.d.ts
2
- /**
3
- * The whole payload of a `compaction` row. The wire event carries no summary because codex's
4
- * `contextCompaction` item carries none, so the sentence *is* the content.
5
- *
6
- * It lives here, in a pure module, because the renderer (`terminal/items.tsx`) and the height book
7
- * (`terminal/height.ts`) must measure and draw the same string — height.ts cannot import the
8
- * `.tsx` without pulling React into a module the tests require to stay pure.
9
- */
10
2
  declare const COMPACTION_TEXT = "context compacted · earlier turns summarised to fit the window";
11
3
  declare function formatCost(usd: number | undefined): string;
12
4
  declare function formatDuration(ms: number): string;
@@ -22,4 +14,4 @@ declare function toolInputPreview(input: unknown, max?: number): string;
22
14
  declare function friendlyModel(id: string | undefined): string | undefined;
23
15
  //#endregion
24
16
  export { formatCountdown as a, formatRateLimitWindowLong as c, friendlyModel as d, rateLimitWindowSeconds as f, formatCost as i, formatRelativeTime as l, formatAgoPrecise as n, formatDuration as o, toolInputPreview as p, formatBytes as r, formatRateLimitWindow as s, COMPACTION_TEXT as t, formatTokens as u };
25
- //# sourceMappingURL=format-C4h4jZL_.d.mts.map
17
+ //# sourceMappingURL=format-TVRJzYUj.d.mts.map
@@ -1,4 +1,4 @@
1
- import { a as formatCountdown, c as formatRateLimitWindowLong, d as friendlyModel, f as rateLimitWindowSeconds, i as formatCost, l as formatRelativeTime, n as formatAgoPrecise, o as formatDuration, p as toolInputPreview, r as formatBytes, s as formatRateLimitWindow, t as COMPACTION_TEXT, u as formatTokens } from "./format-C4h4jZL_.mjs";
1
+ import { a as formatCountdown, c as formatRateLimitWindowLong, d as friendlyModel, f as rateLimitWindowSeconds, i as formatCost, l as formatRelativeTime, n as formatAgoPrecise, o as formatDuration, p as toolInputPreview, r as formatBytes, s as formatRateLimitWindow, t as COMPACTION_TEXT, u as formatTokens } from "./format-TVRJzYUj.mjs";
2
2
  import { ModelOption, RateLimitInfo, SessionStatus } from "@workerdeck/protocol";
3
3
  //#region src/lib/status.d.ts
4
4
  type StatusSeverity = 'none' | 'warning' | 'error';
@@ -33,11 +33,6 @@ declare function contextSeverity(usage: {
33
33
  percentage: number;
34
34
  } | undefined): StatusSeverity;
35
35
  declare function meterColorClass(pct: number | undefined): string;
36
- /**
37
- * The fill colour for a meter bar. Deliberately a different ramp from
38
- * {@link meterColorClass}: a bar reads as alarming later than a number does, so the tint
39
- * turns at 70/90 where the text severity turns at 80/95.
40
- */
41
36
  declare function meterTintClass(pct: number): string;
42
37
  //#endregion
43
38
  export { COMPACTION_TEXT, ModelReadings, StatusPresentation, StatusReadings, StatusSeverity, UsageLane, contextSeverity, currentModel, formatAgoPrecise, formatBytes, formatCost, formatCountdown, formatDuration, formatRateLimitWindow, formatRateLimitWindowLong, formatRelativeTime, formatTokens, friendlyModel, meterColorClass, meterSeverity, meterTintClass, modelLabel, rateLimitWindowSeconds, statusPresentation, tightestWindow, toolInputPreview, usageWindow, windowLabel };
package/build/format.mjs CHANGED
@@ -1,2 +1,2 @@
1
- import { C as toolInputPreview, S as rateLimitWindowSeconds, _ as formatRateLimitWindow, a as meterTintClass, b as formatTokens, c as tightestWindow, d as COMPACTION_TEXT, f as formatAgoPrecise, g as formatDuration, h as formatCountdown, i as meterSeverity, l as usageWindow, m as formatCost, n as currentModel, o as modelLabel, p as formatBytes, r as meterColorClass, s as statusPresentation, t as contextSeverity, u as windowLabel, v as formatRateLimitWindowLong, x as friendlyModel, y as formatRelativeTime } from "./status-BW2xj79g.mjs";
1
+ import { C as toolInputPreview, S as rateLimitWindowSeconds, _ as formatRateLimitWindow, a as meterTintClass, b as formatTokens, c as tightestWindow, d as COMPACTION_TEXT, f as formatAgoPrecise, g as formatDuration, h as formatCountdown, i as meterSeverity, l as usageWindow, m as formatCost, n as currentModel, o as modelLabel, p as formatBytes, r as meterColorClass, s as statusPresentation, t as contextSeverity, u as windowLabel, v as formatRateLimitWindowLong, x as friendlyModel, y as formatRelativeTime } from "./status-C4TAgVSc.mjs";
2
2
  export { COMPACTION_TEXT, contextSeverity, currentModel, formatAgoPrecise, formatBytes, formatCost, formatCountdown, formatDuration, formatRateLimitWindow, formatRateLimitWindowLong, formatRelativeTime, formatTokens, friendlyModel, meterColorClass, meterSeverity, meterTintClass, modelLabel, rateLimitWindowSeconds, statusPresentation, tightestWindow, toolInputPreview, usageWindow, windowLabel };
package/build/index.d.mts CHANGED
@@ -1,5 +1,5 @@
1
- import { a as formatCountdown, c as formatRateLimitWindowLong, d as friendlyModel, f as rateLimitWindowSeconds, i as formatCost, l as formatRelativeTime, n as formatAgoPrecise, o as formatDuration, p as toolInputPreview, r as formatBytes, s as formatRateLimitWindow, u as formatTokens } from "./format-C4h4jZL_.mjs";
2
- import { C as permissionModeChoices, S as PermissionModeSelectProps, _ as useAffordances, a as SessionVitals, b as PermissionModeMeta, c as TranscriptDensityProvider, d as TranscriptVariantProvider, f as useTranscriptDensity, g as WithActions, h as TerminalAffordances, i as SessionSurfacePanel, l as TranscriptFont, m as CopyAction, n as SessionPanel, o as TerminalMetrics, p as useTranscriptVariant, r as SessionPanelProps, s as TranscriptDensity, t as SessionControls, u as TranscriptVariant, v as PERMISSION_MODES, w as permissionModeMeta, x as PermissionModeSelect, y as PermissionModeChoice } from "./SessionPanel-yNO60Tzw.mjs";
1
+ import { a as formatCountdown, c as formatRateLimitWindowLong, d as friendlyModel, f as rateLimitWindowSeconds, i as formatCost, l as formatRelativeTime, n as formatAgoPrecise, o as formatDuration, p as toolInputPreview, r as formatBytes, s as formatRateLimitWindow, u as formatTokens } from "./format-TVRJzYUj.mjs";
2
+ import { C as permissionModeChoices, S as PermissionModeSelectProps, _ as useAffordances, a as SessionVitals, b as PermissionModeMeta, c as TranscriptDensityProvider, d as TranscriptVariantProvider, f as useTranscriptDensity, g as WithActions, h as TerminalAffordances, i as SessionSurfacePanel, l as TranscriptFont, m as CopyAction, n as SessionPanel, o as TerminalMetrics, p as useTranscriptVariant, r as SessionPanelProps, s as TranscriptDensity, t as SessionControls, u as TranscriptVariant, v as PERMISSION_MODES, w as permissionModeMeta, x as PermissionModeSelect, y as PermissionModeChoice } from "./SessionPanel-BSwUJDwg.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";
@@ -15,7 +15,7 @@ import { ConnectionState, TranscriptItem, TranscriptState, UseAttachmentsResult
15
15
  import { WorkerDeckClient } from "@workerdeck/client";
16
16
  //#region src/components/ui/Button.d.ts
17
17
  declare const buttonVariants: (props?: ({
18
- variant?: "default" | "link" | "outline" | "secondary" | "ghost" | "destructive" | null | undefined;
18
+ variant?: "default" | "outline" | "secondary" | "ghost" | "destructive" | "link" | null | undefined;
19
19
  size?: "default" | "xs" | "sm" | "lg" | "icon" | "icon-sm" | null | undefined;
20
20
  } & import("class-variance-authority/types").ClassProp) | undefined) => string;
21
21
  interface ButtonProps extends ButtonHTMLAttributes<HTMLButtonElement>, VariantProps<typeof buttonVariants> {}
@@ -825,6 +825,33 @@ interface ToolCallCardProps {
825
825
  }
826
826
  declare function ToolCallCard({ item, hostImage, className }: ToolCallCardProps): import("react").JSX.Element;
827
827
  //#endregion
828
+ //#region src/components/agent/tool-titles.d.ts
829
+ declare function ToolTitleProvider({ value, children }: {
830
+ value: Record<string, string> | undefined;
831
+ children: ReactNode;
832
+ }): import("react").JSX.Element;
833
+ declare function useToolTitle(name: string): string | undefined;
834
+ //#endregion
835
+ //#region src/components/agent/held-sends.d.ts
836
+ type HeldSend = {
837
+ text: string;
838
+ attachmentIds: string[];
839
+ };
840
+ type HeldSends = {
841
+ held: HeldSend[];
842
+ submit: (text: string, attachmentIds: string[]) => void;
843
+ flush: () => void;
844
+ };
845
+ declare function useHeldSends(options: {
846
+ hold: boolean;
847
+ busy: boolean;
848
+ send: (text: string, attachmentIds: string[]) => void;
849
+ }): HeldSends;
850
+ declare function HeldSendsBar({ held, onSendNow }: {
851
+ held: HeldSend[];
852
+ onSendNow: () => void;
853
+ }): import("react").JSX.Element | null;
854
+ //#endregion
828
855
  //#region src/components/agent/FileCard.d.ts
829
856
  type FileDeliveredItem = Extract<TranscriptItem, {
830
857
  kind: 'file_delivered';
@@ -887,10 +914,6 @@ interface ComposerProps {
887
914
  fontSize?: number;
888
915
  lineHeight?: number;
889
916
  affordances?: TerminalAffordances | boolean;
890
- /**
891
- * Where unsent text is remembered between mounts. The composer is remounted on every session switch, so without
892
- * this a half-written prompt dies with the switch. Omit to keep the composer stateless across mounts.
893
- */
894
917
  draft?: {
895
918
  initialText: string;
896
919
  save: (text: string) => void;
@@ -933,11 +956,12 @@ declare function StatusBar({ state, rateLimits, connected, connection, onOpenSta
933
956
  //#region src/components/agent/ContextDialog.d.ts
934
957
  interface ContextDialogProps {
935
958
  usage?: ContextUsage;
959
+ engine?: ProfileEngine;
936
960
  open: boolean;
937
961
  onOpenChange: (open: boolean) => void;
938
962
  className?: string;
939
963
  }
940
- declare function ContextDialog({ usage, open, onOpenChange, className }: ContextDialogProps): import("react").JSX.Element;
964
+ declare function ContextDialog({ usage, engine, open, onOpenChange, className }: ContextDialogProps): import("react").JSX.Element;
941
965
  //#endregion
942
966
  //#region src/components/agent/UsageDialog.d.ts
943
967
  interface UsageDialogProps {
@@ -1148,8 +1172,9 @@ declare const STATUS_META: Record<SessionStatus, {
1148
1172
  }>;
1149
1173
  //#endregion
1150
1174
  //#region src/components/agent/ContextRing.d.ts
1151
- declare function ContextRing({ usage, size, className }: {
1175
+ declare function ContextRing({ usage, engine, size, className }: {
1152
1176
  usage: ContextReading | undefined;
1177
+ engine?: ProfileEngine;
1153
1178
  size?: number;
1154
1179
  className?: string;
1155
1180
  }): import("react").JSX.Element | null;
@@ -1164,5 +1189,5 @@ declare function copyText(value: string): Promise<boolean>;
1164
1189
  declare function toolIcon(toolName: string): LucideIcon;
1165
1190
  declare function isMutatingTool(toolName: string): boolean;
1166
1191
  //#endregion
1167
- export { AlertDialog, AlertDialogClose, AlertDialogContent, AlertDialogDescription, AlertDialogTitle, AlertDialogTrigger, Badge, type BadgeProps, Band, Blank, Button, type ButtonProps, Card, CardContent, CardHeader, CardTitle, type ChipSegment, CodeBlock, type CodeBlockProps, Composer, type ComposerFileMatch, type ComposerHandle, type ComposerProps, 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, HostFilesDialog, type HostFilesDialogProps, Ink, Input, Loader, McpDialog, type McpDialogProps, Menu, MenuContent, MenuItem, MenuSeparator, MenuTrigger, Message, MessageContent, type MessageProps, ModelSelect, type ModelSelectProps, PERMISSION_MODES, type PermissionModeChoice, type PermissionModeMeta, PermissionModeSelect, type PermissionModeSelectProps, PermissionPrompt, type PermissionPromptProps, ProgressRing, type ProgressRingProps, ProjectIcon, PromptArea, type PromptAreaHandle, type PromptAreaProps, PromptTokenText, QUESTION_BEHAVIORS, type QuestionBehaviorMeta, QuestionPrompt, type QuestionPromptProps, Reasoning, type ReasoningProps, Response, type ResponseProps, Row, type RowProps, STATUS_META, type Segment, Select, SelectContent, SelectItem, SelectItemText, SelectTrigger, SelectValue, SessionBrowser, type SessionBrowserProps, type SessionControls, SessionEmptyState, type SessionEmptyStateProps, SessionInfoDialog, type SessionInfoDialogProps, SessionItem, type SessionItemProps, SessionList, SessionListItem, type SessionListItemProps, type SessionListProps, SessionPanel, type SessionPanelProps, SessionStatusIcon, type SessionSurfacePanel, type SessionVitals, SkillsDialog, type SkillsDialogProps, Spinner, Splitter, type SplitterProps, StatusBar, type StatusBarProps, type Step, StepRow, StepToggle, SubagentStrip, 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, 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, mentionTrigger, parseUserQuestions, permissionModeChoices, permissionModeMeta, plainTextToSegments, previewPatch, rateLimitWindowSeconds, rowShapeClass, runningSteps, segmentsToPlainText, sessionSteps, skillPrompt, toast, toolIcon, toolInputPreview, useAffordances, useMinuteClock, usePromptAreaState, useTranscriptDensity, useTranscriptVariant, vendorMarkClass, vendorTextClass };
1192
+ export { AlertDialog, AlertDialogClose, AlertDialogContent, AlertDialogDescription, AlertDialogTitle, AlertDialogTrigger, Badge, type BadgeProps, Band, Blank, Button, type ButtonProps, Card, CardContent, CardHeader, CardTitle, type ChipSegment, CodeBlock, type CodeBlockProps, Composer, type ComposerFileMatch, type ComposerHandle, type ComposerProps, 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 HeldSend, type HeldSends, HeldSendsBar, HostFilesDialog, type HostFilesDialogProps, Ink, Input, Loader, McpDialog, type McpDialogProps, Menu, MenuContent, MenuItem, MenuSeparator, MenuTrigger, Message, MessageContent, type MessageProps, ModelSelect, type ModelSelectProps, PERMISSION_MODES, type PermissionModeChoice, type PermissionModeMeta, PermissionModeSelect, type PermissionModeSelectProps, PermissionPrompt, type PermissionPromptProps, ProgressRing, type ProgressRingProps, ProjectIcon, PromptArea, type PromptAreaHandle, type PromptAreaProps, PromptTokenText, QUESTION_BEHAVIORS, type QuestionBehaviorMeta, QuestionPrompt, type QuestionPromptProps, Reasoning, type ReasoningProps, Response, type ResponseProps, Row, type RowProps, STATUS_META, type Segment, Select, SelectContent, SelectItem, SelectItemText, SelectTrigger, SelectValue, SessionBrowser, type SessionBrowserProps, type SessionControls, SessionEmptyState, type SessionEmptyStateProps, SessionInfoDialog, type SessionInfoDialogProps, SessionItem, type SessionItemProps, SessionList, SessionListItem, type SessionListItemProps, type SessionListProps, SessionPanel, type SessionPanelProps, SessionStatusIcon, type SessionSurfacePanel, type SessionVitals, SkillsDialog, type SkillsDialogProps, Spinner, Splitter, type SplitterProps, StatusBar, type StatusBarProps, type Step, StepRow, StepToggle, SubagentStrip, 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, mentionTrigger, parseUserQuestions, permissionModeChoices, permissionModeMeta, plainTextToSegments, previewPatch, rateLimitWindowSeconds, rowShapeClass, runningSteps, segmentsToPlainText, sessionSteps, skillPrompt, toast, toolIcon, toolInputPreview, useAffordances, useHeldSends, useMinuteClock, usePromptAreaState, useToolTitle, useTranscriptDensity, useTranscriptVariant, vendorMarkClass, vendorTextClass };
1168
1193
  //# sourceMappingURL=index.d.mts.map
package/build/index.mjs CHANGED
@@ -1,5 +1,5 @@
1
- import { $ as isMutatingTool, A as PERMISSION_MODES, At as MenuItem, B as Composer, Bt as Input, C as TerminalPermissionPrompt, Ct as DialogClose, D as SubagentStrip, Dt as DialogTrigger, E as parseUserQuestions, Et as DialogRow, F as SkillsDialog, Ft as SelectItem, G as previewPatch, Gt as cn, H as TerminalSurface, Ht as badgeVariants, I as McpDialog, It as SelectItemText, J as Ink, K as Band, L as HostFilesDialog, Lt as SelectTrigger, M as permissionModeChoices, Mt as MenuTrigger, N as permissionModeMeta, Nt as Select, O as PermissionPrompt, Ot as Menu, P as ModelSelect, Pt as SelectContent, Q as useAffordances, Rt as SelectValue, S as TerminalQuestionPrompt, St as DialogBody, T as QuestionPrompt, Tt as DialogHeader, U as TerminalMarkdown, Ut as Button, V as skillPrompt, Vt as Badge, W as TerminalDiff, Wt as buttonVariants, X as CopyAction, Y as Row, Z as WithActions, _ as ConversationContent, _t as copyText, a as Transcript, at as commandTrigger, b as STATUS_META, bt as TooltipProvider, c as PromptTokenText, ct as usePromptAreaState, d as FileCard, dt as segmentsToPlainText, et as toolIcon, f as TerminalItemView, ft as ProgressRing, g as Conversation, gt as CopyButton, h as Loader, ht as Spinner, i as useMinuteClock, it as useTranscriptVariant, j as PermissionModeSelect, jt as MenuSeparator, k as Response, kt as MenuContent, l as Message, lt as PromptArea, m as SessionEmptyState, mt as CodeBlock, n as UsageDialog, nt as TranscriptVariantProvider, o as ToolCallCard, ot as hashtagTrigger, p as TerminalTranscript, pt as Splitter, q as Blank, r as UsageMeters, rt as useTranscriptDensity, s as Reasoning, st as mentionTrigger, t as SessionPanel, tt as TranscriptDensityProvider, u as MessageContent, ut as plainTextToSegments, v as ConversationScrollButton, vt as Tip, w as QUESTION_BEHAVIORS, wt as DialogContent, x as SessionInfoDialog, xt as Dialog, y as StatusBar, yt as TooltipContent, z as ContextDialog, zt as PortalScope } from "./SessionPanel-DVhnUwXw.mjs";
2
- import { C as toolInputPreview, S as rateLimitWindowSeconds, _ as formatRateLimitWindow, b as formatTokens, c as tightestWindow, f as formatAgoPrecise, g as formatDuration, h as formatCountdown, i as meterSeverity, m as formatCost, o as modelLabel, p as formatBytes, r as meterColorClass, s as statusPresentation, t as contextSeverity, u as windowLabel, v as formatRateLimitWindowLong, x as friendlyModel, y as formatRelativeTime } from "./status-BW2xj79g.mjs";
1
+ import { $ as Ink, A as PermissionPrompt, At as DialogHeader, Bt as SelectItem, C as SessionInfoDialog, Ct as Tip, D as QuestionPrompt, Dt as DialogBody, E as QUESTION_BEHAVIORS, Et as Dialog, F as permissionModeMeta, Ft as MenuItem, G as TerminalSurface, Gt as Input, H as contextNote, Ht as SelectTrigger, I as ModelSelect, It as MenuSeparator, J as TerminalMarkdown, Jt as Button, K as ToolTitleProvider, Kt as Badge, L as SkillsDialog, Lt as MenuTrigger, M as PERMISSION_MODES, Mt as DialogTrigger, N as PermissionModeSelect, Nt as Menu, O as parseUserQuestions, Ot as DialogClose, P as permissionModeChoices, Pt as MenuContent, Q as Blank, R as McpDialog, Rt as Select, S as STATUS_META, St as copyText, T as TerminalPermissionPrompt, Tt as TooltipProvider, U as Composer, Ut as SelectValue, V as ContextDialog, Vt as SelectItemText, W as skillPrompt, Wt as PortalScope, X as previewPatch, Xt as cn, Y as TerminalDiff, Yt as buttonVariants, Z as Band, _ as Loader, _t as ProgressRing, a as HeldSendsBar, at as toolIcon, b as ConversationScrollButton, bt as Spinner, c as ToolCallCard, ct as useTranscriptDensity, d as Message, dt as hashtagTrigger, et as Row, f as MessageContent, ft as mentionTrigger, g as SessionEmptyState, gt as segmentsToPlainText, h as TerminalTranscript, ht as plainTextToSegments, i as useMinuteClock, it as isMutatingTool, j as Response, jt as DialogRow, k as SubagentStrip, kt as DialogContent, l as Reasoning, lt as useTranscriptVariant, m as TerminalItemView, mt as PromptArea, n as UsageDialog, nt as WithActions, o as useHeldSends, ot as TranscriptDensityProvider, p as FileCard, pt as usePromptAreaState, q as useToolTitle, qt as badgeVariants, r as UsageMeters, rt as useAffordances, s as Transcript, st as TranscriptVariantProvider, t as SessionPanel, tt as CopyAction, u as PromptTokenText, ut as commandTrigger, v as Conversation, vt as Splitter, w as TerminalQuestionPrompt, wt as TooltipContent, x as StatusBar, xt as CopyButton, y as ConversationContent, yt as CodeBlock, z as HostFilesDialog, zt as SelectContent } from "./SessionPanel-DQp2oStr.mjs";
2
+ import { C as toolInputPreview, S as rateLimitWindowSeconds, _ as formatRateLimitWindow, b as formatTokens, c as tightestWindow, f as formatAgoPrecise, g as formatDuration, h as formatCountdown, i as meterSeverity, m as formatCost, o as modelLabel, p as formatBytes, r as meterColorClass, s as statusPresentation, t as contextSeverity, u as windowLabel, v as formatRateLimitWindowLong, x as friendlyModel, y as formatRelativeTime } from "./status-C4TAgVSc.mjs";
3
3
  import { Fragment, forwardRef, useEffect, useMemo, useRef, useState } from "react";
4
4
  import { Fragment as Fragment$1, jsx, jsxs } from "react/jsx-runtime";
5
5
  import { Anchor, ArrowRight, Atom, Beaker, BellRing, Bike, Binary, Blocks, Bot, Box, Brain, Briefcase, Brush, Bug, Building2, Cable, Camera, Car, Cat, Check, ChevronDown, ChevronRight, CircleAlert, CircleSlash, CircuitBoard, Cloud, Code, Coffee, Cog, Compass, Container, Cpu, CreditCard, Database, Diamond, Dog, Dot, Eraser, Feather, Film, Flame, FlaskConical, Folder, Gamepad2, Gauge, Gem, Ghost, Gift, GitBranch, Globe, GraduationCap, Hammer, Hexagon, House, Image, Key, Landmark, Laptop, Layers, Leaf, Library, Lightbulb, Lock, Mail, Map as Map$1, MessageCircle, Mic, Monitor, Moon, Mountain, Music, Network, Newspaper, Notebook, Orbit, Package, Palette, PauseCircle, PenTool, Pencil, Phone, PiggyBank, Plane, Plug, Puzzle, Radar, Radio, Receipt, Rocket, Ruler, Satellite, Scale, Scissors, Search, SearchX, Server, Shield, Ship, ShoppingCart, Signal, Smartphone, Sparkles, Sprout, Square, Star, Sun, Table, Tag, Target, Telescope, Terminal, TestTube, Trash2, TreePine, Trophy, Truck, Umbrella, Users, Wallet, Wand, Waves, Webhook, Wifi, Wrench, X, Zap } from "lucide-react";
@@ -404,16 +404,41 @@ function ProjectIcon({ icon, src, name, className }) {
404
404
  }
405
405
  //#endregion
406
406
  //#region src/components/agent/ContextRing.tsx
407
- function ContextRing({ usage, size = 11, className }) {
407
+ function ContextRing({ usage, engine, size = 11, className }) {
408
408
  if (usage === void 0) return null;
409
- return /* @__PURE__ */ jsx("span", {
410
- title: `Context ${usage.percentage.toFixed(0)}% · ${formatTokens(usage.totalTokens)} / ${formatTokens(usage.maxTokens)}`,
411
- className: cn("shrink-0 leading-none", meterColorClass(usage.percentage), className),
412
- children: /* @__PURE__ */ jsx(ProgressRing, {
413
- value: usage.percentage,
414
- size,
415
- strokeWidth: 2
416
- })
409
+ const note = contextNote(engine);
410
+ const reading = `Context ${usage.percentage.toFixed(0)}% · ${formatTokens(usage.totalTokens)} / ${formatTokens(usage.maxTokens)}`;
411
+ const shell = cn("shrink-0 leading-none", meterColorClass(usage.percentage), className);
412
+ const ring = /* @__PURE__ */ jsx(ProgressRing, {
413
+ value: usage.percentage,
414
+ size,
415
+ strokeWidth: 2
416
+ });
417
+ if (!note) return /* @__PURE__ */ jsx("span", {
418
+ title: reading,
419
+ className: shell,
420
+ children: ring
421
+ });
422
+ return /* @__PURE__ */ jsx(Tip, {
423
+ render: /* @__PURE__ */ jsx("span", { className: shell }),
424
+ content: /* @__PURE__ */ jsxs("div", {
425
+ className: "flex max-w-64 flex-col gap-1 py-0.5",
426
+ children: [
427
+ /* @__PURE__ */ jsx("span", {
428
+ className: "font-mono text-fg-2",
429
+ children: reading
430
+ }),
431
+ /* @__PURE__ */ jsx("span", {
432
+ className: "text-fg-3",
433
+ children: note.summary
434
+ }),
435
+ /* @__PURE__ */ jsx("span", {
436
+ className: "text-fg-3",
437
+ children: note.hint
438
+ })
439
+ ]
440
+ }),
441
+ children: ring
417
442
  });
418
443
  }
419
444
  //#endregion
@@ -670,6 +695,7 @@ function SessionItem({ row, active = false, activeStepKey, showGateway, showProj
670
695
  }) : null,
671
696
  /* @__PURE__ */ jsx(ContextRing, {
672
697
  usage: info.contextUsage,
698
+ engine,
673
699
  size: 16,
674
700
  className: "p-0.5"
675
701
  })
@@ -1080,6 +1106,6 @@ function OneOfSelect({ label, value, options, onChange }) {
1080
1106
  });
1081
1107
  }
1082
1108
  //#endregion
1083
- 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, HostFilesDialog, Ink, Input, Loader, McpDialog, Menu, MenuContent, MenuItem, MenuSeparator, MenuTrigger, Message, MessageContent, ModelSelect, PERMISSION_MODES, PermissionModeSelect, PermissionPrompt, ProgressRing, ProjectIcon, PromptArea, PromptTokenText, QUESTION_BEHAVIORS, QuestionPrompt, Reasoning, Response, Row, STATUS_META, Select, SelectContent, SelectItem, SelectItemText, SelectTrigger, SelectValue, SessionBrowser, SessionEmptyState, SessionInfoDialog, SessionItem, SessionList, SessionListItem, SessionPanel, SessionStatusIcon, SkillsDialog, Spinner, Splitter, StatusBar, StepRow, StepToggle, SubagentStrip, TerminalDiff, TerminalItemView, TerminalMarkdown, TerminalPermissionPrompt, TerminalQuestionPrompt, TerminalStatusLine, TerminalSurface, TerminalTranscript, Textarea, Tip, Toaster, ToolCallCard, 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, mentionTrigger, parseUserQuestions, permissionModeChoices, permissionModeMeta, plainTextToSegments, previewPatch, rateLimitWindowSeconds, rowShapeClass, runningSteps, segmentsToPlainText, sessionSteps, skillPrompt, toast, toolIcon, toolInputPreview, useAffordances, useMinuteClock, usePromptAreaState, useTranscriptDensity, useTranscriptVariant, vendorMarkClass, vendorTextClass };
1109
+ 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, HeldSendsBar, HostFilesDialog, Ink, Input, Loader, McpDialog, Menu, MenuContent, MenuItem, MenuSeparator, MenuTrigger, Message, MessageContent, ModelSelect, PERMISSION_MODES, PermissionModeSelect, PermissionPrompt, ProgressRing, ProjectIcon, PromptArea, PromptTokenText, QUESTION_BEHAVIORS, QuestionPrompt, Reasoning, Response, Row, STATUS_META, Select, SelectContent, SelectItem, SelectItemText, SelectTrigger, SelectValue, SessionBrowser, SessionEmptyState, SessionInfoDialog, SessionItem, SessionList, SessionListItem, SessionPanel, SessionStatusIcon, SkillsDialog, Spinner, Splitter, StatusBar, StepRow, StepToggle, SubagentStrip, 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, mentionTrigger, parseUserQuestions, permissionModeChoices, permissionModeMeta, plainTextToSegments, previewPatch, rateLimitWindowSeconds, rowShapeClass, runningSteps, segmentsToPlainText, sessionSteps, skillPrompt, toast, toolIcon, toolInputPreview, useAffordances, useHeldSends, useMinuteClock, usePromptAreaState, useToolTitle, useTranscriptDensity, useTranscriptVariant, vendorMarkClass, vendorTextClass };
1084
1110
 
1085
1111
  //# sourceMappingURL=index.mjs.map