@workerdeck/ui 0.16.0 → 0.18.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 +7 -0
- package/build/{SessionPanel-B9CHoq8x.d.mts → SessionPanel-CnU_IJ3-.d.mts} +36 -9
- package/build/{SessionPanel-DII9MmQ8.mjs → SessionPanel-DPx8Iz8a.mjs} +1432 -384
- package/build/SessionPanel-DPx8Iz8a.mjs.map +1 -0
- package/build/{format-DfI_je9S.d.mts → format-ljc3lKpA.d.mts} +1 -1
- package/build/format.d.mts +16 -5
- package/build/format.mjs +2 -3
- package/build/index.d.mts +288 -8
- package/build/index.mjs +620 -165
- package/build/index.mjs.map +1 -1
- package/build/{format-DqR56Y8l.mjs → status-BE-zg88x.mjs} +154 -2
- package/build/status-BE-zg88x.mjs.map +1 -0
- package/build/workspace.d.mts +4 -1
- package/build/workspace.mjs +4 -3
- package/build/workspace.mjs.map +1 -1
- package/package.json +8 -6
- package/src/components/agent/ContextRing.tsx +41 -0
- package/src/components/agent/EngineIcon.tsx +40 -0
- package/src/components/agent/ProjectIcon.tsx +119 -0
- package/src/components/agent/SessionBrowser.tsx +191 -17
- package/src/components/agent/SessionPanel.tsx +177 -2
- package/src/components/agent/SessionSteps.tsx +233 -0
- package/src/components/agent/SessionWorkspace.tsx +4 -0
- package/src/components/agent/StatusBar.tsx +4 -2
- package/src/components/agent/SubagentStrip.tsx +134 -0
- package/src/components/agent/ToolCallCard.tsx +72 -5
- package/src/components/agent/Transcript.tsx +212 -23
- package/src/components/agent/tool-result-fetch.tsx +36 -0
- package/src/components/agent/tool-result-image.tsx +209 -0
- package/src/components/agent/transcript-rows.ts +122 -23
- package/src/components/terminal/TerminalTranscript.tsx +154 -2
- package/src/components/terminal/affordances.tsx +34 -0
- package/src/components/terminal/blocks.ts +260 -0
- package/src/components/terminal/height.ts +73 -6
- package/src/components/terminal/image-box.ts +53 -0
- package/src/components/terminal/items.tsx +116 -79
- package/src/components/terminal/result-preview.ts +20 -6
- package/src/components/terminal/scrubber.tsx +172 -26
- package/src/components/terminal/tool-run.ts +177 -0
- package/src/index.ts +20 -1
- package/src/lib/status.ts +16 -3
- package/src/styles/terminal.css +85 -5
- package/src/styles/theme.css +42 -0
- package/build/SessionPanel-DII9MmQ8.mjs.map +0 -1
- package/build/format-DqR56Y8l.mjs.map +0 -1
- package/build/status-Ydzi7n6j.mjs +0 -143
- package/build/status-Ydzi7n6j.mjs.map +0 -1
|
@@ -56,4 +56,4 @@ declare function toolInputPreview(input: unknown, max?: number): string;
|
|
|
56
56
|
declare function friendlyModel(id: string | undefined): string | undefined;
|
|
57
57
|
//#endregion
|
|
58
58
|
export { formatDuration as a, formatRelativeTime as c, rateLimitWindowSeconds as d, toolInputPreview as f, formatCountdown as i, formatTokens as l, formatBytes as n, formatRateLimitWindow as o, formatCost as r, formatRateLimitWindowLong as s, formatAgoPrecise as t, friendlyModel as u };
|
|
59
|
-
//# sourceMappingURL=format-
|
|
59
|
+
//# sourceMappingURL=format-ljc3lKpA.d.mts.map
|
package/build/format.d.mts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { a as formatDuration, c as formatRelativeTime, d as rateLimitWindowSeconds, f as toolInputPreview, i as formatCountdown, l as formatTokens, n as formatBytes, o as formatRateLimitWindow, r as formatCost, s as formatRateLimitWindowLong, t as formatAgoPrecise, u as friendlyModel } from "./format-
|
|
2
|
-
import {
|
|
1
|
+
import { a as formatDuration, c as formatRelativeTime, d as rateLimitWindowSeconds, f as toolInputPreview, i as formatCountdown, l as formatTokens, n as formatBytes, o as formatRateLimitWindow, r as formatCost, s as formatRateLimitWindowLong, t as formatAgoPrecise, u as friendlyModel } from "./format-ljc3lKpA.mjs";
|
|
2
|
+
import { ModelOption, RateLimitInfo, SessionStatus } from "@workerdeck/protocol";
|
|
3
3
|
|
|
4
4
|
//#region src/lib/status.d.ts
|
|
5
5
|
/**
|
|
@@ -94,8 +94,19 @@ declare function currentModel(vitals: ModelReadings | undefined): ModelOption |
|
|
|
94
94
|
* id, and to "Default" while the session is on the CLI's own pick. */
|
|
95
95
|
declare function modelLabel(vitals: ModelReadings | undefined): string;
|
|
96
96
|
/** Context percentage as its meter severity — the reading and the colour come
|
|
97
|
-
* from one place so a panel and a status bar never disagree.
|
|
98
|
-
|
|
97
|
+
* from one place so a panel and a status bar never disagree.
|
|
98
|
+
*
|
|
99
|
+
* Takes only the number it reads, so the compact `ContextReading` that rides
|
|
100
|
+
* the sessions list and the full `ContextUsage` on the event stream are coloured
|
|
101
|
+
* by one rule rather than two. */
|
|
102
|
+
declare function contextSeverity(usage: {
|
|
103
|
+
percentage: number;
|
|
104
|
+
} | undefined): StatusSeverity;
|
|
105
|
+
/** {@link meterSeverity} as a text colour class. Here rather than beside each
|
|
106
|
+
* meter because the status bar, the context dialog and a sessions-list row all
|
|
107
|
+
* paint the same reading, and a fourth copy of the thresholds is a fourth
|
|
108
|
+
* chance for one surface to call 81% orange and another call it grey. */
|
|
109
|
+
declare function meterColorClass(pct: number | undefined): string;
|
|
99
110
|
//#endregion
|
|
100
|
-
export { ModelReadings, StatusPresentation, StatusReadings, StatusSeverity, UsageLane, contextSeverity, currentModel, formatAgoPrecise, formatBytes, formatCost, formatCountdown, formatDuration, formatRateLimitWindow, formatRateLimitWindowLong, formatRelativeTime, formatTokens, friendlyModel, meterSeverity, modelLabel, rateLimitWindowSeconds, statusPresentation, tightestWindow, toolInputPreview, usageWindow, windowLabel };
|
|
111
|
+
export { ModelReadings, StatusPresentation, StatusReadings, StatusSeverity, UsageLane, contextSeverity, currentModel, formatAgoPrecise, formatBytes, formatCost, formatCountdown, formatDuration, formatRateLimitWindow, formatRateLimitWindowLong, formatRelativeTime, formatTokens, friendlyModel, meterColorClass, meterSeverity, modelLabel, rateLimitWindowSeconds, statusPresentation, tightestWindow, toolInputPreview, usageWindow, windowLabel };
|
|
101
112
|
//# sourceMappingURL=format.d.mts.map
|
package/build/format.mjs
CHANGED
|
@@ -1,3 +1,2 @@
|
|
|
1
|
-
import { a as
|
|
2
|
-
|
|
3
|
-
export { contextSeverity, currentModel, formatAgoPrecise, formatBytes, formatCost, formatCountdown, formatDuration, formatRateLimitWindow, formatRateLimitWindowLong, formatRelativeTime, formatTokens, friendlyModel, meterSeverity, modelLabel, rateLimitWindowSeconds, statusPresentation, tightestWindow, toolInputPreview, usageWindow, windowLabel };
|
|
1
|
+
import { _ as formatRelativeTime, a as modelLabel, b as rateLimitWindowSeconds, c as usageWindow, d as formatBytes, f as formatCost, g as formatRateLimitWindowLong, h as formatRateLimitWindow, i as meterSeverity, l as windowLabel, m as formatDuration, n as currentModel, o as statusPresentation, p as formatCountdown, r as meterColorClass, s as tightestWindow, t as contextSeverity, u as formatAgoPrecise, v as formatTokens, x as toolInputPreview, y as friendlyModel } from "./status-BE-zg88x.mjs";
|
|
2
|
+
export { contextSeverity, currentModel, formatAgoPrecise, formatBytes, formatCost, formatCountdown, formatDuration, formatRateLimitWindow, formatRateLimitWindowLong, formatRelativeTime, formatTokens, friendlyModel, meterColorClass, meterSeverity, modelLabel, rateLimitWindowSeconds, statusPresentation, tightestWindow, toolInputPreview, usageWindow, windowLabel };
|
package/build/index.d.mts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { a as formatDuration, c as formatRelativeTime, d as rateLimitWindowSeconds, f as toolInputPreview, i as formatCountdown, l as formatTokens, n as formatBytes, o as formatRateLimitWindow, r as formatCost, s as formatRateLimitWindowLong, t as formatAgoPrecise, u as friendlyModel } from "./format-
|
|
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 formatDuration, c as formatRelativeTime, d as rateLimitWindowSeconds, f as toolInputPreview, i as formatCountdown, l as formatTokens, n as formatBytes, o as formatRateLimitWindow, r as formatCost, s as formatRateLimitWindowLong, t as formatAgoPrecise, u as friendlyModel } from "./format-ljc3lKpA.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-CnU_IJ3-.mjs";
|
|
3
3
|
import * as _$react from "react";
|
|
4
4
|
import { ButtonHTMLAttributes, FunctionComponent, HTMLAttributes, InputHTMLAttributes, ReactElement, ReactNode, Ref, RefObject, TextareaHTMLAttributes } from "react";
|
|
5
5
|
import { VariantProps } from "class-variance-authority";
|
|
@@ -15,7 +15,7 @@ import { Dialog as Dialog$1 } from "@base-ui/react/dialog";
|
|
|
15
15
|
import * as _$_base_ui_react_tooltip0 from "@base-ui/react/tooltip";
|
|
16
16
|
import { Tooltip } from "@base-ui/react/tooltip";
|
|
17
17
|
import { toast } from "sonner";
|
|
18
|
-
import { ContextUsage, FilePatch, ModelOption, PermissionRequest, ProfileEngine, QuestionBehavior, RateLimitInfo, SessionInfo, SessionRow, SessionStatus, SkillInfo, SlashCommandInfo, UsageWindowRow, UserQuestion, ViewConfig, WorkspaceScope } from "@workerdeck/protocol";
|
|
18
|
+
import { ContextReading, ContextUsage, FilePatch, ModelOption, PermissionRequest, ProfileEngine, ProjectIcon as ProjectIcon$1, QuestionBehavior, RateLimitInfo, SessionInfo, SessionRow, SessionStatus, SkillInfo, SlashCommandInfo, UsageWindowRow, UserQuestion, ViewConfig, WorkspaceScope } from "@workerdeck/protocol";
|
|
19
19
|
import { ConnectionState, TranscriptItem, TranscriptState, UseAttachmentsResult } from "@workerdeck/react";
|
|
20
20
|
import * as _$class_variance_authority_types0 from "class-variance-authority/types";
|
|
21
21
|
import { WorkerDeckClient } from "@workerdeck/client";
|
|
@@ -758,6 +758,11 @@ declare function isSegmentsEmpty(segments: Segment[]): boolean;
|
|
|
758
758
|
/** Extracts chips matching a specific trigger character. */
|
|
759
759
|
declare function getChipsByTrigger(segments: Segment[], trigger: string): ChipSegment[];
|
|
760
760
|
//#endregion
|
|
761
|
+
//#region src/components/terminal/blocks.d.ts
|
|
762
|
+
type ToolCallItem$1 = Extract<TranscriptItem, {
|
|
763
|
+
kind: 'tool_call';
|
|
764
|
+
}>;
|
|
765
|
+
//#endregion
|
|
761
766
|
//#region src/components/terminal/row.d.ts
|
|
762
767
|
/**
|
|
763
768
|
* The primitives every terminal row is built from.
|
|
@@ -933,6 +938,57 @@ interface TranscriptProps {
|
|
|
933
938
|
* message look like it did nothing at all.
|
|
934
939
|
*/
|
|
935
940
|
repinRef?: RefObject<(() => void) | null>;
|
|
941
|
+
/**
|
|
942
|
+
* Scroll a tool call into view — bump `nonce` to ask again for the same one.
|
|
943
|
+
*
|
|
944
|
+
* The seam a *list* needs: sub-agent work is nested inside the `Task` call
|
|
945
|
+
* that spawned it, so "open that sub-agent" can only ever mean "take me to its
|
|
946
|
+
* row". A `parentToolUseId` works here as well as the Task's own id, since the
|
|
947
|
+
* lookup resolves an absorbed child to the row that folded it.
|
|
948
|
+
*
|
|
949
|
+
* A prop rather than a ref (the shape `jumpToRecapRef` uses) because the asker
|
|
950
|
+
* is outside this webview entirely and the request travels as data; a ref
|
|
951
|
+
* would need a live closure at the other end of a postMessage bridge.
|
|
952
|
+
*/
|
|
953
|
+
reveal?: {
|
|
954
|
+
toolUseId: string;
|
|
955
|
+
nonce: number;
|
|
956
|
+
};
|
|
957
|
+
/**
|
|
958
|
+
* Render **only** the work one sub-agent did, rather than the conversation —
|
|
959
|
+
* the sub-agent takeover's frame.
|
|
960
|
+
*
|
|
961
|
+
* Membership is `subagentItems` (`terminal/blocks.ts`), which is also the rule
|
|
962
|
+
* iOS will mirror: everything the agent produced, and not the spawning `Task`
|
|
963
|
+
* call itself, which *is* the frame rather than a row in it.
|
|
964
|
+
*
|
|
965
|
+
* Features are switched off internally whenever it is set, and the gate lives
|
|
966
|
+
* here rather than at the call site on purpose: each is keyed to a
|
|
967
|
+
* **full-transcript item index**, so a host that passed a frame and a catch-up
|
|
968
|
+
* boundary together would not be making a strange choice, it would be making
|
|
969
|
+
* an incoherent one. Those are the catch-up boundary and its recap row, the
|
|
970
|
+
* sticky prompt, `reveal`, and the scrubber's **bookmarks** (host indices in
|
|
971
|
+
* full-transcript space).
|
|
972
|
+
*
|
|
973
|
+
* The **scrubber itself stays**, and the distinction is the point: the rail
|
|
974
|
+
* derives every one of its inputs from the rows it is given, and inside a
|
|
975
|
+
* frame those are the sub-agent's own — so it marks that agent's prompts,
|
|
976
|
+
* answers and failures at that agent's offsets. It was originally gated with
|
|
977
|
+
* the marks, on the reasonable-looking argument that they are one feature;
|
|
978
|
+
* they are two, and a fifty-tool agent run is exactly where a rail earns its
|
|
979
|
+
* keep. What stays besides is everything that makes a long stream readable —
|
|
980
|
+
* virtualization, the height epoch, the follow spring, the replay hold.
|
|
981
|
+
*/
|
|
982
|
+
frame?: {
|
|
983
|
+
parentToolUseId: string;
|
|
984
|
+
};
|
|
985
|
+
/**
|
|
986
|
+
* Raise the takeover from a `Task` row. Absent draws no affordance, which is
|
|
987
|
+
* what the plain renderer and the cards variant get: cards folds nothing, so
|
|
988
|
+
* it has no task blocks to hang this on, and reaches the takeover from the
|
|
989
|
+
* sessions list instead.
|
|
990
|
+
*/
|
|
991
|
+
onOpenSubagent?: (toolUseId: string) => void;
|
|
936
992
|
className?: string;
|
|
937
993
|
}
|
|
938
994
|
declare function Transcript({
|
|
@@ -953,6 +1009,9 @@ declare function Transcript({
|
|
|
953
1009
|
catchUp,
|
|
954
1010
|
jumpToRecapRef,
|
|
955
1011
|
repinRef,
|
|
1012
|
+
reveal,
|
|
1013
|
+
frame,
|
|
1014
|
+
onOpenSubagent,
|
|
956
1015
|
className
|
|
957
1016
|
}: TranscriptProps): _$react.JSX.Element;
|
|
958
1017
|
//#endregion
|
|
@@ -1848,6 +1907,10 @@ interface SessionBrowserProps {
|
|
|
1848
1907
|
* double-click would have already left the page.
|
|
1849
1908
|
*/
|
|
1850
1909
|
onRename?: (row: SessionRow, title: string) => void;
|
|
1910
|
+
/** Open a session *at* one of its sub-agents, when the host can scroll a
|
|
1911
|
+
* transcript to a `Task` row. Absent, the sub-agent list still expands and a
|
|
1912
|
+
* step just opens its session — see `SessionRowItemProps`. */
|
|
1913
|
+
onSelectSubagent?: (row: SessionRow, toolUseId: string) => void;
|
|
1851
1914
|
/** Rendered when nothing at all exists (as opposed to nothing matching). */
|
|
1852
1915
|
emptyState?: React.ReactNode;
|
|
1853
1916
|
/**
|
|
@@ -1862,6 +1925,15 @@ interface SessionBrowserProps {
|
|
|
1862
1925
|
* filtered by a control you can't currently see still says so.
|
|
1863
1926
|
*/
|
|
1864
1927
|
showControls?: boolean;
|
|
1928
|
+
/**
|
|
1929
|
+
* Resolved project-icon bytes by content hash — `useProjectIcons`' output.
|
|
1930
|
+
*
|
|
1931
|
+
* Passed in rather than fetched here for the reason `ProjectIcon` states: the
|
|
1932
|
+
* wire carries an *address*, and who can fetch it differs per client. Absent,
|
|
1933
|
+
* or a hash not in it yet, simply draws no picture; the project's name is
|
|
1934
|
+
* already there.
|
|
1935
|
+
*/
|
|
1936
|
+
projectIcons?: Record<string, string>;
|
|
1865
1937
|
className?: string;
|
|
1866
1938
|
}
|
|
1867
1939
|
/**
|
|
@@ -1890,15 +1962,28 @@ declare function SessionBrowser({
|
|
|
1890
1962
|
onSelect,
|
|
1891
1963
|
onDelete,
|
|
1892
1964
|
onRename,
|
|
1965
|
+
onSelectSubagent,
|
|
1893
1966
|
emptyState,
|
|
1894
1967
|
showControls,
|
|
1968
|
+
projectIcons,
|
|
1895
1969
|
className
|
|
1896
1970
|
}: SessionBrowserProps): _$react.JSX.Element;
|
|
1897
1971
|
/**
|
|
1898
|
-
* State as one glyph
|
|
1899
|
-
*
|
|
1900
|
-
*
|
|
1901
|
-
*
|
|
1972
|
+
* State as one glyph — a ringing bell when it wants a human, a spinner while it
|
|
1973
|
+
* works, a moon when it is only sleeping. Replaces the text badge: in a sidebar
|
|
1974
|
+
* the word costs more room than it earns, and the states that matter are the two
|
|
1975
|
+
* you can recognise without reading.
|
|
1976
|
+
*
|
|
1977
|
+
* **It reads `row.state`, not `info.status`, and that distinction is the whole
|
|
1978
|
+
* point of the row model.** `sessionState` already folds in the arm this glyph
|
|
1979
|
+
* cannot see for itself: a *background* sub-agent outlives its turn by design, so
|
|
1980
|
+
* the turn ends, `status` comes to rest at `idle`, and the agent keeps working.
|
|
1981
|
+
* Reading the raw status drew a **moon on a row filed under the "Working"
|
|
1982
|
+
* header** — the list contradicting itself on one line, which is exactly what a
|
|
1983
|
+
* derived view model exists to prevent. The value was in scope and unread.
|
|
1984
|
+
*
|
|
1985
|
+
* The terminal statuses still come off `info.status`, because `ended` collapses
|
|
1986
|
+
* `failed` and `closed` into one bucket and those are worth telling apart here.
|
|
1902
1987
|
*/
|
|
1903
1988
|
declare function SessionStatusIcon({
|
|
1904
1989
|
row
|
|
@@ -1907,6 +1992,26 @@ declare function SessionStatusIcon({
|
|
|
1907
1992
|
}): _$react.JSX.Element;
|
|
1908
1993
|
//#endregion
|
|
1909
1994
|
//#region src/components/agent/EngineIcon.d.ts
|
|
1995
|
+
/**
|
|
1996
|
+
* Which mark a session wears.
|
|
1997
|
+
*
|
|
1998
|
+
* The two first-party engines are named directly. A `provider` session is
|
|
1999
|
+
* whatever the host wired up, so its *model* is the only thing that says whose
|
|
2000
|
+
* it is — sniffed loosely on purpose (`gemini-2.5-pro`, `deepseek-chat`,
|
|
2001
|
+
* `kimi-k2`), and falling through to no mark rather than guessing wrong.
|
|
2002
|
+
*/
|
|
2003
|
+
declare function engineMark(engine: string, model?: string): string | undefined;
|
|
2004
|
+
/** The colour a session's engine mark wears. Pass it to `EngineIcon`'s
|
|
2005
|
+
* `className` rather than to a parent: the svg carries its own `text-fg-3`,
|
|
2006
|
+
* and only a class on the element itself is merged over it. */
|
|
2007
|
+
declare function vendorMarkClass(engine: string, model?: string): string;
|
|
2008
|
+
/** The colour the model *name* wears beside that mark — muted unless the vendor
|
|
2009
|
+
* is one whose accent survives at label size. See `VENDOR_TEXT`.
|
|
2010
|
+
*
|
|
2011
|
+
* The fallback is `text-fg-3` rather than the metadata line's own `text-fg-4`,
|
|
2012
|
+
* so an unbranded model still sits one step above the project and gateway
|
|
2013
|
+
* beside it — the order the spec lists them in, held without a colour. */
|
|
2014
|
+
declare function vendorTextClass(engine: string, model?: string): string;
|
|
1910
2015
|
declare function EngineIcon({
|
|
1911
2016
|
engine,
|
|
1912
2017
|
model,
|
|
@@ -1917,6 +2022,153 @@ declare function EngineIcon({
|
|
|
1917
2022
|
className?: string;
|
|
1918
2023
|
}): _$react.JSX.Element;
|
|
1919
2024
|
//#endregion
|
|
2025
|
+
//#region src/components/agent/SessionSteps.d.ts
|
|
2026
|
+
/**
|
|
2027
|
+
* The work *under* a session row, and the one row shape every client renders it
|
|
2028
|
+
* through.
|
|
2029
|
+
*
|
|
2030
|
+
* This lived inside the VS Code webview first, which is exactly why the
|
|
2031
|
+
* dashboard had none of it. Nothing in here is extension-specific: a session's
|
|
2032
|
+
* sub-agents are a protocol fact, and a disclosure over them is a list
|
|
2033
|
+
* affordance. It sits in `packages/ui` so the sidebar, the dashboard and (in its
|
|
2034
|
+
* own idiom) the phone are annotating rows the same way rather than three ways.
|
|
2035
|
+
*
|
|
2036
|
+
* Today the only source is `SessionInfo.subagents`. The other — the CLI's own
|
|
2037
|
+
* **task checklist**, the to-do list it keeps for the current turn — is what the
|
|
2038
|
+
* design was drawn from, and it is not built: nothing on the wire carries it yet
|
|
2039
|
+
* (see `_docs/features/sub-agent-handling.md`, second thread, which opens with
|
|
2040
|
+
* "check a capture" rather than "design a surface"). When it arrives it is a
|
|
2041
|
+
* *source*, not a second row component: checklist when the session has one, its
|
|
2042
|
+
* sub-agents otherwise.
|
|
2043
|
+
*
|
|
2044
|
+
* That is also why `state` has a `pending` arm no sub-agent can produce. A
|
|
2045
|
+
* sub-agent record exists only once dispatched, so it is never queued; a to-do
|
|
2046
|
+
* is queued for most of its life, and dropping the state would mean widening the
|
|
2047
|
+
* union later — the shape is cheaper to state now than to retrofit.
|
|
2048
|
+
*/
|
|
2049
|
+
type Step = {
|
|
2050
|
+
key: string;
|
|
2051
|
+
label: string; /** What one of these is called, for the disclosure's count. */
|
|
2052
|
+
noun: string;
|
|
2053
|
+
/**
|
|
2054
|
+
* An **agent** has an identity and work of its own, so it is pressable and
|
|
2055
|
+
* wears the sub-agent colour. A **task** is something the model described with
|
|
2056
|
+
* no agent behind it (`isAgentRecord`), so it is inert: there is no frame to
|
|
2057
|
+
* open, and a row that offered one would show an empty screen.
|
|
2058
|
+
*
|
|
2059
|
+
* Two values and not a boolean because the checklist source this shape was
|
|
2060
|
+
* drawn for (see above) produces the second kind natively — a to-do is a task
|
|
2061
|
+
* in exactly this sense, and it will slot in here rather than widening
|
|
2062
|
+
* anything.
|
|
2063
|
+
*/
|
|
2064
|
+
kind: 'agent' | 'task';
|
|
2065
|
+
state: 'done' | 'running' | 'pending' | 'failed'; /** A trailing reading — a sub-agent's tool count. Absent draws nothing. */
|
|
2066
|
+
detail?: string;
|
|
2067
|
+
title: string;
|
|
2068
|
+
onSelect: () => void;
|
|
2069
|
+
};
|
|
2070
|
+
declare function sessionSteps(info: SessionInfo, onSelectSubagent: (toolUseId: string) => void): Step[];
|
|
2071
|
+
/** How many of these are still going — the live half of the disclosure's count. */
|
|
2072
|
+
declare function runningSteps(steps: readonly Step[]): number;
|
|
2073
|
+
/**
|
|
2074
|
+
* The disclosure, which is also the reading: `3 agents` — or `2 of 3 agents`
|
|
2075
|
+
* while some have settled, because "how many are still going" is the live
|
|
2076
|
+
* question and a bare total answers it wrong the moment one finishes.
|
|
2077
|
+
*
|
|
2078
|
+
* Sub-agents are an annotation on a working row rather than a state of their own
|
|
2079
|
+
* (see `runningSubagents` in protocol's `session-list.ts`), so this never
|
|
2080
|
+
* competes with the row's status glyph: that still says what the *session* is
|
|
2081
|
+
* doing.
|
|
2082
|
+
*/
|
|
2083
|
+
declare function StepToggle({
|
|
2084
|
+
expanded,
|
|
2085
|
+
running,
|
|
2086
|
+
total,
|
|
2087
|
+
noun,
|
|
2088
|
+
onToggle
|
|
2089
|
+
}: {
|
|
2090
|
+
expanded: boolean;
|
|
2091
|
+
running: number;
|
|
2092
|
+
total: number;
|
|
2093
|
+
noun: string;
|
|
2094
|
+
onToggle: () => void;
|
|
2095
|
+
}): _$react.JSX.Element;
|
|
2096
|
+
/**
|
|
2097
|
+
* One step under its session. Pressing an **agent** hands the panel over to that
|
|
2098
|
+
* agent's own work — it is not a session and never becomes one, but it does now
|
|
2099
|
+
* have a surface (`SessionPanel.openSubagent`). A host that cannot frame one
|
|
2100
|
+
* falls back to revealing its `Task` row, which was this row's only meaning
|
|
2101
|
+
* before the takeover existed. A **task** is not pressable at all; see
|
|
2102
|
+
* {@link Step.kind}.
|
|
2103
|
+
*
|
|
2104
|
+
* Divided from the row's header and from each other by a rule rather than by
|
|
2105
|
+
* indentation: these are a list *inside* the row, and at 11px an indent is not
|
|
2106
|
+
* enough to say so. The rule is black at 25% so it darkens whatever the row is
|
|
2107
|
+
* filled with, selected or not, without needing a colour per state.
|
|
2108
|
+
*/
|
|
2109
|
+
declare function StepRow({
|
|
2110
|
+
step,
|
|
2111
|
+
onSelect
|
|
2112
|
+
}: {
|
|
2113
|
+
step: Step;
|
|
2114
|
+
onSelect: () => void;
|
|
2115
|
+
}): _$react.JSX.Element;
|
|
2116
|
+
//#endregion
|
|
2117
|
+
//#region src/components/agent/SubagentStrip.d.ts
|
|
2118
|
+
/**
|
|
2119
|
+
* The one line above a sub-agent takeover: who this is, how it is doing, and the
|
|
2120
|
+
* way back.
|
|
2121
|
+
*
|
|
2122
|
+
* **It claims exactly what the `TaskRow` it was opened from claims** — the same
|
|
2123
|
+
* `taskBusy` / `taskFailed` / tool count over the same items — and deliberately
|
|
2124
|
+
* *not* `SubagentInfo.status`. Protocol documents those two as divergent on
|
|
2125
|
+
* purpose (`index.ts:1476-1487`), but that divergence is transcript-versus-*list*
|
|
2126
|
+
* and this surface **is** the transcript. The disagreement that must not exist
|
|
2127
|
+
* here is between a header and the rows directly beneath it.
|
|
2128
|
+
*
|
|
2129
|
+
* The rollup is still allowed one job — naming an agent whose `Task` call is not
|
|
2130
|
+
* in the transcript — because a label is not content, and `SessionInfo.subagents`
|
|
2131
|
+
* keeps only eight settled records (`SUBAGENT_HISTORY`), so it can never be the
|
|
2132
|
+
* source of what a frame *shows*.
|
|
2133
|
+
*
|
|
2134
|
+
* Both variants, because the panel has two and a strip that only existed in one
|
|
2135
|
+
* would make the takeover a terminal-theme feature rather than a session feature.
|
|
2136
|
+
*/
|
|
2137
|
+
declare function SubagentStrip({
|
|
2138
|
+
task,
|
|
2139
|
+
items,
|
|
2140
|
+
label,
|
|
2141
|
+
onBack,
|
|
2142
|
+
terminal,
|
|
2143
|
+
fontSize,
|
|
2144
|
+
lineHeight
|
|
2145
|
+
}: {
|
|
2146
|
+
/** The spawning call. Absent when the transcript does not have it — the strip
|
|
2147
|
+
* still draws, because the way back must exist even when the content cannot. */
|
|
2148
|
+
task: ToolCallItem$1 | undefined; /** The frame's items, for the busy reading and the tool count. */
|
|
2149
|
+
items: readonly TranscriptItem[]; /** Fallback name when there is no task item. */
|
|
2150
|
+
label: string;
|
|
2151
|
+
onBack: () => void;
|
|
2152
|
+
terminal: boolean;
|
|
2153
|
+
fontSize?: number;
|
|
2154
|
+
lineHeight?: number;
|
|
2155
|
+
}): _$react.JSX.Element;
|
|
2156
|
+
//#endregion
|
|
2157
|
+
//#region src/components/agent/ProjectIcon.d.ts
|
|
2158
|
+
declare function ProjectIcon({
|
|
2159
|
+
icon,
|
|
2160
|
+
src,
|
|
2161
|
+
name,
|
|
2162
|
+
className
|
|
2163
|
+
}: {
|
|
2164
|
+
icon: ProjectIcon$1 | undefined;
|
|
2165
|
+
/** Resolved bytes for the `image` arm — an object URL or a data URL. The
|
|
2166
|
+
* caller fetches (see the note above); absent draws nothing. */
|
|
2167
|
+
src?: string; /** The project's name, for the alt text. */
|
|
2168
|
+
name?: string;
|
|
2169
|
+
className?: string;
|
|
2170
|
+
}): _$react.JSX.Element | null;
|
|
2171
|
+
//#endregion
|
|
1920
2172
|
//#region src/components/agent/SessionEmptyState.d.ts
|
|
1921
2173
|
interface SessionEmptyStateProps {
|
|
1922
2174
|
cwd?: string;
|
|
@@ -1977,6 +2229,34 @@ declare const STATUS_META: Record<SessionStatus, {
|
|
|
1977
2229
|
busy: boolean;
|
|
1978
2230
|
}>;
|
|
1979
2231
|
//#endregion
|
|
2232
|
+
//#region src/components/agent/ContextRing.d.ts
|
|
2233
|
+
/**
|
|
2234
|
+
* How full a session's context window is, sized for a **list row**.
|
|
2235
|
+
*
|
|
2236
|
+
* The reading the session screen has always drawn, moved somewhere it answers a
|
|
2237
|
+
* question the session screen cannot: *which* of these thirty sessions is
|
|
2238
|
+
* bloating. That is also why it is a ring and not a number — across a list, a
|
|
2239
|
+
* ring is read at a glance and `71%` has to be read one row at a time.
|
|
2240
|
+
*
|
|
2241
|
+
* **Absent draws nothing, and absent is not zero.** A promptless session, a
|
|
2242
|
+
* parked one from before the field existed, or an engine that reports no window
|
|
2243
|
+
* has no reading; an empty ring would claim its context is empty rather than
|
|
2244
|
+
* unknown. The title carries the exact numbers for anyone who wants them.
|
|
2245
|
+
*
|
|
2246
|
+
* Shared rather than spelled per client: the dashboard's row and the VS Code
|
|
2247
|
+
* sidebar's card both draw it, and two copies would be two sets of thresholds
|
|
2248
|
+
* the day one of them is nudged.
|
|
2249
|
+
*/
|
|
2250
|
+
declare function ContextRing({
|
|
2251
|
+
usage,
|
|
2252
|
+
size,
|
|
2253
|
+
className
|
|
2254
|
+
}: {
|
|
2255
|
+
usage: ContextReading | undefined;
|
|
2256
|
+
size?: number;
|
|
2257
|
+
className?: string;
|
|
2258
|
+
}): _$react.JSX.Element | null;
|
|
2259
|
+
//#endregion
|
|
1980
2260
|
//#region src/lib/utils.d.ts
|
|
1981
2261
|
declare function cn(...inputs: ClassValue[]): string;
|
|
1982
2262
|
//#endregion
|
|
@@ -2019,5 +2299,5 @@ declare function toolIcon(toolName: string): LucideIcon;
|
|
|
2019
2299
|
*/
|
|
2020
2300
|
declare function isMutatingTool(toolName: string): boolean;
|
|
2021
2301
|
//#endregion
|
|
2022
|
-
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, 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, 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, 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 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, formatAgoPrecise, formatBytes, formatCost, formatCountdown, formatDuration, formatRateLimitWindow, formatRateLimitWindowLong, formatRelativeTime, formatTokens, friendlyModel, getChipsByTrigger, hashtagTrigger, isMutatingTool, isSegmentsEmpty, mentionTrigger, parseUserQuestions, permissionModeChoices, permissionModeMeta, plainTextToSegments, previewPatch, rateLimitWindowSeconds, rowShapeClass, segmentsToPlainText, skillPrompt, toast, toolIcon, toolInputPreview, useAffordances, useMinuteClock, usePromptAreaState, useTranscriptDensity, useTranscriptVariant };
|
|
2302
|
+
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, 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 };
|
|
2023
2303
|
//# sourceMappingURL=index.d.mts.map
|