@workerdeck/ui 1.1.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.
- package/README.md +4 -0
- package/build/{SessionPanel-yNO60Tzw.d.mts → SessionPanel-BSwUJDwg.d.mts} +3 -8
- package/build/{SessionPanel-I5QSLLb0.mjs → SessionPanel-DQp2oStr.mjs} +409 -267
- package/build/SessionPanel-DQp2oStr.mjs.map +1 -0
- package/build/{format-C_lpFq0l.d.mts → format-TVRJzYUj.d.mts} +3 -2
- package/build/format.d.mts +2 -7
- package/build/format.mjs +2 -2
- package/build/index.d.mts +34 -9
- package/build/index.mjs +38 -12
- package/build/index.mjs.map +1 -1
- package/build/scoped.css +11 -0
- package/build/{status-Dm9INVTt.mjs → status-C4TAgVSc.mjs} +3 -7
- package/build/status-C4TAgVSc.mjs.map +1 -0
- package/build/workspace.d.mts +3 -2
- package/build/workspace.mjs +4 -3
- package/build/workspace.mjs.map +1 -1
- package/package.json +4 -4
- package/src/components/agent/Composer.tsx +2 -4
- package/src/components/agent/ContextDialog.tsx +17 -2
- package/src/components/agent/ContextRing.tsx +36 -7
- package/src/components/agent/EntryIcon.tsx +2 -4
- package/src/components/agent/McpDialog.tsx +2 -0
- package/src/components/agent/SessionItem.tsx +1 -1
- package/src/components/agent/SessionPanel.tsx +198 -186
- package/src/components/agent/SessionWorkspace.tsx +3 -0
- package/src/components/agent/StatusBar.tsx +12 -4
- package/src/components/agent/ToolCallCard.tsx +6 -1
- package/src/components/agent/TranscriptItemView.tsx +15 -2
- package/src/components/agent/TranscriptRows.tsx +4 -6
- package/src/components/agent/held-sends.tsx +73 -0
- package/src/components/agent/tool-titles.tsx +12 -0
- package/src/components/agent/use-subagent-frame.ts +8 -10
- package/src/components/agent/use-transcript-jumps.ts +7 -9
- package/src/components/terminal/TerminalTranscript.tsx +15 -1
- package/src/components/terminal/height.ts +4 -1
- package/src/components/terminal/items.tsx +14 -3
- package/src/index.ts +2 -0
- package/src/lib/context-note.ts +24 -0
- package/src/lib/css.ts +3 -5
- package/src/lib/format.ts +3 -0
- package/src/lib/status.ts +3 -5
- package/build/SessionPanel-I5QSLLb0.mjs.map +0 -1
- package/build/status-Dm9INVTt.mjs.map +0 -1
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
//#region src/lib/format.d.ts
|
|
2
|
+
declare const COMPACTION_TEXT = "context compacted · earlier turns summarised to fit the window";
|
|
2
3
|
declare function formatCost(usd: number | undefined): string;
|
|
3
4
|
declare function formatDuration(ms: number): string;
|
|
4
5
|
declare function formatTokens(tokens: number): string;
|
|
@@ -12,5 +13,5 @@ declare function formatAgoPrecise(epochMs: number, now?: number): string;
|
|
|
12
13
|
declare function toolInputPreview(input: unknown, max?: number): string;
|
|
13
14
|
declare function friendlyModel(id: string | undefined): string | undefined;
|
|
14
15
|
//#endregion
|
|
15
|
-
export {
|
|
16
|
-
//# sourceMappingURL=format-
|
|
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 };
|
|
17
|
+
//# sourceMappingURL=format-TVRJzYUj.d.mts.map
|
package/build/format.d.mts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { a as
|
|
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,12 +33,7 @@ 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
|
-
export { 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 };
|
|
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 };
|
|
44
39
|
//# sourceMappingURL=format.d.mts.map
|
package/build/format.mjs
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import {
|
|
2
|
-
export { contextSeverity, currentModel, formatAgoPrecise, formatBytes, formatCost, formatCountdown, formatDuration, formatRateLimitWindow, formatRateLimitWindowLong, formatRelativeTime, formatTokens, friendlyModel, meterColorClass, meterSeverity, meterTintClass, modelLabel, rateLimitWindowSeconds, statusPresentation, tightestWindow, toolInputPreview, usageWindow, windowLabel };
|
|
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
|
+
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
|
|
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-
|
|
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";
|
|
@@ -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
|
|
2
|
-
import {
|
|
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
|
-
|
|
410
|
-
|
|
411
|
-
|
|
412
|
-
|
|
413
|
-
|
|
414
|
-
|
|
415
|
-
|
|
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
|