@tangle-network/sandbox-ui 0.96.0 → 0.99.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/dist/{WorkflowGraph-OPLQFAJK.js → WorkflowGraph-DB5F6ZSF.js} +1 -1
- package/dist/chat.d.ts +83 -257
- package/dist/chat.js +1 -10
- package/dist/{chunk-I5HGKZCB.js → chunk-G7CFCZQ7.js} +860 -1382
- package/dist/{chunk-22JEBRUV.js → chunk-JIZCCGD2.js} +1 -1
- package/dist/{chunk-5XRAKVIV.js → chunk-RQZRXKMR.js} +1 -5
- package/dist/{chunk-VQZ6XDRR.js → chunk-Y4OTBMZS.js} +730 -444
- package/dist/dashboard.d.ts +8 -86
- package/dist/dashboard.js +8 -24
- package/dist/globals.css +20 -104
- package/dist/index.d.ts +4 -4
- package/dist/index.js +10 -32
- package/dist/{model-brand-CuXKfTMh.d.ts → model-brand-BNnaUKKZ.d.ts} +2 -4
- package/dist/pages.d.ts +1 -1
- package/dist/pages.js +1 -2
- package/dist/styles.css +20 -104
- package/dist/workbench.js +3 -5
- package/dist/workflows.d.ts +1 -1
- package/dist/workflows.js +2 -2
- package/dist/workspace.d.ts +1 -1
- package/package.json +2 -1
- package/dist/chunk-WMVUJ5SA.js +0 -529
- package/dist/chunk-WSN2RZC6.js +0 -292
package/dist/chat.d.ts
CHANGED
|
@@ -2,9 +2,8 @@ import { MessageRole } from '@tangle-network/ui/chat';
|
|
|
2
2
|
export { AgentTimeline, AgentTimelineArtifactItem, AgentTimelineCustomItem, AgentTimelineItem, AgentTimelineMessageItem, AgentTimelineProps, AgentTimelineStatusItem, AgentTimelineTone, AgentTimelineToolGroupItem, AgentTimelineToolItem, ChatContainer, ChatContainerProps, ChatMessage, ChatMessageProps, MessageList, MessageListProps, MessageRole, ThinkingIndicator, ThinkingIndicatorProps, UserMessage, UserMessageProps } from '@tangle-network/ui/chat';
|
|
3
3
|
import { ReasoningEffort, HarnessType } from '@tangle-network/agent-interface';
|
|
4
4
|
export { modelProvider, snapHarnessToModel } from '@tangle-network/agent-interface';
|
|
5
|
-
import * as
|
|
5
|
+
import * as DropdownMenu from '@radix-ui/react-dropdown-menu';
|
|
6
6
|
import * as React from 'react';
|
|
7
|
-
import { b as ModelInfo } from './model-brand-CuXKfTMh.js';
|
|
8
7
|
|
|
9
8
|
/**
|
|
10
9
|
* A reasoning selection: `auto` is a UI-only sentinel ("let the harness/model default decide",
|
|
@@ -35,7 +34,7 @@ interface ReasoningLevelPickerProps {
|
|
|
35
34
|
*/
|
|
36
35
|
available?: ReadonlyArray<ReasoningEffort>;
|
|
37
36
|
/** Side the menu opens toward. Defaults to Radix's "bottom". */
|
|
38
|
-
side?:
|
|
37
|
+
side?: DropdownMenu.DropdownMenuContentProps["side"];
|
|
39
38
|
/**
|
|
40
39
|
* Let Radix flip the menu to the opposite side when it would overflow the
|
|
41
40
|
* viewport. Defaults to `true` (Radix default). Pass `false` to pin the menu
|
|
@@ -58,225 +57,6 @@ declare const DEFAULT_REASONING_LEVEL_OPTIONS: ReadonlyArray<ReasoningLevelOptio
|
|
|
58
57
|
declare const HARNESS_REASONING_OPTIONS: Partial<Record<HarnessType, ReadonlyArray<ReasoningLevelOption>>>;
|
|
59
58
|
declare function ReasoningLevelPicker({ value, onChange, disabled, className, triggerClassName, options, available, side, avoidCollisions, }: ReasoningLevelPickerProps): React.JSX.Element;
|
|
60
59
|
|
|
61
|
-
/**
|
|
62
|
-
* An agent profile: a named bundle of toolset + persona layered over the same
|
|
63
|
-
* model and session. `builtin` profiles are the product's shipped modes (e.g.
|
|
64
|
-
* Studio / Assistant); the rest are user-saved custom agents. The concept is
|
|
65
|
-
* backend-agnostic — it applies to a router-backed agent and a sandbox-backed
|
|
66
|
-
* one alike, which is why it lives beside the model control rather than under
|
|
67
|
-
* the harness.
|
|
68
|
-
*/
|
|
69
|
-
interface AgentProfileOption {
|
|
70
|
-
id: string;
|
|
71
|
-
name: string;
|
|
72
|
-
/** Builtin: a one-line description. Custom: derived "N tools" if omitted. */
|
|
73
|
-
description?: string;
|
|
74
|
-
/** Capability/tool-group ids this profile enables. */
|
|
75
|
-
capabilities?: ReadonlyArray<string>;
|
|
76
|
-
/** Persona / extra system instructions. */
|
|
77
|
-
instructions?: string;
|
|
78
|
-
/** A shipped mode vs a user-saved custom agent. */
|
|
79
|
-
builtin?: boolean;
|
|
80
|
-
}
|
|
81
|
-
/** A selectable tool group offered by the create/edit form. */
|
|
82
|
-
interface AgentProfileCapability {
|
|
83
|
-
id: string;
|
|
84
|
-
label: string;
|
|
85
|
-
description?: string;
|
|
86
|
-
}
|
|
87
|
-
/** The editable shape the create/edit form emits. */
|
|
88
|
-
interface AgentProfileDraft {
|
|
89
|
-
id?: string;
|
|
90
|
-
name: string;
|
|
91
|
-
capabilities: string[];
|
|
92
|
-
instructions: string;
|
|
93
|
-
}
|
|
94
|
-
interface AgentProfilePickerProps {
|
|
95
|
-
/** Selected profile id. */
|
|
96
|
-
value: string;
|
|
97
|
-
onChange: (id: string) => void;
|
|
98
|
-
profiles: ReadonlyArray<AgentProfileOption>;
|
|
99
|
-
/**
|
|
100
|
-
* Tool catalog for the create/edit form. Provide together with at least one
|
|
101
|
-
* write callback to enable authoring custom agents; omit for a
|
|
102
|
-
* selection-only picker (the New / edit / delete affordances stay hidden).
|
|
103
|
-
*/
|
|
104
|
-
capabilities?: ReadonlyArray<AgentProfileCapability>;
|
|
105
|
-
onCreate?: (draft: AgentProfileDraft) => void | Promise<void>;
|
|
106
|
-
onUpdate?: (id: string, draft: AgentProfileDraft) => void | Promise<void>;
|
|
107
|
-
onDelete?: (id: string) => void | Promise<void>;
|
|
108
|
-
disabled?: boolean;
|
|
109
|
-
className?: string;
|
|
110
|
-
/** Side the menu opens toward. Defaults to up (composer-anchored). */
|
|
111
|
-
side?: "top" | "bottom";
|
|
112
|
-
}
|
|
113
|
-
/**
|
|
114
|
-
* Agent / mode switcher styled to match the chat control strip's pills
|
|
115
|
-
* (harness, model, effort). The pill shows the active profile; the menu lists
|
|
116
|
-
* builtin modes and saved custom agents. When a capability catalog and a write
|
|
117
|
-
* callback are supplied it also authors agents inline (name + tool toggles +
|
|
118
|
-
* persona) — a self-contained click-outside popover rather than a Radix menu,
|
|
119
|
-
* because the inline form needs its own focus and typing without the menu
|
|
120
|
-
* stealing keystrokes.
|
|
121
|
-
*/
|
|
122
|
-
declare function AgentProfilePicker({ value, onChange, profiles, capabilities, onCreate, onUpdate, onDelete, disabled, className, side, }: AgentProfilePickerProps): React.JSX.Element;
|
|
123
|
-
|
|
124
|
-
interface AgentSessionHarnessControl {
|
|
125
|
-
value: HarnessType;
|
|
126
|
-
onChange: (next: HarnessType) => void;
|
|
127
|
-
/** Filter the selectable harnesses (e.g. by plan tier). Defaults to all. */
|
|
128
|
-
available?: ReadonlyArray<HarnessType>;
|
|
129
|
-
disabled?: boolean;
|
|
130
|
-
/**
|
|
131
|
-
* A harness is bound to its chat session once the conversation has
|
|
132
|
-
* started. While locked the dropdown is inert and the model catalog
|
|
133
|
-
* is filtered to what this harness can run — fork the session to
|
|
134
|
-
* switch harness.
|
|
135
|
-
*/
|
|
136
|
-
locked?: boolean;
|
|
137
|
-
/** Tooltip shown on the locked trigger when no `onNewChat` is provided. */
|
|
138
|
-
lockReason?: string;
|
|
139
|
-
/**
|
|
140
|
-
* Fork action for a locked harness. When provided, the locked trigger turns
|
|
141
|
-
* into an informative chip: hover or tap opens a small popover explaining the
|
|
142
|
-
* lock and offering a button that calls this to start a fresh session. When
|
|
143
|
-
* omitted, the locked trigger stays a plain inert button with `lockReason`.
|
|
144
|
-
*/
|
|
145
|
-
onNewChat?: () => void;
|
|
146
|
-
/** Popover heading. Defaults to `Agent fixed to {harness} for this conversation.` */
|
|
147
|
-
lockTitle?: React.ReactNode;
|
|
148
|
-
/** Popover sub-line. Defaults to "Conversations stay on one agent." */
|
|
149
|
-
lockBody?: React.ReactNode;
|
|
150
|
-
/** Fork button label. Defaults to "New chat to switch agent". */
|
|
151
|
-
newChatLabel?: string;
|
|
152
|
-
}
|
|
153
|
-
interface AgentSessionModelControl {
|
|
154
|
-
/** Canonical model id (provider-prefixed, e.g. "anthropic/claude-opus-4-8"). */
|
|
155
|
-
value: string;
|
|
156
|
-
onChange: (modelId: string) => void;
|
|
157
|
-
/** Models to choose from. Pass `[]` while loading. */
|
|
158
|
-
models: ModelInfo[];
|
|
159
|
-
loading?: boolean;
|
|
160
|
-
popular?: ReadonlyArray<string>;
|
|
161
|
-
recents?: ReadonlyArray<string>;
|
|
162
|
-
disabled?: boolean;
|
|
163
|
-
/**
|
|
164
|
-
* Restrict the catalog to these architecture modalities (forwarded to
|
|
165
|
-
* `ModelPicker`'s `modalities`). Supplying this — even `[]` — replaces the
|
|
166
|
-
* chat surface's default text-chat filter: the caller owns modality
|
|
167
|
-
* filtering entirely.
|
|
168
|
-
*/
|
|
169
|
-
modalities?: ReadonlyArray<string>;
|
|
170
|
-
/** Drop providers from the picker entirely (forwarded to `ModelPicker`). */
|
|
171
|
-
excludeProviders?: ReadonlyArray<string>;
|
|
172
|
-
}
|
|
173
|
-
interface AgentSessionReasoningControl {
|
|
174
|
-
value: ReasoningLevel;
|
|
175
|
-
onChange: (value: ReasoningLevel) => void;
|
|
176
|
-
options?: ReadonlyArray<ReasoningLevelOption>;
|
|
177
|
-
disabled?: boolean;
|
|
178
|
-
/**
|
|
179
|
-
* Reasoning efforts to offer when no harness is selected (e.g. a model-derived capability set).
|
|
180
|
-
* When a harness IS present the strip derives this from `reasoningEffortsFor(harness)` instead.
|
|
181
|
-
*/
|
|
182
|
-
available?: ReadonlyArray<ReasoningEffort>;
|
|
183
|
-
}
|
|
184
|
-
/**
|
|
185
|
-
* Agent-profile (mode / toolset / persona) selection. Backend-agnostic — it
|
|
186
|
-
* sits beside the model in both router-backed and sandbox-backed modes, so the
|
|
187
|
-
* same session can switch the agent's identity without touching the harness.
|
|
188
|
-
*/
|
|
189
|
-
interface AgentSessionProfileControl {
|
|
190
|
-
value: string;
|
|
191
|
-
onChange: (id: string) => void;
|
|
192
|
-
profiles: ReadonlyArray<AgentProfileOption>;
|
|
193
|
-
/** Tool catalog for inline authoring; pair with a write callback to enable it. */
|
|
194
|
-
capabilities?: ReadonlyArray<AgentProfileCapability>;
|
|
195
|
-
onCreate?: (draft: AgentProfileDraft) => void | Promise<void>;
|
|
196
|
-
onUpdate?: (id: string, draft: AgentProfileDraft) => void | Promise<void>;
|
|
197
|
-
onDelete?: (id: string) => void | Promise<void>;
|
|
198
|
-
disabled?: boolean;
|
|
199
|
-
}
|
|
200
|
-
interface AgentSessionControlsProps {
|
|
201
|
-
/**
|
|
202
|
-
* Harness (agent backend) selection. Switching harness usually means
|
|
203
|
-
* re-creating the agent session — the consumer owns that lifecycle.
|
|
204
|
-
*/
|
|
205
|
-
harness?: AgentSessionHarnessControl;
|
|
206
|
-
/**
|
|
207
|
-
* Agent profile (mode / toolset / persona). Universal — present in both
|
|
208
|
-
* router-backed and sandbox-backed composers, independent of the harness.
|
|
209
|
-
*/
|
|
210
|
-
profile?: AgentSessionProfileControl;
|
|
211
|
-
/** Per-turn model override, fed by the router's model catalog. */
|
|
212
|
-
model?: AgentSessionModelControl;
|
|
213
|
-
/** Thinking-effort level applied to subsequent turns. */
|
|
214
|
-
reasoning?: AgentSessionReasoningControl;
|
|
215
|
-
/**
|
|
216
|
-
* Restrict the model catalog to what the selected harness can actually run,
|
|
217
|
-
* the same way `harness.locked` does — but WITHOUT locking the harness
|
|
218
|
-
* dropdown. Off by default: the strip shows every model and picking an
|
|
219
|
-
* incompatible one snaps the harness to the model's native backend. Turn it
|
|
220
|
-
* ON for a harness-first surface (e.g. a workspace-wide, sandbox-bound
|
|
221
|
-
* harness) where that silent backend swap is undesirable — an incompatible
|
|
222
|
-
* model is then simply not offered.
|
|
223
|
-
*/
|
|
224
|
-
filterModelsToHarness?: boolean;
|
|
225
|
-
/** Right-aligned extra content (token meter, cost, status). */
|
|
226
|
-
trailing?: React.ReactNode;
|
|
227
|
-
className?: string;
|
|
228
|
-
/**
|
|
229
|
-
* Which surface these controls live on. `"chat"` (default) restricts the
|
|
230
|
-
* harness list to chat-capable backends — shell-only `cli-base` is hidden
|
|
231
|
-
* because it has no conversational agent. `"all"` keeps every harness for
|
|
232
|
-
* scheduled / non-chat surfaces. An explicit `harness.available` list still
|
|
233
|
-
* wins; this only trims the default-everything set.
|
|
234
|
-
*/
|
|
235
|
-
context?: "chat" | "all";
|
|
236
|
-
/**
|
|
237
|
-
* Trigger layout. `"inline"` (default) lays the pickers out in a row — the
|
|
238
|
-
* existing behavior. `"gear"` collapses them behind a single compact gear
|
|
239
|
-
* button whose menu opens up-and-left, for right-anchored copilots where
|
|
240
|
-
* the composer is tight. Nested model/harness/effort menus render adjacent
|
|
241
|
-
* on the left of the gear menu. `"combined"` is the gear layout with a
|
|
242
|
-
* labeled trigger instead of the anonymous icon: the button summarizes the
|
|
243
|
-
* current selection as text (`harness · model · effort`) so the choice stays
|
|
244
|
-
* visible without opening the menu — for a composer that wants one compact
|
|
245
|
-
* agent control it can read at a glance.
|
|
246
|
-
*/
|
|
247
|
-
layout?: "inline" | "gear" | "combined";
|
|
248
|
-
/**
|
|
249
|
-
* Where the pickers open. `"auto"` (default) keeps Radix's collision-aware
|
|
250
|
-
* behavior: the menus open downward but flip up when the composer is docked
|
|
251
|
-
* at the bottom of the viewport. `"down"` pins them open downward — for a
|
|
252
|
-
* composer floating in open space (e.g. a centered new-chat surface) where
|
|
253
|
-
* flipping up would cover the heading. Honored by the `"inline"` strip (its
|
|
254
|
-
* nested pickers) and by the `"combined"` panel (which opens downward instead
|
|
255
|
-
* of upward); the `"gear"` menu keeps its own placement.
|
|
256
|
-
*/
|
|
257
|
-
menuPlacement?: "auto" | "down";
|
|
258
|
-
}
|
|
259
|
-
/**
|
|
260
|
-
* Compact control strip for an agent chat composer: harness, model, and
|
|
261
|
-
* thinking-effort pickers in one row. Every section is optional and only
|
|
262
|
-
* renders when its control object is provided — never show a dead control.
|
|
263
|
-
*
|
|
264
|
-
* When BOTH harness and model controls are present the pair is kept
|
|
265
|
-
* coherent automatically (see harness-model-compat): picking a harness
|
|
266
|
-
* snaps an incompatible model to that harness's best catalog option;
|
|
267
|
-
* picking a model the current harness can't run switches to the model's
|
|
268
|
-
* native harness — unless the catalog is restricted to the harness (when
|
|
269
|
-
* `locked`, or the consumer sets `filterModelsToHarness`), in which case the
|
|
270
|
-
* incompatible model is never offered and no swap happens.
|
|
271
|
-
*
|
|
272
|
-
* When a reasoning control is also present, the effort is re-clamped into the
|
|
273
|
-
* set the new (harness, model) pair supports on every harness/model change, so
|
|
274
|
-
* the effort picker's label never disagrees with the value actually in effect.
|
|
275
|
-
*
|
|
276
|
-
* Designed to slot into `SandboxWorkbench`'s `session.composerControls`.
|
|
277
|
-
*/
|
|
278
|
-
declare function AgentSessionControls({ harness, profile, model, reasoning, filterModelsToHarness, trailing, className, context, layout, menuPlacement, }: AgentSessionControlsProps): React.JSX.Element | null;
|
|
279
|
-
|
|
280
60
|
/** Limits applied when staging files onto a composer. */
|
|
281
61
|
interface ComposerFileValidationConfig {
|
|
282
62
|
/** Reject any single file larger than this. */
|
|
@@ -382,23 +162,13 @@ interface AgentComposerProps {
|
|
|
382
162
|
/** Stop the in-flight turn. With `busy`, replaces send with a Stop button. */
|
|
383
163
|
onCancel?: () => void;
|
|
384
164
|
/**
|
|
385
|
-
*
|
|
386
|
-
*
|
|
165
|
+
* The composer's control strip (profile · harness · model · effort pickers,
|
|
166
|
+
* token meters, …), rendered in the bottom row. Required — the legacy
|
|
167
|
+
* built-in strip was removed with the legacy pickers: pass
|
|
168
|
+
* `AgentSessionControls` from `@tangle-network/agent-app/web-react` (or your
|
|
169
|
+
* own composition), or `null` for a bare composer.
|
|
387
170
|
*/
|
|
388
|
-
|
|
389
|
-
/** Agent profile (mode / toolset / persona) — universal across both modes. */
|
|
390
|
-
profile?: AgentSessionProfileControl;
|
|
391
|
-
model?: AgentSessionModelControl;
|
|
392
|
-
reasoning?: AgentSessionReasoningControl;
|
|
393
|
-
/** Forwarded to the control strip (chat hides shell-only harnesses). */
|
|
394
|
-
context?: "chat" | "all";
|
|
395
|
-
/**
|
|
396
|
-
* Override the built-in control strip with custom controls. When set, the
|
|
397
|
-
* `harness`/`profile`/`model`/`reasoning` props are ignored and this node is
|
|
398
|
-
* rendered in the control row instead — for apps that compose their own
|
|
399
|
-
* pickers. Omit to use the canonical strip.
|
|
400
|
-
*/
|
|
401
|
-
controls?: React.ReactNode;
|
|
171
|
+
controls: React.ReactNode;
|
|
402
172
|
/** Extra content left of the send button (token meter, cost, status). */
|
|
403
173
|
trailing?: React.ReactNode;
|
|
404
174
|
/**
|
|
@@ -465,20 +235,18 @@ interface AgentComposerProps {
|
|
|
465
235
|
/**
|
|
466
236
|
* The canonical agent chat input: one rounded surface holding an auto-growing
|
|
467
237
|
* textarea and a bottom row that runs left → right — attach buttons, the
|
|
468
|
-
*
|
|
469
|
-
* and the send button on the far right. The strip
|
|
470
|
-
*
|
|
471
|
-
*
|
|
472
|
-
* router-backed composer (no harness) and the sandbox-backed one (with harness).
|
|
238
|
+
* control strip (supplied via the required `controls` prop), trailing slot,
|
|
239
|
+
* and the send button on the far right. The strip is explicit: the canonical
|
|
240
|
+
* pickers are `ModelPicker` / `EffortPicker` / `AgentSessionControls` from
|
|
241
|
+
* `@tangle-network/agent-app/web-react` — this component only owns the slot.
|
|
473
242
|
*
|
|
474
243
|
* Opt-in extras make it the superset of every app's hand-rolled composer:
|
|
475
244
|
* file/folder attachments with drag-and-drop + chips + clipboard paste
|
|
476
245
|
* (`onAttach` also gates pasting files onto the textarea, auto-naming
|
|
477
246
|
* generic clipboard image blobs `pasted-image-<n>.<ext>`), a streaming Stop
|
|
478
|
-
* button (`busy` + `onCancel`), a
|
|
479
|
-
* picker rows, and a Cmd/Ctrl+L focus shortcut.
|
|
247
|
+
* button (`busy` + `onCancel`), and a Cmd/Ctrl+L focus shortcut.
|
|
480
248
|
*/
|
|
481
|
-
declare function AgentComposer({ value, onChange, onSubmit, placeholder, disabled, busy, onCancel,
|
|
249
|
+
declare function AgentComposer({ value, onChange, onSubmit, placeholder, disabled, busy, onCancel, controls, trailing, onAttach, onAttachFolder, attachments, onRemoveFile, onRetryFile, accept, onRejectFiles, dropTitle, dropDescription, canSubmitWhileBusy, canSubmitAttachmentsOnly, mention, focusShortcut, minRows, maxHeight, className, sendLabel, autoFocus, }: AgentComposerProps): React.JSX.Element;
|
|
482
250
|
|
|
483
251
|
/**
|
|
484
252
|
* Visual contract for a rendered mention pill. The TipTap editor extension in
|
|
@@ -492,19 +260,77 @@ declare function AgentComposer({ value, onChange, onSubmit, placeholder, disable
|
|
|
492
260
|
declare const MENTION_PILL_CLASS: string;
|
|
493
261
|
|
|
494
262
|
/**
|
|
495
|
-
*
|
|
496
|
-
*
|
|
497
|
-
*
|
|
263
|
+
* An agent profile: a named bundle of toolset + persona layered over the same
|
|
264
|
+
* model and session. `builtin` profiles are the product's shipped modes (e.g.
|
|
265
|
+
* Studio / Assistant); the rest are user-saved custom agents. The concept is
|
|
266
|
+
* backend-agnostic — it applies to a router-backed agent and a sandbox-backed
|
|
267
|
+
* one alike, which is why it lives beside the model control rather than under
|
|
268
|
+
* the harness.
|
|
498
269
|
*/
|
|
499
|
-
|
|
270
|
+
interface AgentProfileOption {
|
|
271
|
+
id: string;
|
|
272
|
+
name: string;
|
|
273
|
+
/** Builtin: a one-line description. Custom: derived "N tools" if omitted. */
|
|
274
|
+
description?: string;
|
|
275
|
+
/** Capability/tool-group ids this profile enables. */
|
|
276
|
+
capabilities?: ReadonlyArray<string>;
|
|
277
|
+
/** Persona / extra system instructions. */
|
|
278
|
+
instructions?: string;
|
|
279
|
+
/** A shipped mode vs a user-saved custom agent. */
|
|
280
|
+
builtin?: boolean;
|
|
281
|
+
}
|
|
282
|
+
/** A selectable tool group offered by the create/edit form. */
|
|
283
|
+
interface AgentProfileCapability {
|
|
284
|
+
id: string;
|
|
285
|
+
label: string;
|
|
286
|
+
description?: string;
|
|
287
|
+
}
|
|
288
|
+
/** The editable shape the create/edit form emits. */
|
|
289
|
+
interface AgentProfileDraft {
|
|
290
|
+
id?: string;
|
|
291
|
+
name: string;
|
|
292
|
+
capabilities: string[];
|
|
293
|
+
instructions: string;
|
|
294
|
+
}
|
|
295
|
+
interface AgentProfilePickerProps {
|
|
296
|
+
/** Selected profile id. */
|
|
297
|
+
value: string;
|
|
298
|
+
onChange: (id: string) => void;
|
|
299
|
+
profiles: ReadonlyArray<AgentProfileOption>;
|
|
300
|
+
/**
|
|
301
|
+
* Tool catalog for the create/edit form. Provide together with at least one
|
|
302
|
+
* write callback to enable authoring custom agents; omit for a
|
|
303
|
+
* selection-only picker (the New / edit / delete affordances stay hidden).
|
|
304
|
+
*/
|
|
305
|
+
capabilities?: ReadonlyArray<AgentProfileCapability>;
|
|
306
|
+
onCreate?: (draft: AgentProfileDraft) => void | Promise<void>;
|
|
307
|
+
onUpdate?: (id: string, draft: AgentProfileDraft) => void | Promise<void>;
|
|
308
|
+
onDelete?: (id: string) => void | Promise<void>;
|
|
309
|
+
disabled?: boolean;
|
|
310
|
+
/** Keep the pinned profile visible while preventing profile selection. */
|
|
311
|
+
locked?: boolean;
|
|
312
|
+
/** Tooltip shown on the locked trigger when no `onNewChat` is provided. */
|
|
313
|
+
lockReason?: string;
|
|
314
|
+
/** Offer a fresh chat from the informative lock popover. */
|
|
315
|
+
onNewChat?: () => void;
|
|
316
|
+
className?: string;
|
|
317
|
+
/** Additional classes for the picker trigger. */
|
|
318
|
+
triggerClassName?: string;
|
|
319
|
+
/** Additional classes for the profile popover. */
|
|
320
|
+
popoverClassName?: string;
|
|
321
|
+
/** Side the menu opens toward. Defaults to up (composer-anchored). */
|
|
322
|
+
side?: "top" | "bottom";
|
|
323
|
+
}
|
|
500
324
|
/**
|
|
501
|
-
*
|
|
502
|
-
*
|
|
503
|
-
*
|
|
504
|
-
*
|
|
505
|
-
*
|
|
325
|
+
* Agent / mode switcher styled to match the chat control strip's pills
|
|
326
|
+
* (harness, model, effort). The pill shows the active profile; the menu lists
|
|
327
|
+
* builtin modes and saved custom agents. When a capability catalog and a write
|
|
328
|
+
* callback are supplied it also authors agents inline (name + tool toggles +
|
|
329
|
+
* persona) — a self-contained click-outside popover rather than a Radix menu,
|
|
330
|
+
* because the inline form needs its own focus and typing without the menu
|
|
331
|
+
* stealing keystrokes.
|
|
506
332
|
*/
|
|
507
|
-
declare function
|
|
333
|
+
declare function AgentProfilePicker({ value, onChange, profiles, capabilities, onCreate, onUpdate, onDelete, disabled, locked, lockReason, onNewChat, className, triggerClassName, popoverClassName, side, }: AgentProfilePickerProps): React.JSX.Element;
|
|
508
334
|
|
|
509
335
|
type ArtifactKind = string;
|
|
510
336
|
interface ArtifactScope {
|
|
@@ -603,4 +429,4 @@ declare function createFetchTransport(opts: {
|
|
|
603
429
|
fetchImpl?: typeof fetch;
|
|
604
430
|
}): ArtifactAgentDockTransport;
|
|
605
431
|
|
|
606
|
-
export { AgentComposer, type AgentComposerMention, type AgentComposerProps, type AgentProfileCapability, type AgentProfileDraft, type AgentProfileOption, AgentProfilePicker, type AgentProfilePickerProps,
|
|
432
|
+
export { AgentComposer, type AgentComposerMention, type AgentComposerProps, type AgentProfileCapability, type AgentProfileDraft, type AgentProfileOption, AgentProfilePicker, type AgentProfilePickerProps, ArtifactAgentDock, type ArtifactAgentDockProps, type ArtifactAgentDockTransport, type ArtifactDockMessage, type ArtifactDockStreamEvent, type ArtifactKind, type ArtifactScope, type ComposerFile, type ComposerFileRejection, type ComposerFileValidationConfig, DEFAULT_REASONING_LEVEL_OPTIONS, HARNESS_REASONING_OPTIONS, MENTION_PILL_CLASS, type MentionItem, type ReasoningLevel, type ReasoningLevelOption, ReasoningLevelPicker, type ReasoningLevelPickerProps, createFetchTransport, isAcceptedType, validateComposerFiles };
|
package/dist/chat.js
CHANGED
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import {
|
|
2
2
|
AgentComposer,
|
|
3
3
|
AgentProfilePicker,
|
|
4
|
-
AgentSessionControls,
|
|
5
4
|
AgentTimeline,
|
|
6
5
|
ArtifactAgentDock,
|
|
7
6
|
ChatContainer,
|
|
@@ -14,25 +13,19 @@ import {
|
|
|
14
13
|
UserMessage,
|
|
15
14
|
createFetchTransport,
|
|
16
15
|
isAcceptedType,
|
|
17
|
-
isModelCompatibleWithHarness,
|
|
18
16
|
modelProvider,
|
|
19
17
|
snapHarnessToModel,
|
|
20
|
-
snapModelToHarness,
|
|
21
18
|
validateComposerFiles
|
|
22
|
-
} from "./chunk-
|
|
19
|
+
} from "./chunk-G7CFCZQ7.js";
|
|
23
20
|
import "./chunk-TK46XFLM.js";
|
|
24
21
|
import {
|
|
25
22
|
MENTION_PILL_CLASS
|
|
26
23
|
} from "./chunk-WGOOQAW3.js";
|
|
27
|
-
import "./chunk-WSN2RZC6.js";
|
|
28
|
-
import "./chunk-WMVUJ5SA.js";
|
|
29
|
-
import "./chunk-5XRAKVIV.js";
|
|
30
24
|
import "./chunk-EI44GEQ5.js";
|
|
31
25
|
import "./chunk-CZ7CSFO4.js";
|
|
32
26
|
export {
|
|
33
27
|
AgentComposer,
|
|
34
28
|
AgentProfilePicker,
|
|
35
|
-
AgentSessionControls,
|
|
36
29
|
AgentTimeline,
|
|
37
30
|
ArtifactAgentDock,
|
|
38
31
|
ChatContainer,
|
|
@@ -46,9 +39,7 @@ export {
|
|
|
46
39
|
UserMessage,
|
|
47
40
|
createFetchTransport,
|
|
48
41
|
isAcceptedType,
|
|
49
|
-
isModelCompatibleWithHarness,
|
|
50
42
|
modelProvider,
|
|
51
43
|
snapHarnessToModel,
|
|
52
|
-
snapModelToHarness,
|
|
53
44
|
validateComposerFiles
|
|
54
45
|
};
|