@workerdeck/ui 0.11.0 → 0.12.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/build/{SessionPanel-CyhygZx_.d.mts → SessionPanel-Dy9lQrOV.d.mts} +44 -2
- package/build/{SessionPanel-_U8tjX29.mjs → SessionPanel-NQ8ksCfj.mjs} +280 -215
- package/build/SessionPanel-NQ8ksCfj.mjs.map +1 -0
- package/build/format.d.mts +65 -1
- package/build/format.mjs +118 -1
- package/build/format.mjs.map +1 -0
- package/build/index.d.mts +67 -7
- package/build/index.mjs +330 -5
- package/build/index.mjs.map +1 -1
- package/build/workspace.d.mts +28 -1
- package/build/workspace.mjs +14 -2
- package/build/workspace.mjs.map +1 -1
- package/package.json +4 -4
- package/src/components/agent/Loader.tsx +8 -46
- package/src/components/agent/SessionBrowser.tsx +428 -0
- package/src/components/agent/SessionPanel.tsx +28 -1
- package/src/components/agent/SessionWorkspace.tsx +35 -0
- package/src/components/agent/ToolCallCard.tsx +11 -2
- package/src/components/agent/Transcript.tsx +26 -8
- package/src/components/agent/pulse.tsx +60 -0
- package/src/components/agent/transcript-variant.tsx +62 -0
- package/src/format.ts +1 -0
- package/src/index.ts +4 -0
- package/src/lib/status.ts +124 -0
- package/build/SessionPanel-_U8tjX29.mjs.map +0 -1
package/build/format.d.mts
CHANGED
|
@@ -1,2 +1,66 @@
|
|
|
1
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
|
-
|
|
2
|
+
import { ContextUsage, ModelOption, RateLimitInfo, SessionStatus } from "@workerdeck/protocol";
|
|
3
|
+
|
|
4
|
+
//#region src/lib/status.d.ts
|
|
5
|
+
/**
|
|
6
|
+
* How a session's live readings become a status line — the pure half, so every
|
|
7
|
+
* host spells "Needs approval", "80% is a warning" and "which window is the
|
|
8
|
+
* binding one" the same way.
|
|
9
|
+
*
|
|
10
|
+
* Structurally typed against `SessionVitals` rather than importing it: this file
|
|
11
|
+
* ships from the React-free `@workerdeck/ui/format` entry, and a host drawing
|
|
12
|
+
* the readings outside React (the VS Code extension host in the window status
|
|
13
|
+
* bar) must not pull a component graph in to do it. A real `SessionVitals`
|
|
14
|
+
* satisfies every shape here.
|
|
15
|
+
*/
|
|
16
|
+
type StatusSeverity = 'none' | 'warning' | 'error';
|
|
17
|
+
/** What a status slot shows, before any host's icon vocabulary gets involved.
|
|
18
|
+
* `icon` is a VS Code codicon name — the one host-shaped thing left, because the
|
|
19
|
+
* alternative is a second mapping table in the only consumer. */
|
|
20
|
+
type StatusPresentation = {
|
|
21
|
+
icon: string;
|
|
22
|
+
label: string;
|
|
23
|
+
severity: StatusSeverity;
|
|
24
|
+
};
|
|
25
|
+
type StatusReadings = {
|
|
26
|
+
status: SessionStatus;
|
|
27
|
+
/** `@workerdeck/react`'s `ConnectionState`, structurally — the link state wins
|
|
28
|
+
* the slot, so it has to be part of the reading. */
|
|
29
|
+
connection?: 'live' | 'reconnecting' | 'offline';
|
|
30
|
+
};
|
|
31
|
+
/**
|
|
32
|
+
* The status slot, connection first. A session status held over a dead socket is
|
|
33
|
+
* the last thing we heard, not the current state — so a lost link takes the slot
|
|
34
|
+
* rather than letting "Running" imply a turn is still streaming.
|
|
35
|
+
*/
|
|
36
|
+
declare function statusPresentation(vitals: StatusReadings | undefined): StatusPresentation;
|
|
37
|
+
/** 0–100 → the colour a meter wears. One pair of thresholds for every surface. */
|
|
38
|
+
declare function meterSeverity(pct: number | undefined): StatusSeverity;
|
|
39
|
+
/** The rate-limit window that gets the one visible slot: whichever is fullest,
|
|
40
|
+
* since the binding constraint is the one worth glancing at. */
|
|
41
|
+
declare function tightestWindow(rateLimits: Record<string, RateLimitInfo> | undefined): {
|
|
42
|
+
key: string;
|
|
43
|
+
info: RateLimitInfo;
|
|
44
|
+
} | undefined;
|
|
45
|
+
/** A rate-limit window's key, named for a human. */
|
|
46
|
+
declare function windowLabel(key: string): string;
|
|
47
|
+
type ModelReadings = {
|
|
48
|
+
model?: string;
|
|
49
|
+
models: readonly ModelOption[];
|
|
50
|
+
};
|
|
51
|
+
/**
|
|
52
|
+
* The catalog row a session is actually running, or `undefined` for a model the
|
|
53
|
+
* list doesn't name. Matched leniently: a session reports the *resolved* id
|
|
54
|
+
* (`claude-sonnet-5`) where the row may be keyed on the alias (`sonnet`), and
|
|
55
|
+
* either can carry a `[1m]` context-window suffix.
|
|
56
|
+
*/
|
|
57
|
+
declare function currentModel(vitals: ModelReadings | undefined): ModelOption | undefined;
|
|
58
|
+
/** A session's model, named the way the picker names it. Falls back to the raw
|
|
59
|
+
* id, and to "Default" while the session is on the CLI's own pick. */
|
|
60
|
+
declare function modelLabel(vitals: ModelReadings | undefined): string;
|
|
61
|
+
/** Context percentage as its meter severity — the reading and the colour come
|
|
62
|
+
* from one place so a panel and a status bar never disagree. */
|
|
63
|
+
declare function contextSeverity(usage: ContextUsage | undefined): StatusSeverity;
|
|
64
|
+
//#endregion
|
|
65
|
+
export { ModelReadings, StatusPresentation, StatusReadings, StatusSeverity, contextSeverity, currentModel, formatAgoPrecise, formatBytes, formatCost, formatCountdown, formatDuration, formatRateLimitWindow, formatRateLimitWindowLong, formatRelativeTime, formatTokens, friendlyModel, meterSeverity, modelLabel, rateLimitWindowSeconds, statusPresentation, tightestWindow, toolInputPreview, windowLabel };
|
|
66
|
+
//# sourceMappingURL=format.d.mts.map
|
package/build/format.mjs
CHANGED
|
@@ -1,2 +1,119 @@
|
|
|
1
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-DqR56Y8l.mjs";
|
|
2
|
-
|
|
2
|
+
//#region src/lib/status.ts
|
|
3
|
+
const STATUS_META = {
|
|
4
|
+
starting: {
|
|
5
|
+
icon: "loading~spin",
|
|
6
|
+
label: "Starting",
|
|
7
|
+
severity: "none"
|
|
8
|
+
},
|
|
9
|
+
running: {
|
|
10
|
+
icon: "loading~spin",
|
|
11
|
+
label: "Running",
|
|
12
|
+
severity: "none"
|
|
13
|
+
},
|
|
14
|
+
awaiting_approval: {
|
|
15
|
+
icon: "warning",
|
|
16
|
+
label: "Needs approval",
|
|
17
|
+
severity: "warning"
|
|
18
|
+
},
|
|
19
|
+
idle: {
|
|
20
|
+
icon: "check",
|
|
21
|
+
label: "Idle",
|
|
22
|
+
severity: "none"
|
|
23
|
+
},
|
|
24
|
+
parked: {
|
|
25
|
+
icon: "debug-pause",
|
|
26
|
+
label: "Parked",
|
|
27
|
+
severity: "none"
|
|
28
|
+
},
|
|
29
|
+
failed: {
|
|
30
|
+
icon: "error",
|
|
31
|
+
label: "Failed",
|
|
32
|
+
severity: "error"
|
|
33
|
+
},
|
|
34
|
+
closed: {
|
|
35
|
+
icon: "circle-slash",
|
|
36
|
+
label: "Closed",
|
|
37
|
+
severity: "none"
|
|
38
|
+
}
|
|
39
|
+
};
|
|
40
|
+
/**
|
|
41
|
+
* The status slot, connection first. A session status held over a dead socket is
|
|
42
|
+
* the last thing we heard, not the current state — so a lost link takes the slot
|
|
43
|
+
* rather than letting "Running" imply a turn is still streaming.
|
|
44
|
+
*/
|
|
45
|
+
function statusPresentation(vitals) {
|
|
46
|
+
if (!vitals) return {
|
|
47
|
+
icon: "hubot",
|
|
48
|
+
label: "Connecting…",
|
|
49
|
+
severity: "none"
|
|
50
|
+
};
|
|
51
|
+
if (vitals.connection === "offline") return {
|
|
52
|
+
icon: "debug-disconnect",
|
|
53
|
+
label: "Offline",
|
|
54
|
+
severity: "error"
|
|
55
|
+
};
|
|
56
|
+
if (vitals.connection === "reconnecting") return {
|
|
57
|
+
icon: "sync~spin",
|
|
58
|
+
label: "Reconnecting…",
|
|
59
|
+
severity: "warning"
|
|
60
|
+
};
|
|
61
|
+
return STATUS_META[vitals.status] ?? {
|
|
62
|
+
icon: "hubot",
|
|
63
|
+
label: vitals.status,
|
|
64
|
+
severity: "none"
|
|
65
|
+
};
|
|
66
|
+
}
|
|
67
|
+
/** 0–100 → the colour a meter wears. One pair of thresholds for every surface. */
|
|
68
|
+
function meterSeverity(pct) {
|
|
69
|
+
if (pct === void 0) return "none";
|
|
70
|
+
if (pct >= 95) return "error";
|
|
71
|
+
if (pct >= 80) return "warning";
|
|
72
|
+
return "none";
|
|
73
|
+
}
|
|
74
|
+
/** The rate-limit window that gets the one visible slot: whichever is fullest,
|
|
75
|
+
* since the binding constraint is the one worth glancing at. */
|
|
76
|
+
function tightestWindow(rateLimits) {
|
|
77
|
+
const entries = Object.entries(rateLimits ?? {});
|
|
78
|
+
if (entries.length === 0) return void 0;
|
|
79
|
+
let best;
|
|
80
|
+
for (const [key, info] of entries) if ((info.status === "rejected" ? Number.POSITIVE_INFINITY : info.utilization ?? -1) > (best === void 0 ? Number.NEGATIVE_INFINITY : best.info.status === "rejected" ? Number.POSITIVE_INFINITY : best.info.utilization ?? -1)) best = {
|
|
81
|
+
key,
|
|
82
|
+
info
|
|
83
|
+
};
|
|
84
|
+
return best;
|
|
85
|
+
}
|
|
86
|
+
/** A rate-limit window's key, named for a human. */
|
|
87
|
+
function windowLabel(key) {
|
|
88
|
+
if (key === "five_hour") return "Session";
|
|
89
|
+
if (key === "seven_day") return "Weekly";
|
|
90
|
+
return key.replaceAll("_", " ");
|
|
91
|
+
}
|
|
92
|
+
/**
|
|
93
|
+
* The catalog row a session is actually running, or `undefined` for a model the
|
|
94
|
+
* list doesn't name. Matched leniently: a session reports the *resolved* id
|
|
95
|
+
* (`claude-sonnet-5`) where the row may be keyed on the alias (`sonnet`), and
|
|
96
|
+
* either can carry a `[1m]` context-window suffix.
|
|
97
|
+
*/
|
|
98
|
+
function currentModel(vitals) {
|
|
99
|
+
const id = vitals?.model;
|
|
100
|
+
if (!id) return void 0;
|
|
101
|
+
const bare = (value) => value.replace(/\[.*\]$/, "");
|
|
102
|
+
const wanted = bare(id);
|
|
103
|
+
return vitals.models.find((m) => bare(m.value) === wanted || m.resolvedModel && bare(m.resolvedModel) === wanted);
|
|
104
|
+
}
|
|
105
|
+
/** A session's model, named the way the picker names it. Falls back to the raw
|
|
106
|
+
* id, and to "Default" while the session is on the CLI's own pick. */
|
|
107
|
+
function modelLabel(vitals) {
|
|
108
|
+
if (!vitals?.model) return "Default";
|
|
109
|
+
return currentModel(vitals)?.displayName ?? vitals.model;
|
|
110
|
+
}
|
|
111
|
+
/** Context percentage as its meter severity — the reading and the colour come
|
|
112
|
+
* from one place so a panel and a status bar never disagree. */
|
|
113
|
+
function contextSeverity(usage) {
|
|
114
|
+
return meterSeverity(usage?.percentage);
|
|
115
|
+
}
|
|
116
|
+
//#endregion
|
|
117
|
+
export { contextSeverity, currentModel, formatAgoPrecise, formatBytes, formatCost, formatCountdown, formatDuration, formatRateLimitWindow, formatRateLimitWindowLong, formatRelativeTime, formatTokens, friendlyModel, meterSeverity, modelLabel, rateLimitWindowSeconds, statusPresentation, tightestWindow, toolInputPreview, windowLabel };
|
|
118
|
+
|
|
119
|
+
//# sourceMappingURL=format.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"format.mjs","names":[],"sources":["../src/lib/status.ts"],"sourcesContent":["import type { ContextUsage, ModelOption, RateLimitInfo, SessionStatus } from '@workerdeck/protocol'\n\n/**\n * How a session's live readings become a status line — the pure half, so every\n * host spells \"Needs approval\", \"80% is a warning\" and \"which window is the\n * binding one\" the same way.\n *\n * Structurally typed against `SessionVitals` rather than importing it: this file\n * ships from the React-free `@workerdeck/ui/format` entry, and a host drawing\n * the readings outside React (the VS Code extension host in the window status\n * bar) must not pull a component graph in to do it. A real `SessionVitals`\n * satisfies every shape here.\n */\nexport type StatusSeverity = 'none' | 'warning' | 'error'\n\n/** What a status slot shows, before any host's icon vocabulary gets involved.\n * `icon` is a VS Code codicon name — the one host-shaped thing left, because the\n * alternative is a second mapping table in the only consumer. */\nexport type StatusPresentation = {\n icon: string\n label: string\n severity: StatusSeverity\n}\n\nexport type StatusReadings = {\n status: SessionStatus\n /** `@workerdeck/react`'s `ConnectionState`, structurally — the link state wins\n * the slot, so it has to be part of the reading. */\n connection?: 'live' | 'reconnecting' | 'offline'\n}\n\nconst STATUS_META: Record<SessionStatus, StatusPresentation> = {\n starting: { icon: 'loading~spin', label: 'Starting', severity: 'none' },\n running: { icon: 'loading~spin', label: 'Running', severity: 'none' },\n awaiting_approval: { icon: 'warning', label: 'Needs approval', severity: 'warning' },\n idle: { icon: 'check', label: 'Idle', severity: 'none' },\n parked: { icon: 'debug-pause', label: 'Parked', severity: 'none' },\n failed: { icon: 'error', label: 'Failed', severity: 'error' },\n closed: { icon: 'circle-slash', label: 'Closed', severity: 'none' },\n}\n\n/**\n * The status slot, connection first. A session status held over a dead socket is\n * the last thing we heard, not the current state — so a lost link takes the slot\n * rather than letting \"Running\" imply a turn is still streaming.\n */\nexport function statusPresentation(vitals: StatusReadings | undefined): StatusPresentation {\n if (!vitals) return { icon: 'hubot', label: 'Connecting…', severity: 'none' }\n if (vitals.connection === 'offline') {\n return { icon: 'debug-disconnect', label: 'Offline', severity: 'error' }\n }\n if (vitals.connection === 'reconnecting') {\n return { icon: 'sync~spin', label: 'Reconnecting…', severity: 'warning' }\n }\n return STATUS_META[vitals.status] ?? { icon: 'hubot', label: vitals.status, severity: 'none' }\n}\n\n/** 0–100 → the colour a meter wears. One pair of thresholds for every surface. */\nexport function meterSeverity(pct: number | undefined): StatusSeverity {\n if (pct === undefined) return 'none'\n if (pct >= 95) return 'error'\n if (pct >= 80) return 'warning'\n return 'none'\n}\n\n/** The rate-limit window that gets the one visible slot: whichever is fullest,\n * since the binding constraint is the one worth glancing at. */\nexport function tightestWindow(\n rateLimits: Record<string, RateLimitInfo> | undefined,\n): { key: string; info: RateLimitInfo } | undefined {\n const entries = Object.entries(rateLimits ?? {})\n if (entries.length === 0) return undefined\n let best: { key: string; info: RateLimitInfo } | undefined\n for (const [key, info] of entries) {\n // A rejected window outranks any utilization: it is the one actually blocking.\n const rank = info.status === 'rejected' ? Number.POSITIVE_INFINITY : (info.utilization ?? -1)\n const bestRank =\n best === undefined\n ? Number.NEGATIVE_INFINITY\n : best.info.status === 'rejected'\n ? Number.POSITIVE_INFINITY\n : (best.info.utilization ?? -1)\n if (rank > bestRank) best = { key, info }\n }\n return best\n}\n\n/** A rate-limit window's key, named for a human. */\nexport function windowLabel(key: string): string {\n if (key === 'five_hour') return 'Session'\n if (key === 'seven_day') return 'Weekly'\n return key.replaceAll('_', ' ')\n}\n\nexport type ModelReadings = { model?: string; models: readonly ModelOption[] }\n\n/**\n * The catalog row a session is actually running, or `undefined` for a model the\n * list doesn't name. Matched leniently: a session reports the *resolved* id\n * (`claude-sonnet-5`) where the row may be keyed on the alias (`sonnet`), and\n * either can carry a `[1m]` context-window suffix.\n */\nexport function currentModel(vitals: ModelReadings | undefined): ModelOption | undefined {\n const id = vitals?.model\n if (!id) return undefined\n const bare = (value: string) => value.replace(/\\[.*\\]$/, '')\n const wanted = bare(id)\n return vitals.models.find(\n (m) => bare(m.value) === wanted || (m.resolvedModel && bare(m.resolvedModel) === wanted),\n )\n}\n\n/** A session's model, named the way the picker names it. Falls back to the raw\n * id, and to \"Default\" while the session is on the CLI's own pick. */\nexport function modelLabel(vitals: ModelReadings | undefined): string {\n if (!vitals?.model) return 'Default'\n return currentModel(vitals)?.displayName ?? vitals.model\n}\n\n/** Context percentage as its meter severity — the reading and the colour come\n * from one place so a panel and a status bar never disagree. */\nexport function contextSeverity(usage: ContextUsage | undefined): StatusSeverity {\n return meterSeverity(usage?.percentage)\n}\n"],"mappings":";;AA+BA,MAAM,cAAyD;CAC7D,UAAU;EAAE,MAAM;EAAgB,OAAO;EAAY,UAAU;EAAQ;CACvE,SAAS;EAAE,MAAM;EAAgB,OAAO;EAAW,UAAU;EAAQ;CACrE,mBAAmB;EAAE,MAAM;EAAW,OAAO;EAAkB,UAAU;EAAW;CACpF,MAAM;EAAE,MAAM;EAAS,OAAO;EAAQ,UAAU;EAAQ;CACxD,QAAQ;EAAE,MAAM;EAAe,OAAO;EAAU,UAAU;EAAQ;CAClE,QAAQ;EAAE,MAAM;EAAS,OAAO;EAAU,UAAU;EAAS;CAC7D,QAAQ;EAAE,MAAM;EAAgB,OAAO;EAAU,UAAU;EAAQ;CACpE;;;;;;AAOD,SAAgB,mBAAmB,QAAwD;AACzF,KAAI,CAAC,OAAQ,QAAO;EAAE,MAAM;EAAS,OAAO;EAAe,UAAU;EAAQ;AAC7E,KAAI,OAAO,eAAe,UACxB,QAAO;EAAE,MAAM;EAAoB,OAAO;EAAW,UAAU;EAAS;AAE1E,KAAI,OAAO,eAAe,eACxB,QAAO;EAAE,MAAM;EAAa,OAAO;EAAiB,UAAU;EAAW;AAE3E,QAAO,YAAY,OAAO,WAAW;EAAE,MAAM;EAAS,OAAO,OAAO;EAAQ,UAAU;EAAQ;;;AAIhG,SAAgB,cAAc,KAAyC;AACrE,KAAI,QAAQ,KAAA,EAAW,QAAO;AAC9B,KAAI,OAAO,GAAI,QAAO;AACtB,KAAI,OAAO,GAAI,QAAO;AACtB,QAAO;;;;AAKT,SAAgB,eACd,YACkD;CAClD,MAAM,UAAU,OAAO,QAAQ,cAAc,EAAE,CAAC;AAChD,KAAI,QAAQ,WAAW,EAAG,QAAO,KAAA;CACjC,IAAI;AACJ,MAAK,MAAM,CAAC,KAAK,SAAS,QASxB,MAPa,KAAK,WAAW,aAAa,OAAO,oBAAqB,KAAK,eAAe,OAExF,SAAS,KAAA,IACL,OAAO,oBACP,KAAK,KAAK,WAAW,aACnB,OAAO,oBACN,KAAK,KAAK,eAAe,IACb,QAAO;EAAE;EAAK;EAAM;AAE3C,QAAO;;;AAIT,SAAgB,YAAY,KAAqB;AAC/C,KAAI,QAAQ,YAAa,QAAO;AAChC,KAAI,QAAQ,YAAa,QAAO;AAChC,QAAO,IAAI,WAAW,KAAK,IAAI;;;;;;;;AAWjC,SAAgB,aAAa,QAA4D;CACvF,MAAM,KAAK,QAAQ;AACnB,KAAI,CAAC,GAAI,QAAO,KAAA;CAChB,MAAM,QAAQ,UAAkB,MAAM,QAAQ,WAAW,GAAG;CAC5D,MAAM,SAAS,KAAK,GAAG;AACvB,QAAO,OAAO,OAAO,MAClB,MAAM,KAAK,EAAE,MAAM,KAAK,UAAW,EAAE,iBAAiB,KAAK,EAAE,cAAc,KAAK,OAClF;;;;AAKH,SAAgB,WAAW,QAA2C;AACpE,KAAI,CAAC,QAAQ,MAAO,QAAO;AAC3B,QAAO,aAAa,OAAO,EAAE,eAAe,OAAO;;;;AAKrD,SAAgB,gBAAgB,OAAiD;AAC/E,QAAO,cAAc,OAAO,WAAW"}
|
package/build/index.d.mts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
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 { a as SessionVitals, c as
|
|
2
|
+
import { _ as permissionModeChoices, a as SessionVitals, c as TranscriptVariant, d as useTranscriptVariant, f as PERMISSION_MODES, g as PermissionModeSelectProps, h as PermissionModeSelect, i as SessionSurfacePanel, l as TranscriptVariantProvider, m as PermissionModeMeta, n as SessionPanel, o as TranscriptDensity, p as PermissionModeChoice, r as SessionPanelProps, s as TranscriptDensityProvider, t as SessionControls, u as useTranscriptDensity, v as permissionModeMeta } from "./SessionPanel-Dy9lQrOV.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,14 +15,14 @@ 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, ModelOption, PermissionRequest, ProfileEngine, QuestionBehavior, RateLimitInfo, SessionInfo, SessionStatus, SkillInfo, SlashCommandInfo, UserQuestion } from "@workerdeck/protocol";
|
|
18
|
+
import { ContextUsage, ModelOption, PermissionRequest, ProfileEngine, QuestionBehavior, RateLimitInfo, SessionInfo, SessionRow, SessionStatus, SkillInfo, SlashCommandInfo, 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";
|
|
22
22
|
|
|
23
23
|
//#region src/components/ui/Button.d.ts
|
|
24
24
|
declare const buttonVariants: (props?: ({
|
|
25
|
-
variant?: "default" | "
|
|
25
|
+
variant?: "default" | "link" | "outline" | "secondary" | "ghost" | "destructive" | null | undefined;
|
|
26
26
|
size?: "default" | "xs" | "sm" | "lg" | "icon" | "icon-sm" | null | undefined;
|
|
27
27
|
} & _$class_variance_authority_types0.ClassProp) | undefined) => string;
|
|
28
28
|
interface ButtonProps extends ButtonHTMLAttributes<HTMLButtonElement>, VariantProps<typeof buttonVariants> {}
|
|
@@ -736,6 +736,12 @@ interface TranscriptProps {
|
|
|
736
736
|
* vertical space is scarce. See {@link TranscriptVariant}.
|
|
737
737
|
*/
|
|
738
738
|
variant?: TranscriptVariant;
|
|
739
|
+
/**
|
|
740
|
+
* How much air each row gets: `comfortable` (default — a blank line between
|
|
741
|
+
* messages, as the Claude Code CLI does) or `compact`. Independent of
|
|
742
|
+
* {@link TranscriptVariant}. See {@link TranscriptDensity}.
|
|
743
|
+
*/
|
|
744
|
+
density?: TranscriptDensity;
|
|
739
745
|
/**
|
|
740
746
|
* Catch-up: `from` is how many items had been seen last time, `since` when
|
|
741
747
|
* that was. A recap row is drawn at that boundary and everything above it is
|
|
@@ -763,6 +769,7 @@ declare function Transcript({
|
|
|
763
769
|
canBrowseFiles,
|
|
764
770
|
hostImage,
|
|
765
771
|
variant,
|
|
772
|
+
density,
|
|
766
773
|
catchUp,
|
|
767
774
|
jumpToRecapRef,
|
|
768
775
|
className
|
|
@@ -874,9 +881,10 @@ interface LoaderProps {
|
|
|
874
881
|
/**
|
|
875
882
|
* "The agent is working and hasn't produced output yet."
|
|
876
883
|
*
|
|
877
|
-
* `lines`: a terminal working line —
|
|
878
|
-
* the readings that answer "should I still be
|
|
879
|
-
* `cards`: the three-dot pulse, unchanged
|
|
884
|
+
* `lines`: a terminal working line — the mark's own pulse in the gutter (see
|
|
885
|
+
* `pulse.tsx`), a verb, and the readings that answer "should I still be
|
|
886
|
+
* waiting?" in one parenthesis. `cards`: the three-dot pulse, unchanged — the
|
|
887
|
+
* dashboard's loader is not a gutter glyph and has no column to pulse in.
|
|
880
888
|
*/
|
|
881
889
|
declare function Loader({
|
|
882
890
|
label,
|
|
@@ -1349,6 +1357,58 @@ declare function SessionList({
|
|
|
1349
1357
|
className
|
|
1350
1358
|
}: SessionListProps): _$react.JSX.Element;
|
|
1351
1359
|
//#endregion
|
|
1360
|
+
//#region src/components/agent/SessionBrowser.d.ts
|
|
1361
|
+
/**
|
|
1362
|
+
* A sessions list with the affordances a list of thirty needs: search, facets,
|
|
1363
|
+
* grouping, sorting, unread counts, and one honest line about what is hidden.
|
|
1364
|
+
*
|
|
1365
|
+
* The *rules* are `@workerdeck/protocol`'s (`filterRows`/`groupRows`/
|
|
1366
|
+
* `subsetSummary`), not this component's — the VS Code sidebar renders the same
|
|
1367
|
+
* model with workbench chrome, its activity-bar badge counts the same rows this
|
|
1368
|
+
* would show, and iOS mirrors them in Swift. What lives here is the styled
|
|
1369
|
+
* rendering of that model, so a host that wants the dashboard's look gets it
|
|
1370
|
+
* without reimplementing the model behind it.
|
|
1371
|
+
*
|
|
1372
|
+
* `SessionList` remains beside this for the plain case (a fixed set of rows, no
|
|
1373
|
+
* controls); this is what you reach for when the list is the screen.
|
|
1374
|
+
*/
|
|
1375
|
+
interface SessionBrowserProps {
|
|
1376
|
+
rows: SessionRow[];
|
|
1377
|
+
config: ViewConfig;
|
|
1378
|
+
onConfigChange: (config: ViewConfig) => void;
|
|
1379
|
+
/** The host's own folders, if it has such a notion. Absent — a dashboard, a
|
|
1380
|
+
* phone — makes the scope filter genuinely inert rather than empty. */
|
|
1381
|
+
scope?: WorkspaceScope;
|
|
1382
|
+
activeId?: string;
|
|
1383
|
+
onSelect?: (row: SessionRow) => void;
|
|
1384
|
+
onDelete?: (row: SessionRow) => void;
|
|
1385
|
+
/**
|
|
1386
|
+
* Rename, from the row's pencil. Empty string restores the derived title. A
|
|
1387
|
+
* gateway edit (`PATCH /sessions/:id`), never a local override — every client
|
|
1388
|
+
* should see the same name. Omit to make titles read-only.
|
|
1389
|
+
*
|
|
1390
|
+
* A hover affordance rather than the extension's double-click-the-title,
|
|
1391
|
+
* because here a single click on the row navigates: the *first* click of a
|
|
1392
|
+
* double-click would have already left the page.
|
|
1393
|
+
*/
|
|
1394
|
+
onRename?: (row: SessionRow, title: string) => void;
|
|
1395
|
+
/** Rendered when nothing at all exists (as opposed to nothing matching). */
|
|
1396
|
+
emptyState?: React.ReactNode;
|
|
1397
|
+
className?: string;
|
|
1398
|
+
}
|
|
1399
|
+
declare function SessionBrowser({
|
|
1400
|
+
rows,
|
|
1401
|
+
config,
|
|
1402
|
+
onConfigChange,
|
|
1403
|
+
scope,
|
|
1404
|
+
activeId,
|
|
1405
|
+
onSelect,
|
|
1406
|
+
onDelete,
|
|
1407
|
+
onRename,
|
|
1408
|
+
emptyState,
|
|
1409
|
+
className
|
|
1410
|
+
}: SessionBrowserProps): _$react.JSX.Element;
|
|
1411
|
+
//#endregion
|
|
1352
1412
|
//#region src/components/agent/SessionEmptyState.d.ts
|
|
1353
1413
|
interface SessionEmptyStateProps {
|
|
1354
1414
|
cwd?: string;
|
|
@@ -1451,5 +1511,5 @@ declare function toolIcon(toolName: string): LucideIcon;
|
|
|
1451
1511
|
*/
|
|
1452
1512
|
declare function isMutatingTool(toolName: string): boolean;
|
|
1453
1513
|
//#endregion
|
|
1454
|
-
export { AlertDialog, AlertDialogClose, AlertDialogContent, AlertDialogDescription, AlertDialogTitle, AlertDialogTrigger, Badge, type BadgeProps, 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, CopyButton, type CopyButtonProps, Dialog, DialogBody, DialogClose, DialogContent, DialogHeader, DialogRow, DialogTrigger, FileCard, type FileCardProps, type FileDeliveredItem, HostFilesDialog, type HostFilesDialogProps, 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, STATUS_META, type Segment, Select, SelectContent, SelectItem, SelectItemText, SelectTrigger, SelectValue, type SessionControls, SessionEmptyState, type SessionEmptyStateProps, SessionInfoDialog, type SessionInfoDialogProps, SessionList, SessionListItem, type SessionListItemProps, type SessionListProps, SessionPanel, type SessionPanelProps, type SessionSurfacePanel, type SessionVitals, SkillsDialog, type SkillsDialogProps, Spinner, Splitter, type SplitterProps, StatusBar, type StatusBarProps, type TextSegment, Textarea, Tip, Toaster, ToolCallCard, type ToolCallCardProps, type ToolCallItem, TooltipContent, TooltipProvider, Transcript, type TranscriptProps, type TranscriptVariant, TranscriptVariantProvider, type TriggerConfig, type TriggerSuggestion, UsageDialog, type UsageDialogProps, badgeVariants, buttonVariants, cn, commandTrigger, copyText, formatAgoPrecise, formatBytes, formatCost, formatCountdown, formatDuration, formatRateLimitWindow, formatRateLimitWindowLong, formatRelativeTime, formatTokens, friendlyModel, getChipsByTrigger, hashtagTrigger, isMutatingTool, isSegmentsEmpty, mentionTrigger, parseUserQuestions, permissionModeChoices, permissionModeMeta, plainTextToSegments, rateLimitWindowSeconds, segmentsToPlainText, skillPrompt, toast, toolIcon, toolInputPreview, usePromptAreaState, useTranscriptVariant };
|
|
1514
|
+
export { AlertDialog, AlertDialogClose, AlertDialogContent, AlertDialogDescription, AlertDialogTitle, AlertDialogTrigger, Badge, type BadgeProps, 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, CopyButton, type CopyButtonProps, Dialog, DialogBody, DialogClose, DialogContent, DialogHeader, DialogRow, DialogTrigger, FileCard, type FileCardProps, type FileDeliveredItem, HostFilesDialog, type HostFilesDialogProps, 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, 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, type SessionSurfacePanel, type SessionVitals, SkillsDialog, type SkillsDialogProps, Spinner, Splitter, type SplitterProps, StatusBar, type StatusBarProps, type TextSegment, Textarea, Tip, Toaster, ToolCallCard, type ToolCallCardProps, type ToolCallItem, TooltipContent, TooltipProvider, Transcript, type TranscriptDensity, TranscriptDensityProvider, type TranscriptProps, type TranscriptVariant, TranscriptVariantProvider, type TriggerConfig, type TriggerSuggestion, UsageDialog, type UsageDialogProps, badgeVariants, buttonVariants, cn, commandTrigger, copyText, formatAgoPrecise, formatBytes, formatCost, formatCountdown, formatDuration, formatRateLimitWindow, formatRateLimitWindowLong, formatRelativeTime, formatTokens, friendlyModel, getChipsByTrigger, hashtagTrigger, isMutatingTool, isSegmentsEmpty, mentionTrigger, parseUserQuestions, permissionModeChoices, permissionModeMeta, plainTextToSegments, rateLimitWindowSeconds, segmentsToPlainText, skillPrompt, toast, toolIcon, toolInputPreview, usePromptAreaState, useTranscriptDensity, useTranscriptVariant };
|
|
1455
1515
|
//# sourceMappingURL=index.d.mts.map
|