@tangle-network/agent-app 0.45.13 → 0.45.14
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +4 -2
- package/dist/chat-react/index.d.ts +58 -12
- package/dist/chat-react/index.js +96 -38
- package/dist/chat-react/index.js.map +1 -1
- package/dist/design-canvas-react/index.js +4 -4
- package/dist/workspace-react/index.d.ts +89 -0
- package/dist/workspace-react/index.js +82 -0
- package/dist/workspace-react/index.js.map +1 -0
- package/package.json +6 -1
package/README.md
CHANGED
|
@@ -42,7 +42,7 @@ pnpm add @tangle-network/agent-eval @tangle-network/agent-integrations
|
|
|
42
42
|
| `@tangle-network/sandbox` | `/sandbox` | `>=0.15.2` |
|
|
43
43
|
| `@tangle-network/agent-knowledge` | `/knowledge-loop` | `>=6.1.11` |
|
|
44
44
|
| `@tangle-network/agent-profile-materialize` | `/skills-placement` | `>=0.9.2` |
|
|
45
|
-
| `@tangle-network/sandbox-ui` | `/brand`, `/studio-react`, `/work-product-react` | `>=0.91.5` |
|
|
45
|
+
| `@tangle-network/sandbox-ui` | `/brand`, `/studio-react`, `/work-product-react`, `/workspace-react` | `>=0.91.5` |
|
|
46
46
|
|
|
47
47
|
All of these except `agent-eval`, `agent-integrations`, and `agent-interface` are declared **optional** peers, so a product that never imports the subpath installs nothing.
|
|
48
48
|
|
|
@@ -155,7 +155,9 @@ The **complete, always-current reference** — every published subpath, its expo
|
|
|
155
155
|
- [`/missions`](src/missions) — durable multi-step orchestration: sequencing, budgets, approval gates, schedules.
|
|
156
156
|
|
|
157
157
|
**React surfaces**
|
|
158
|
-
- [`/
|
|
158
|
+
- [`/workspace-react`](src/workspace-react) — the default chat-first outer workspace composition: shared sidebar, session rail, and active-route wiring.
|
|
159
|
+
- [`/web-react`](src/web-react) — router-safe chat, history, and observability components (never imports sandbox-only UI).
|
|
160
|
+
- [`/chat-react`](src/chat-react) — the sandbox-ui-backed new-session composer and shared profile, backend, model, thinking, plan-mode, attachment, and mention controls.
|
|
159
161
|
|
|
160
162
|
**Utilities (zero-dependency)**
|
|
161
163
|
- [`/web`](src/web) · [`/stream`](src/stream) · [`/crypto`](src/crypto) · [`/redact`](src/redact) — request boundary, SSE normalization, field crypto, PII redaction.
|
|
@@ -1,14 +1,29 @@
|
|
|
1
1
|
import * as react from 'react';
|
|
2
2
|
import { ReactNode } from 'react';
|
|
3
|
+
import { AgentSessionProfileControl, ReasoningLevel, AgentComposer } from '@tangle-network/sandbox-ui/chat';
|
|
4
|
+
export { AgentProfileCapability, AgentProfileDraft, AgentProfileOption, ReasoningLevel } from '@tangle-network/sandbox-ui/chat';
|
|
3
5
|
import { ModelInfo, HarnessType } from '@tangle-network/sandbox-ui/dashboard';
|
|
4
|
-
export { HarnessType } from '@tangle-network/sandbox-ui/dashboard';
|
|
5
|
-
import { ReasoningLevel, AgentComposer } from '@tangle-network/sandbox-ui/chat';
|
|
6
|
-
export { ReasoningLevel } from '@tangle-network/sandbox-ui/chat';
|
|
6
|
+
export { HarnessType, ModelInfo } from '@tangle-network/sandbox-ui/dashboard';
|
|
7
7
|
import { ReasoningEffort } from '@tangle-network/agent-interface';
|
|
8
8
|
export { ReasoningEffort } from '@tangle-network/agent-interface';
|
|
9
9
|
import { U as UseFileMentionsResult } from '../use-file-mentions-CZ-Ua_sb.js';
|
|
10
10
|
import { b as ChatAttachmentInput, F as FileMention } from '../wire-DOZ-O6hD.js';
|
|
11
11
|
|
|
12
|
+
/**
|
|
13
|
+
* The vocabulary the composer surfaces speak, re-exported from the packages that
|
|
14
|
+
* OWN it rather than redefined here — a second spelling of `HarnessType` is how
|
|
15
|
+
* two products end up disagreeing about what a backend is called.
|
|
16
|
+
*
|
|
17
|
+
* `HarnessType` is agent-interface's enum surfaced through sandbox-ui's picker;
|
|
18
|
+
* `ReasoningLevel` is sandbox-ui's `auto | ReasoningEffort` union.
|
|
19
|
+
*/
|
|
20
|
+
|
|
21
|
+
interface ComposerPlanModeSelection {
|
|
22
|
+
enabled: boolean;
|
|
23
|
+
setEnabled: (next: boolean) => void;
|
|
24
|
+
saving?: boolean;
|
|
25
|
+
}
|
|
26
|
+
|
|
12
27
|
/**
|
|
13
28
|
* The model half of the composer's agent identity. `models` is the catalog the
|
|
14
29
|
* picker renders; `value` may be a bare or a canonical (provider-prefixed) id —
|
|
@@ -50,11 +65,19 @@ interface ComposerEffortSelection {
|
|
|
50
65
|
available?: ReadonlyArray<ReasoningEffort>;
|
|
51
66
|
disabled?: boolean;
|
|
52
67
|
}
|
|
68
|
+
/**
|
|
69
|
+
* A selectable named bundle of persona and tool groups. The product resolves
|
|
70
|
+
* the selected id to the runtime AgentProfile before creating or continuing a
|
|
71
|
+
* session; the composer only needs the display catalog and persistence hooks.
|
|
72
|
+
*/
|
|
73
|
+
type ComposerProfileSelection = AgentSessionProfileControl;
|
|
53
74
|
interface ComposerAgentControlsProps {
|
|
54
75
|
model: ComposerModelSelection;
|
|
55
76
|
/** Omit on a router-backed composer: a direct model call has no CLI backend,
|
|
56
77
|
* so the picker would be inert. Model + effort still render. */
|
|
57
78
|
harness?: ComposerHarnessSelection;
|
|
79
|
+
/** Universal named agent profile: persona + tool groups, independent of backend. */
|
|
80
|
+
profile?: ComposerProfileSelection;
|
|
58
81
|
effort?: ComposerEffortSelection;
|
|
59
82
|
className?: string;
|
|
60
83
|
/**
|
|
@@ -67,12 +90,15 @@ interface ComposerAgentControlsProps {
|
|
|
67
90
|
*/
|
|
68
91
|
context?: 'chat' | 'all';
|
|
69
92
|
/**
|
|
70
|
-
* Trigger layout. `'
|
|
93
|
+
* Trigger layout. `'responsive'` (the default) lays the pickers out in a
|
|
94
|
+
* row on wider screens and uses a compact gear on narrow screens. `'combined'`
|
|
95
|
+
* collapses the pickers behind one
|
|
71
96
|
* labeled trigger reading the current selection (`harness · model · effort`).
|
|
72
97
|
* `'gear'` uses an anonymous gear icon instead of the label; `'inline'` lays
|
|
73
|
-
* the pickers out in a row.
|
|
98
|
+
* the pickers out in a row. `'responsive'` uses the labeled trigger on wider
|
|
99
|
+
* screens and the compact gear on narrow screens so Send stays reachable.
|
|
74
100
|
*/
|
|
75
|
-
layout?: 'inline' | 'gear' | 'combined';
|
|
101
|
+
layout?: 'inline' | 'gear' | 'combined' | 'responsive';
|
|
76
102
|
/**
|
|
77
103
|
* Where the pickers open. `'down'` pins them downward for a composer floating
|
|
78
104
|
* in open space (the centered entry surface) so a tall menu can't flip up over
|
|
@@ -88,7 +114,7 @@ interface ComposerAgentControlsProps {
|
|
|
88
114
|
filterModelsToHarness?: boolean;
|
|
89
115
|
}
|
|
90
116
|
/**
|
|
91
|
-
* The composer's agent-identity control:
|
|
117
|
+
* The composer's agent-identity control: profile, backend, model, and
|
|
92
118
|
* reasoning effort, over sandbox-ui's `AgentSessionControls`.
|
|
93
119
|
*
|
|
94
120
|
* This is an ADAPTER, not a second implementation. sandbox-ui owns the control
|
|
@@ -117,7 +143,7 @@ interface ComposerAgentControlsProps {
|
|
|
117
143
|
* Behavioral modes (a plan toggle) are NOT agent identity and do not belong
|
|
118
144
|
* here — they dock on the other side of the composer via `controls`.
|
|
119
145
|
*/
|
|
120
|
-
declare function ComposerAgentControls({ model, harness, effort, className, context, layout, menuPlacement, filterModelsToHarness, }: ComposerAgentControlsProps): react.JSX.Element;
|
|
146
|
+
declare function ComposerAgentControls({ model, harness, profile, effort, className, context, layout, menuPlacement, filterModelsToHarness, }: ComposerAgentControlsProps): react.JSX.Element;
|
|
121
147
|
|
|
122
148
|
interface EntryComposerProps {
|
|
123
149
|
/** The one line above the input. Domain copy — always a product parameter. */
|
|
@@ -129,17 +155,23 @@ interface EntryComposerProps {
|
|
|
129
155
|
sendLabel?: string;
|
|
130
156
|
disabled?: boolean;
|
|
131
157
|
/**
|
|
132
|
-
* Agent identity (
|
|
158
|
+
* Agent identity (profile/backend/model/effort). Pass it and the control row renders;
|
|
133
159
|
* omit it and the composer ships without one. Omitting is a real choice for a
|
|
134
160
|
* surface with nothing to choose — it should never be an oversight, which is
|
|
135
161
|
* why this is one prop rather than a free-form slot a caller can forget.
|
|
136
162
|
*/
|
|
137
163
|
agent?: ComposerAgentControlsProps;
|
|
138
164
|
/**
|
|
139
|
-
*
|
|
165
|
+
* Product-specific behavioral controls docked on the LEFT. A mode is an
|
|
140
166
|
* on/off switch, not a value picker, so it sits apart from agent identity.
|
|
167
|
+
* For the standard plan-approval control, prefer `planMode`.
|
|
141
168
|
*/
|
|
142
169
|
modes?: ReactNode;
|
|
170
|
+
/**
|
|
171
|
+
* Standard plan-approval mode. Pass only when the selected backend supports
|
|
172
|
+
* it; omitted means the control is not rendered.
|
|
173
|
+
*/
|
|
174
|
+
planMode?: ComposerPlanModeSelection;
|
|
143
175
|
/**
|
|
144
176
|
* Upload endpoint for staged attachments. Omit and the attach affordance is
|
|
145
177
|
* hidden — a composer with no place to put a file must not offer one.
|
|
@@ -192,6 +224,20 @@ interface EntryComposerProps {
|
|
|
192
224
|
* `AgentComposer` directly with the same {@link ComposerAgentControls}, because
|
|
193
225
|
* a docked composer has a transcript above it and no hero layout.
|
|
194
226
|
*/
|
|
195
|
-
declare function EntryComposer({ heading, subheading, placeholder, initialValue, sendLabel, disabled, agent, modes, uploadUrl, accept, onAttachmentError, onRejectFiles, mentions, mentionPopoverClassName, footer, ready, onSubmit, className, composerClassName, maxWidth, }: EntryComposerProps): react.JSX.Element;
|
|
227
|
+
declare function EntryComposer({ heading, subheading, placeholder, initialValue, sendLabel, disabled, agent, modes, planMode, uploadUrl, accept, onAttachmentError, onRejectFiles, mentions, mentionPopoverClassName, footer, ready, onSubmit, className, composerClassName, maxWidth, }: EntryComposerProps): react.JSX.Element;
|
|
228
|
+
|
|
229
|
+
interface ComposerModeControlsProps {
|
|
230
|
+
/**
|
|
231
|
+
* Plan-approval mode. Products pass it only when the selected backend can
|
|
232
|
+
* propose a plan and wait for approval; omitted means nothing renders.
|
|
233
|
+
*/
|
|
234
|
+
planMode?: ComposerPlanModeSelection;
|
|
235
|
+
}
|
|
236
|
+
/**
|
|
237
|
+
* The shared plan-mode toggle for the left side of an agent composer.
|
|
238
|
+
* Plan mode is a behavioral switch, not part of the profile/backend/model/
|
|
239
|
+
* thinking identity controls on the right.
|
|
240
|
+
*/
|
|
241
|
+
declare function ComposerModeControls({ planMode }: ComposerModeControlsProps): react.JSX.Element | null;
|
|
196
242
|
|
|
197
|
-
export { ComposerAgentControls, type ComposerAgentControlsProps, type ComposerEffortSelection, type ComposerHarnessSelection, type ComposerModelSelection, EntryComposer, type EntryComposerProps };
|
|
243
|
+
export { ComposerAgentControls, type ComposerAgentControlsProps, type ComposerEffortSelection, type ComposerHarnessSelection, ComposerModeControls, type ComposerModeControlsProps, type ComposerModelSelection, type ComposerPlanModeSelection, type ComposerProfileSelection, EntryComposer, type EntryComposerProps };
|
package/dist/chat-react/index.js
CHANGED
|
@@ -11,9 +11,11 @@ import {
|
|
|
11
11
|
|
|
12
12
|
// src/chat-react/composer-agent-controls.tsx
|
|
13
13
|
import { useCallback, useMemo, useRef } from "react";
|
|
14
|
-
import {
|
|
14
|
+
import {
|
|
15
|
+
AgentSessionControls
|
|
16
|
+
} from "@tangle-network/sandbox-ui/chat";
|
|
15
17
|
import { canonicalModelId } from "@tangle-network/sandbox-ui/dashboard";
|
|
16
|
-
import { jsx } from "react/jsx-runtime";
|
|
18
|
+
import { Fragment, jsx, jsxs } from "react/jsx-runtime";
|
|
17
19
|
function harnessesForContext(available, context) {
|
|
18
20
|
if (!available) return available;
|
|
19
21
|
if (context !== "chat") return available;
|
|
@@ -28,10 +30,11 @@ function modelsForContext(models, selectedId, context) {
|
|
|
28
30
|
function ComposerAgentControls({
|
|
29
31
|
model,
|
|
30
32
|
harness,
|
|
33
|
+
profile,
|
|
31
34
|
effort,
|
|
32
35
|
className,
|
|
33
36
|
context = "chat",
|
|
34
|
-
layout = "
|
|
37
|
+
layout = "responsive",
|
|
35
38
|
menuPlacement,
|
|
36
39
|
filterModelsToHarness = true
|
|
37
40
|
}) {
|
|
@@ -64,36 +67,60 @@ function ComposerAgentControls({
|
|
|
64
67
|
},
|
|
65
68
|
[modelOnChange]
|
|
66
69
|
);
|
|
70
|
+
const sharedProps = {
|
|
71
|
+
context,
|
|
72
|
+
menuPlacement,
|
|
73
|
+
filterModelsToHarness,
|
|
74
|
+
model: {
|
|
75
|
+
value: canonicalSelected,
|
|
76
|
+
onChange: onModelChange,
|
|
77
|
+
models: offeredModels,
|
|
78
|
+
loading: model.loading,
|
|
79
|
+
disabled: model.disabled
|
|
80
|
+
},
|
|
81
|
+
harness: harness ? {
|
|
82
|
+
value: harness.value,
|
|
83
|
+
onChange: onHarnessChange,
|
|
84
|
+
available: harnessesForContext(harness.available, context),
|
|
85
|
+
disabled: harness.disabled,
|
|
86
|
+
locked: harness.locked,
|
|
87
|
+
lockReason: harness.lockReason,
|
|
88
|
+
onNewChat: harness.onNewChat
|
|
89
|
+
} : void 0,
|
|
90
|
+
profile,
|
|
91
|
+
reasoning: effort ? {
|
|
92
|
+
value: effort.value,
|
|
93
|
+
onChange: effort.onChange,
|
|
94
|
+
available: effort.available,
|
|
95
|
+
disabled: effort.disabled
|
|
96
|
+
} : void 0
|
|
97
|
+
};
|
|
98
|
+
if (layout === "responsive") {
|
|
99
|
+
return /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
100
|
+
/* @__PURE__ */ jsx(
|
|
101
|
+
AgentSessionControls,
|
|
102
|
+
{
|
|
103
|
+
...sharedProps,
|
|
104
|
+
className: className ? `hidden sm:flex ${className}` : "hidden sm:flex",
|
|
105
|
+
layout: "inline"
|
|
106
|
+
}
|
|
107
|
+
),
|
|
108
|
+
/* @__PURE__ */ jsx(
|
|
109
|
+
AgentSessionControls,
|
|
110
|
+
{
|
|
111
|
+
...sharedProps,
|
|
112
|
+
className: className ? `flex sm:hidden ${className}` : "flex sm:hidden",
|
|
113
|
+
layout: "gear"
|
|
114
|
+
}
|
|
115
|
+
)
|
|
116
|
+
] });
|
|
117
|
+
}
|
|
67
118
|
return /* @__PURE__ */ jsx(
|
|
68
119
|
AgentSessionControls,
|
|
69
120
|
{
|
|
70
121
|
className,
|
|
71
|
-
|
|
72
|
-
layout
|
|
73
|
-
menuPlacement,
|
|
74
|
-
filterModelsToHarness,
|
|
75
|
-
model: {
|
|
76
|
-
value: canonicalSelected,
|
|
77
|
-
onChange: onModelChange,
|
|
78
|
-
models: offeredModels,
|
|
79
|
-
loading: model.loading,
|
|
80
|
-
disabled: model.disabled
|
|
81
|
-
},
|
|
82
|
-
harness: harness ? {
|
|
83
|
-
value: harness.value,
|
|
84
|
-
onChange: onHarnessChange,
|
|
85
|
-
available: harnessesForContext(harness.available, context),
|
|
86
|
-
disabled: harness.disabled,
|
|
87
|
-
locked: harness.locked,
|
|
88
|
-
lockReason: harness.lockReason,
|
|
89
|
-
onNewChat: harness.onNewChat
|
|
90
|
-
} : void 0,
|
|
91
|
-
reasoning: effort ? {
|
|
92
|
-
value: effort.value,
|
|
93
|
-
onChange: effort.onChange,
|
|
94
|
-
available: effort.available,
|
|
95
|
-
disabled: effort.disabled
|
|
96
|
-
} : void 0
|
|
122
|
+
...sharedProps,
|
|
123
|
+
layout
|
|
97
124
|
}
|
|
98
125
|
);
|
|
99
126
|
}
|
|
@@ -101,7 +128,36 @@ function ComposerAgentControls({
|
|
|
101
128
|
// src/chat-react/entry-composer.tsx
|
|
102
129
|
import { useState } from "react";
|
|
103
130
|
import { AgentComposer } from "@tangle-network/sandbox-ui/chat";
|
|
104
|
-
|
|
131
|
+
|
|
132
|
+
// src/chat-react/composer-mode-controls.tsx
|
|
133
|
+
import { ListChecks } from "lucide-react";
|
|
134
|
+
import { cn } from "@tangle-network/sandbox-ui/utils";
|
|
135
|
+
import { jsx as jsx2, jsxs as jsxs2 } from "react/jsx-runtime";
|
|
136
|
+
function ComposerModeControls({ planMode }) {
|
|
137
|
+
if (!planMode) return null;
|
|
138
|
+
return /* @__PURE__ */ jsxs2(
|
|
139
|
+
"button",
|
|
140
|
+
{
|
|
141
|
+
type: "button",
|
|
142
|
+
"aria-pressed": planMode.enabled,
|
|
143
|
+
disabled: planMode.saving,
|
|
144
|
+
onClick: () => planMode.setEnabled(!planMode.enabled),
|
|
145
|
+
title: "Plan mode: the agent proposes a plan you approve before it executes",
|
|
146
|
+
className: cn(
|
|
147
|
+
"inline-flex h-7 items-center gap-1 rounded-full border px-2.5 text-xs transition-colors",
|
|
148
|
+
planMode.enabled ? "border-primary/50 bg-primary/10 text-primary" : "border-border bg-transparent text-muted-foreground hover:text-foreground",
|
|
149
|
+
planMode.saving && "opacity-60"
|
|
150
|
+
),
|
|
151
|
+
children: [
|
|
152
|
+
/* @__PURE__ */ jsx2(ListChecks, { className: "h-3.5 w-3.5" }),
|
|
153
|
+
"Plan"
|
|
154
|
+
]
|
|
155
|
+
}
|
|
156
|
+
);
|
|
157
|
+
}
|
|
158
|
+
|
|
159
|
+
// src/chat-react/entry-composer.tsx
|
|
160
|
+
import { jsx as jsx3, jsxs as jsxs3 } from "react/jsx-runtime";
|
|
105
161
|
function EntryComposer({
|
|
106
162
|
heading,
|
|
107
163
|
subheading,
|
|
@@ -111,6 +167,7 @@ function EntryComposer({
|
|
|
111
167
|
disabled,
|
|
112
168
|
agent,
|
|
113
169
|
modes,
|
|
170
|
+
planMode,
|
|
114
171
|
uploadUrl,
|
|
115
172
|
accept = ATTACHMENT_ACCEPT,
|
|
116
173
|
onAttachmentError,
|
|
@@ -144,14 +201,14 @@ function EntryComposer({
|
|
|
144
201
|
attachments.clear();
|
|
145
202
|
mentions?.clearMentions();
|
|
146
203
|
}
|
|
147
|
-
return /* @__PURE__ */
|
|
204
|
+
return /* @__PURE__ */ jsx3(
|
|
148
205
|
"div",
|
|
149
206
|
{
|
|
150
207
|
className: className ?? "relative flex flex-1 flex-col items-center justify-center overflow-hidden bg-background px-5",
|
|
151
|
-
children: /* @__PURE__ */
|
|
152
|
-
heading ? /* @__PURE__ */
|
|
153
|
-
subheading ? /* @__PURE__ */
|
|
154
|
-
/* @__PURE__ */
|
|
208
|
+
children: /* @__PURE__ */ jsxs3("div", { className: "w-full", style: { maxWidth }, children: [
|
|
209
|
+
heading ? /* @__PURE__ */ jsx3("h2", { className: "mb-4 text-center text-[1.75rem] font-medium tracking-tight text-foreground", children: heading }) : null,
|
|
210
|
+
subheading ? /* @__PURE__ */ jsx3("p", { className: "mx-auto mb-9 max-w-md text-center text-sm leading-relaxed text-muted-foreground", children: subheading }) : heading ? /* @__PURE__ */ jsx3("div", { className: "mb-7" }) : null,
|
|
211
|
+
/* @__PURE__ */ jsx3(
|
|
155
212
|
AgentComposer,
|
|
156
213
|
{
|
|
157
214
|
className: composerClassName ?? "vt-composer",
|
|
@@ -176,17 +233,18 @@ function EntryComposer({
|
|
|
176
233
|
// brighter overlay tone the component defaults to.
|
|
177
234
|
popoverClassName: mentionPopoverClassName ?? "bg-surface-container-low border-[var(--md3-outline-variant)]"
|
|
178
235
|
} : void 0,
|
|
179
|
-
controls: modes,
|
|
180
|
-
trailing: agent ? /* @__PURE__ */
|
|
236
|
+
controls: modes ?? /* @__PURE__ */ jsx3(ComposerModeControls, { planMode }),
|
|
237
|
+
trailing: agent ? /* @__PURE__ */ jsx3(ComposerAgentControls, { menuPlacement: "down", ...agent }) : void 0
|
|
181
238
|
}
|
|
182
239
|
),
|
|
183
|
-
footer ? /* @__PURE__ */
|
|
240
|
+
footer ? /* @__PURE__ */ jsx3("div", { className: "mt-7", children: footer }) : null
|
|
184
241
|
] })
|
|
185
242
|
}
|
|
186
243
|
);
|
|
187
244
|
}
|
|
188
245
|
export {
|
|
189
246
|
ComposerAgentControls,
|
|
247
|
+
ComposerModeControls,
|
|
190
248
|
EntryComposer
|
|
191
249
|
};
|
|
192
250
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/chat-react/composer-agent-controls.tsx","../../src/chat-react/entry-composer.tsx"],"sourcesContent":["import { useCallback, useMemo, useRef } from 'react'\nimport { AgentSessionControls } from '@tangle-network/sandbox-ui/chat'\nimport { canonicalModelId } from '@tangle-network/sandbox-ui/dashboard'\nimport type { ModelInfo } from '@tangle-network/sandbox-ui/dashboard'\n// Browser-safe: model-catalog.ts imports nothing. Taken from the source module\n// rather than the `/catalog` subpath so this stays one build graph.\nimport { isChatCapableModel, type RouterModel } from '../runtime/model-catalog'\nimport type { HarnessType, ReasoningEffort, ReasoningLevel } from './types'\n\n/**\n * The model half of the composer's agent identity. `models` is the catalog the\n * picker renders; `value` may be a bare or a canonical (provider-prefixed) id —\n * the adapter maps it to canonical form for the picker and hands the canonical\n * id back to `onChange`, so a product that stores bare ids only has to accept\n * canonical ones in its setter.\n */\nexport interface ComposerModelSelection {\n value: string\n onChange: (next: string) => void\n models: ModelInfo[]\n loading?: boolean\n disabled?: boolean\n}\n\nexport interface ComposerHarnessSelection {\n value: HarnessType\n onChange: (next: HarnessType) => void\n /** Restrict the offered backends. Omit to take the context default. */\n available?: ReadonlyArray<HarnessType>\n disabled?: boolean\n /**\n * A thread's sidecar session is pinned to one harness at its first message,\n * so once the thread has messages the picker locks. With `onNewChat` the\n * locked chip becomes the informative lock (explains the binding + a button\n * to start a fresh session on another backend).\n */\n locked?: boolean\n lockReason?: string\n onNewChat?: () => void\n}\n\nexport interface ComposerEffortSelection {\n value: ReasoningLevel\n onChange: (next: ReasoningLevel) => void\n /**\n * Depths this product's backend actually applies. Omit for the default set.\n * `auto` is NOT a member: the picker adds that sentinel itself, so listing it\n * here would offer it twice.\n */\n available?: ReadonlyArray<ReasoningEffort>\n disabled?: boolean\n}\n\nexport interface ComposerAgentControlsProps {\n model: ComposerModelSelection\n /** Omit on a router-backed composer: a direct model call has no CLI backend,\n * so the picker would be inert. Model + effort still render. */\n harness?: ComposerHarnessSelection\n effort?: ComposerEffortSelection\n className?: string\n /**\n * Which surface the controls live on. `'chat'` (the default) drops the\n * shell-only `cli-base` backend — it has no conversational agent — and tells\n * the shared control to use its chat-only default set. It also drops models\n * that cannot serve a text turn (image / TTS / embedding / audio-in) from\n * the model picker. `'all'` keeps every backend and every model for non-chat\n * / scheduled surfaces.\n */\n context?: 'chat' | 'all'\n /**\n * Trigger layout. `'combined'` (the default) collapses the pickers behind one\n * labeled trigger reading the current selection (`harness · model · effort`).\n * `'gear'` uses an anonymous gear icon instead of the label; `'inline'` lays\n * the pickers out in a row.\n */\n layout?: 'inline' | 'gear' | 'combined'\n /**\n * Where the pickers open. `'down'` pins them downward for a composer floating\n * in open space (the centered entry surface) so a tall menu can't flip up over\n * the heading. Defaults to `'auto'` (collision-aware).\n */\n menuPlacement?: 'auto' | 'down'\n /**\n * Restrict the model catalog to what the selected harness can run instead of\n * letting an incompatible model snap the harness. ON by default: a workspace\n * harness is sandbox-bound, and a silent swap tears down and recreates the\n * sandbox. Turn OFF only on a model-first surface with no bound sandbox.\n */\n filterModelsToHarness?: boolean\n}\n\n/**\n * The chat copilot must never offer `cli-base`: it is a shell-only backend with\n * no conversational agent. sandbox-ui's `context='chat'` drops it from the\n * default set, but an explicit `available` list (a plan-filtered one may include\n * `cli-base`) overrides that trim. So strip it here at the data layer whenever\n * the surface is chat — no `cli-base` ever reaches render.\n */\nfunction harnessesForContext(\n available: ReadonlyArray<HarnessType> | undefined,\n context: 'chat' | 'all',\n): ReadonlyArray<HarnessType> | undefined {\n if (!available) return available\n if (context !== 'chat') return available\n return available.filter((h) => h !== 'cli-base')\n}\n\n/**\n * The model-side twin of the harness trim above. Products hand the picker the\n * router's raw `/v1/models`, which lists every routeable endpoint — image\n * generators, TTS voices, embedding models, audio-in transcription. None of\n * them can serve a chat turn, and on the live catalogue that is 35 of 504\n * entries a user could pick and get a broken turn from.\n *\n * `context: 'all'` keeps the full list for non-chat surfaces.\n *\n * The selected model is never filtered out, whatever its modalities say: a\n * product may deliberately pin something exotic, and a picker whose own value\n * is missing from its list renders as blank.\n *\n * That escape hatch has to recognise BOTH spellings of the id. A product stores\n * whatever `onChange` handed it, and `onChange` hands back the canonical\n * provider-prefixed form — so a selection pinned before this trim existed is\n * stored as `openai/gpt-image-1` while the catalog entry's own `id` is the bare\n * `gpt-image-1`. Matching only the bare form drops exactly the model the guard\n * exists to keep, and the picker renders unset, which reads as data loss.\n */\nfunction modelsForContext(\n models: ModelInfo[],\n selectedId: string,\n context: 'chat' | 'all',\n): ModelInfo[] {\n if (context !== 'chat') return models\n return models.filter(\n (m) =>\n m.id === selectedId ||\n canonicalModelId(m) === selectedId ||\n isChatCapableModel(m as unknown as RouterModel),\n )\n}\n\n/**\n * The composer's agent-identity control: harness (agent backend), model, and\n * reasoning effort, over sandbox-ui's `AgentSessionControls`.\n *\n * This is an ADAPTER, not a second implementation. sandbox-ui owns the control\n * and the harness↔model coherence policy (the catalog is filtered to the\n * selected harness, the effort re-clamps to what the harness/model pair\n * supports, and a harness that ignores a picker is marked with its dead control\n * disabled). What lives here is the app-shell wiring every product otherwise\n * re-derives:\n *\n * - MODEL-ID BOUNDARY. Products store bare ids (what a chat send body expects)\n * while the picker matches on canonical provider-prefixed ids. The canonical\n * form goes in; the canonical id comes back out to `onChange`.\n * - HARNESS-SNAP SUPPRESSION. The shared control snaps the model whenever the\n * harness changes, calling the model `onChange` synchronously with a default\n * compatible model. A product that remembers a per-harness pick must ignore\n * that snap, or it both discards the remembered pick and persists it under\n * the wrong harness's key. The guard is armed for exactly the synchronous\n * window of a harness change and disarmed on the next microtask, so it can\n * never stay stuck — a later genuine pick is never swallowed, even when the\n * harness change was a no-op.\n * - CHAT-CONTEXT TRIM. On a chat surface, `cli-base` never reaches the harness\n * picker and a non-chat model never reaches the model picker. Products feed\n * the picker the router's raw model list, where 35 of 504 entries (image,\n * TTS, embeddings, audio-in transcription) cannot serve a chat turn at all.\n *\n * Behavioral modes (a plan toggle) are NOT agent identity and do not belong\n * here — they dock on the other side of the composer via `controls`.\n */\nexport function ComposerAgentControls({\n model,\n harness,\n effort,\n className,\n context = 'chat',\n layout = 'combined',\n menuPlacement,\n filterModelsToHarness = true,\n}: ComposerAgentControlsProps) {\n const canonicalSelected = useMemo(() => {\n const selected = model.models.find((m) => m.id === model.value)\n if (selected) return canonicalModelId(selected)\n // Already canonical, or the catalog has not loaded — pass through unchanged\n // so a provider-prefixed id still matches once models arrive.\n return model.value\n }, [model.value, model.models])\n\n const offeredModels = useMemo(\n () => modelsForContext(model.models, model.value, context),\n [model.models, model.value, context],\n )\n\n const harnessSwitching = useRef(false)\n const harnessOnChange = harness?.onChange\n const onHarnessChange = useCallback(\n (next: HarnessType) => {\n harnessSwitching.current = true\n harnessOnChange?.(next)\n queueMicrotask(() => {\n harnessSwitching.current = false\n })\n },\n [harnessOnChange],\n )\n\n const modelOnChange = model.onChange\n const onModelChange = useCallback(\n (canonical: string) => {\n if (harnessSwitching.current) return\n modelOnChange(canonical)\n },\n [modelOnChange],\n )\n\n return (\n <AgentSessionControls\n className={className}\n context={context}\n layout={layout}\n menuPlacement={menuPlacement}\n filterModelsToHarness={filterModelsToHarness}\n model={{\n value: canonicalSelected,\n onChange: onModelChange,\n models: offeredModels,\n loading: model.loading,\n disabled: model.disabled,\n }}\n harness={\n harness\n ? {\n value: harness.value,\n onChange: onHarnessChange,\n available: harnessesForContext(harness.available, context),\n disabled: harness.disabled,\n locked: harness.locked,\n lockReason: harness.lockReason,\n onNewChat: harness.onNewChat,\n }\n : undefined\n }\n reasoning={\n effort\n ? {\n value: effort.value,\n onChange: effort.onChange,\n available: effort.available,\n disabled: effort.disabled,\n }\n : undefined\n }\n />\n )\n}\n","import { useState, type ReactNode } from 'react'\nimport { AgentComposer } from '@tangle-network/sandbox-ui/chat'\nimport { ATTACHMENT_ACCEPT, useComposerAttachments } from '../web-react/use-composer-attachments'\nimport type { UseFileMentionsResult } from '../web-react/use-file-mentions'\nimport type { ChatAttachmentInput, FileMention } from '../chat-routes/wire'\nimport {\n ComposerAgentControls,\n type ComposerAgentControlsProps,\n} from './composer-agent-controls'\n\nexport interface EntryComposerProps {\n /** The one line above the input. Domain copy — always a product parameter. */\n heading?: ReactNode\n /** Optional supporting line under the heading. */\n subheading?: ReactNode\n placeholder?: string\n initialValue?: string\n sendLabel?: string\n disabled?: boolean\n /**\n * Agent identity (harness/model/effort). Pass it and the control row renders;\n * omit it and the composer ships without one. Omitting is a real choice for a\n * surface with nothing to choose — it should never be an oversight, which is\n * why this is one prop rather than a free-form slot a caller can forget.\n */\n agent?: ComposerAgentControlsProps\n /**\n * Behavioral modes docked on the LEFT (a plan-approval toggle). A mode is an\n * on/off switch, not a value picker, so it sits apart from agent identity.\n */\n modes?: ReactNode\n /**\n * Upload endpoint for staged attachments. Omit and the attach affordance is\n * hidden — a composer with no place to put a file must not offer one.\n */\n uploadUrl?: string\n accept?: string\n onAttachmentError?: (reason: string) => void\n onRejectFiles?: Parameters<typeof AgentComposer>[0]['onRejectFiles']\n /**\n * `@`-file mentions. The hook itself is shared (`useFileMentions`), but the\n * cold-box policy around it — whether pressing `@` is worth starting a\n * sandbox — is a per-surface product call, so the result is injected rather\n * than created here.\n */\n mentions?: UseFileMentionsResult\n mentionPopoverClassName?: string\n /** Rendered under the composer: suggestion pills, an onboarding nudge, a\n * disclaimer. All domain copy. */\n footer?: ReactNode\n /** Block submit until a persisted selection has resolved against the catalog,\n * so the first turn cannot go out under the wrong model. Defaults to true. */\n ready?: boolean\n onSubmit: (\n prompt: string,\n attachments: ChatAttachmentInput[],\n mentions: FileMention[],\n ) => void\n className?: string\n composerClassName?: string\n /** Max width of the centered column. Defaults to the fleet's 820px. */\n maxWidth?: number\n}\n\n/**\n * `EntryComposer` — the centered \"what do you want to work on?\" surface a\n * product shows before a conversation exists (a new thread, an empty session,\n * a workspace overview).\n *\n * It exists because three products each grew their own, and they drifted into\n * three different capability sets rather than three different looks: one lost\n * the attach button, one lost the model and effort pickers entirely, one\n * hand-rolled a `<textarea>` and wired pickers from three separate packages\n * into one row. The composer, the pickers, the attachment queue and the mention\n * index were all ALREADY shared — what was not shared was the assembly, so\n * every product re-derived which controls an entry surface gets, and each\n * re-derivation dropped a different one.\n *\n * Mechanism lives here: layout, the attachment queue, the mention wiring, the\n * submit gate (nothing sends while an upload is pending or failed, or before\n * the model selection has resolved). Domain stays a parameter: `heading`,\n * `placeholder`, `footer` (suggestion pills, disclaimers) and the selections\n * themselves.\n *\n * The docked in-thread composer is NOT this component — it renders\n * `AgentComposer` directly with the same {@link ComposerAgentControls}, because\n * a docked composer has a transcript above it and no hero layout.\n */\nexport function EntryComposer({\n heading,\n subheading,\n placeholder,\n initialValue = '',\n sendLabel,\n disabled,\n agent,\n modes,\n uploadUrl,\n accept = ATTACHMENT_ACCEPT,\n onAttachmentError,\n onRejectFiles,\n mentions,\n mentionPopoverClassName,\n footer,\n ready = true,\n onSubmit,\n className,\n composerClassName,\n maxWidth = 820,\n}: EntryComposerProps) {\n const [value, setValue] = useState(initialValue)\n const attachments = useComposerAttachments({\n uploadUrl,\n enabled: !!uploadUrl,\n onReject: onAttachmentError,\n onError: onAttachmentError,\n })\n\n function submit(prompt: string) {\n if (!ready || disabled) return\n const next = prompt.trim()\n // A pending or failed upload must not send: the turn would reference an\n // attachment the store does not have. Surface why rather than no-op'ing.\n if (attachments.hasPending || attachments.hasError) {\n if (attachments.blockReason) onAttachmentError?.(attachments.blockReason)\n return\n }\n if (!next && attachments.references.length === 0) return\n onSubmit(next, attachments.references, mentions?.mentions ?? [])\n setValue('')\n attachments.clear()\n mentions?.clearMentions()\n }\n\n return (\n <div\n className={\n className ??\n 'relative flex flex-1 flex-col items-center justify-center overflow-hidden bg-background px-5'\n }\n >\n <div className=\"w-full\" style={{ maxWidth }}>\n {heading ? (\n <h2 className=\"mb-4 text-center text-[1.75rem] font-medium tracking-tight text-foreground\">\n {heading}\n </h2>\n ) : null}\n {subheading ? (\n <p className=\"mx-auto mb-9 max-w-md text-center text-sm leading-relaxed text-muted-foreground\">\n {subheading}\n </p>\n ) : (\n heading ? <div className=\"mb-7\" /> : null\n )}\n <AgentComposer\n className={composerClassName ?? 'vt-composer'}\n value={value}\n onChange={setValue}\n onSubmit={() => submit(value)}\n placeholder={placeholder}\n sendLabel={sendLabel}\n disabled={disabled}\n autoFocus\n canSubmitAttachmentsOnly\n accept={accept}\n attachments={attachments.composerFiles}\n onAttach={uploadUrl ? (files) => void attachments.addFiles(files) : undefined}\n onRejectFiles={onRejectFiles}\n onRemoveFile={attachments.removeAttachment}\n onRetryFile={attachments.retry}\n mention={\n mentions\n ? {\n ...mentions.mention,\n // Sidebar tone + hairline so the popover reads as app chrome\n // (the same treatment the picker menus get) instead of the\n // brighter overlay tone the component defaults to.\n popoverClassName:\n mentionPopoverClassName ??\n 'bg-surface-container-low border-[var(--md3-outline-variant)]',\n }\n : undefined\n }\n controls={modes}\n trailing={\n agent ? <ComposerAgentControls menuPlacement=\"down\" {...agent} /> : undefined\n }\n />\n {footer ? <div className=\"mt-7\">{footer}</div> : null}\n </div>\n </div>\n )\n}\n"],"mappings":";;;;;;;;;;;;AAAA,SAAS,aAAa,SAAS,cAAc;AAC7C,SAAS,4BAA4B;AACrC,SAAS,wBAAwB;AAuN7B;AAvHJ,SAAS,oBACP,WACA,SACwC;AACxC,MAAI,CAAC,UAAW,QAAO;AACvB,MAAI,YAAY,OAAQ,QAAO;AAC/B,SAAO,UAAU,OAAO,CAAC,MAAM,MAAM,UAAU;AACjD;AAsBA,SAAS,iBACP,QACA,YACA,SACa;AACb,MAAI,YAAY,OAAQ,QAAO;AAC/B,SAAO,OAAO;AAAA,IACZ,CAAC,MACC,EAAE,OAAO,cACT,iBAAiB,CAAC,MAAM,cACxB,mBAAmB,CAA2B;AAAA,EAClD;AACF;AAgCO,SAAS,sBAAsB;AAAA,EACpC;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA,UAAU;AAAA,EACV,SAAS;AAAA,EACT;AAAA,EACA,wBAAwB;AAC1B,GAA+B;AAC7B,QAAM,oBAAoB,QAAQ,MAAM;AACtC,UAAM,WAAW,MAAM,OAAO,KAAK,CAAC,MAAM,EAAE,OAAO,MAAM,KAAK;AAC9D,QAAI,SAAU,QAAO,iBAAiB,QAAQ;AAG9C,WAAO,MAAM;AAAA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,OAAO,KAAK;AAAA,YAC5B;AAAA,YACA;AAAA,YACA;AAAA,YACA,WAAS;AAAA,YACT,0BAAwB;AAAA,YACxB;AAAA,YACA,aAAa,YAAY;AAAA,YACzB,UAAU,YAAY,CAAC,UAAU,KAAK,YAAY,SAAS,KAAK,IAAI;AAAA,YACpE;AAAA,YACA,cAAc,YAAY;AAAA,YAC1B,aAAa,YAAY;AAAA,YACzB,SACE,WACI;AAAA,cACE,GAAG,SAAS;AAAA;AAAA;AAAA;AAAA,cAIZ,kBACE,2BACA;AAAA,YACJ,IACA;AAAA,YAEN,UAAU;AAAA,YACV,UACE,QAAQ,gBAAAA,KAAC,yBAAsB,eAAc,QAAQ,GAAG,OAAO,IAAK;AAAA;AAAA,QAExE;AAAA,QACC,SAAS,gBAAAA,KAAC,SAAI,WAAU,QAAQ,kBAAO,IAAS;AAAA,SACnD;AAAA;AAAA,EACF;AAEJ;","names":["jsx"]}
|
|
1
|
+
{"version":3,"sources":["../../src/chat-react/composer-agent-controls.tsx","../../src/chat-react/entry-composer.tsx","../../src/chat-react/composer-mode-controls.tsx"],"sourcesContent":["import { useCallback, useMemo, useRef } from 'react'\nimport {\n AgentSessionControls,\n type AgentSessionProfileControl,\n} from '@tangle-network/sandbox-ui/chat'\nimport { canonicalModelId } from '@tangle-network/sandbox-ui/dashboard'\nimport type { ModelInfo } from '@tangle-network/sandbox-ui/dashboard'\n// Browser-safe: model-catalog.ts imports nothing. Taken from the source module\n// rather than the `/catalog` subpath so this stays one build graph.\nimport { isChatCapableModel, type RouterModel } from '../runtime/model-catalog'\nimport type { HarnessType, ReasoningEffort, ReasoningLevel } from './types'\n\n/**\n * The model half of the composer's agent identity. `models` is the catalog the\n * picker renders; `value` may be a bare or a canonical (provider-prefixed) id —\n * the adapter maps it to canonical form for the picker and hands the canonical\n * id back to `onChange`, so a product that stores bare ids only has to accept\n * canonical ones in its setter.\n */\nexport interface ComposerModelSelection {\n value: string\n onChange: (next: string) => void\n models: ModelInfo[]\n loading?: boolean\n disabled?: boolean\n}\n\nexport interface ComposerHarnessSelection {\n value: HarnessType\n onChange: (next: HarnessType) => void\n /** Restrict the offered backends. Omit to take the context default. */\n available?: ReadonlyArray<HarnessType>\n disabled?: boolean\n /**\n * A thread's sidecar session is pinned to one harness at its first message,\n * so once the thread has messages the picker locks. With `onNewChat` the\n * locked chip becomes the informative lock (explains the binding + a button\n * to start a fresh session on another backend).\n */\n locked?: boolean\n lockReason?: string\n onNewChat?: () => void\n}\n\nexport interface ComposerEffortSelection {\n value: ReasoningLevel\n onChange: (next: ReasoningLevel) => void\n /**\n * Depths this product's backend actually applies. Omit for the default set.\n * `auto` is NOT a member: the picker adds that sentinel itself, so listing it\n * here would offer it twice.\n */\n available?: ReadonlyArray<ReasoningEffort>\n disabled?: boolean\n}\n\n/**\n * A selectable named bundle of persona and tool groups. The product resolves\n * the selected id to the runtime AgentProfile before creating or continuing a\n * session; the composer only needs the display catalog and persistence hooks.\n */\nexport type ComposerProfileSelection = AgentSessionProfileControl\n\nexport interface ComposerAgentControlsProps {\n model: ComposerModelSelection\n /** Omit on a router-backed composer: a direct model call has no CLI backend,\n * so the picker would be inert. Model + effort still render. */\n harness?: ComposerHarnessSelection\n /** Universal named agent profile: persona + tool groups, independent of backend. */\n profile?: ComposerProfileSelection\n effort?: ComposerEffortSelection\n className?: string\n /**\n * Which surface the controls live on. `'chat'` (the default) drops the\n * shell-only `cli-base` backend — it has no conversational agent — and tells\n * the shared control to use its chat-only default set. It also drops models\n * that cannot serve a text turn (image / TTS / embedding / audio-in) from\n * the model picker. `'all'` keeps every backend and every model for non-chat\n * / scheduled surfaces.\n */\n context?: 'chat' | 'all'\n /**\n * Trigger layout. `'responsive'` (the default) lays the pickers out in a\n * row on wider screens and uses a compact gear on narrow screens. `'combined'`\n * collapses the pickers behind one\n * labeled trigger reading the current selection (`harness · model · effort`).\n * `'gear'` uses an anonymous gear icon instead of the label; `'inline'` lays\n * the pickers out in a row. `'responsive'` uses the labeled trigger on wider\n * screens and the compact gear on narrow screens so Send stays reachable.\n */\n layout?: 'inline' | 'gear' | 'combined' | 'responsive'\n /**\n * Where the pickers open. `'down'` pins them downward for a composer floating\n * in open space (the centered entry surface) so a tall menu can't flip up over\n * the heading. Defaults to `'auto'` (collision-aware).\n */\n menuPlacement?: 'auto' | 'down'\n /**\n * Restrict the model catalog to what the selected harness can run instead of\n * letting an incompatible model snap the harness. ON by default: a workspace\n * harness is sandbox-bound, and a silent swap tears down and recreates the\n * sandbox. Turn OFF only on a model-first surface with no bound sandbox.\n */\n filterModelsToHarness?: boolean\n}\n\n/**\n * The chat copilot must never offer `cli-base`: it is a shell-only backend with\n * no conversational agent. sandbox-ui's `context='chat'` drops it from the\n * default set, but an explicit `available` list (a plan-filtered one may include\n * `cli-base`) overrides that trim. So strip it here at the data layer whenever\n * the surface is chat — no `cli-base` ever reaches render.\n */\nfunction harnessesForContext(\n available: ReadonlyArray<HarnessType> | undefined,\n context: 'chat' | 'all',\n): ReadonlyArray<HarnessType> | undefined {\n if (!available) return available\n if (context !== 'chat') return available\n return available.filter((h) => h !== 'cli-base')\n}\n\n/**\n * The model-side twin of the harness trim above. Products hand the picker the\n * router's raw `/v1/models`, which lists every routeable endpoint — image\n * generators, TTS voices, embedding models, audio-in transcription. None of\n * them can serve a chat turn, and on the live catalogue that is 35 of 504\n * entries a user could pick and get a broken turn from.\n *\n * `context: 'all'` keeps the full list for non-chat surfaces.\n *\n * The selected model is never filtered out, whatever its modalities say: a\n * product may deliberately pin something exotic, and a picker whose own value\n * is missing from its list renders as blank.\n *\n * That escape hatch has to recognise BOTH spellings of the id. A product stores\n * whatever `onChange` handed it, and `onChange` hands back the canonical\n * provider-prefixed form — so a selection pinned before this trim existed is\n * stored as `openai/gpt-image-1` while the catalog entry's own `id` is the bare\n * `gpt-image-1`. Matching only the bare form drops exactly the model the guard\n * exists to keep, and the picker renders unset, which reads as data loss.\n */\nfunction modelsForContext(\n models: ModelInfo[],\n selectedId: string,\n context: 'chat' | 'all',\n): ModelInfo[] {\n if (context !== 'chat') return models\n return models.filter(\n (m) =>\n m.id === selectedId ||\n canonicalModelId(m) === selectedId ||\n isChatCapableModel(m as unknown as RouterModel),\n )\n}\n\n/**\n * The composer's agent-identity control: profile, backend, model, and\n * reasoning effort, over sandbox-ui's `AgentSessionControls`.\n *\n * This is an ADAPTER, not a second implementation. sandbox-ui owns the control\n * and the harness↔model coherence policy (the catalog is filtered to the\n * selected harness, the effort re-clamps to what the harness/model pair\n * supports, and a harness that ignores a picker is marked with its dead control\n * disabled). What lives here is the app-shell wiring every product otherwise\n * re-derives:\n *\n * - MODEL-ID BOUNDARY. Products store bare ids (what a chat send body expects)\n * while the picker matches on canonical provider-prefixed ids. The canonical\n * form goes in; the canonical id comes back out to `onChange`.\n * - HARNESS-SNAP SUPPRESSION. The shared control snaps the model whenever the\n * harness changes, calling the model `onChange` synchronously with a default\n * compatible model. A product that remembers a per-harness pick must ignore\n * that snap, or it both discards the remembered pick and persists it under\n * the wrong harness's key. The guard is armed for exactly the synchronous\n * window of a harness change and disarmed on the next microtask, so it can\n * never stay stuck — a later genuine pick is never swallowed, even when the\n * harness change was a no-op.\n * - CHAT-CONTEXT TRIM. On a chat surface, `cli-base` never reaches the harness\n * picker and a non-chat model never reaches the model picker. Products feed\n * the picker the router's raw model list, where 35 of 504 entries (image,\n * TTS, embeddings, audio-in transcription) cannot serve a chat turn at all.\n *\n * Behavioral modes (a plan toggle) are NOT agent identity and do not belong\n * here — they dock on the other side of the composer via `controls`.\n */\nexport function ComposerAgentControls({\n model,\n harness,\n profile,\n effort,\n className,\n context = 'chat',\n layout = 'responsive',\n menuPlacement,\n filterModelsToHarness = true,\n}: ComposerAgentControlsProps) {\n const canonicalSelected = useMemo(() => {\n const selected = model.models.find((m) => m.id === model.value)\n if (selected) return canonicalModelId(selected)\n // Already canonical, or the catalog has not loaded — pass through unchanged\n // so a provider-prefixed id still matches once models arrive.\n return model.value\n }, [model.value, model.models])\n\n const offeredModels = useMemo(\n () => modelsForContext(model.models, model.value, context),\n [model.models, model.value, context],\n )\n\n const harnessSwitching = useRef(false)\n const harnessOnChange = harness?.onChange\n const onHarnessChange = useCallback(\n (next: HarnessType) => {\n harnessSwitching.current = true\n harnessOnChange?.(next)\n queueMicrotask(() => {\n harnessSwitching.current = false\n })\n },\n [harnessOnChange],\n )\n\n const modelOnChange = model.onChange\n const onModelChange = useCallback(\n (canonical: string) => {\n if (harnessSwitching.current) return\n modelOnChange(canonical)\n },\n [modelOnChange],\n )\n\n const sharedProps = {\n context,\n menuPlacement,\n filterModelsToHarness,\n model: {\n value: canonicalSelected,\n onChange: onModelChange,\n models: offeredModels,\n loading: model.loading,\n disabled: model.disabled,\n },\n harness: harness\n ? {\n value: harness.value,\n onChange: onHarnessChange,\n available: harnessesForContext(harness.available, context),\n disabled: harness.disabled,\n locked: harness.locked,\n lockReason: harness.lockReason,\n onNewChat: harness.onNewChat,\n }\n : undefined,\n profile,\n reasoning: effort\n ? {\n value: effort.value,\n onChange: effort.onChange,\n available: effort.available,\n disabled: effort.disabled,\n }\n : undefined,\n }\n\n if (layout === 'responsive') {\n return (\n <>\n <AgentSessionControls\n {...sharedProps}\n className={className ? `hidden sm:flex ${className}` : 'hidden sm:flex'}\n layout=\"inline\"\n />\n <AgentSessionControls\n {...sharedProps}\n className={className ? `flex sm:hidden ${className}` : 'flex sm:hidden'}\n layout=\"gear\"\n />\n </>\n )\n }\n\n return (\n <AgentSessionControls\n className={className}\n {...sharedProps}\n layout={layout}\n />\n )\n}\n","import { useState, type ReactNode } from 'react'\nimport { AgentComposer } from '@tangle-network/sandbox-ui/chat'\nimport { ATTACHMENT_ACCEPT, useComposerAttachments } from '../web-react/use-composer-attachments'\nimport type { UseFileMentionsResult } from '../web-react/use-file-mentions'\nimport type { ChatAttachmentInput, FileMention } from '../chat-routes/wire'\nimport {\n ComposerAgentControls,\n type ComposerAgentControlsProps,\n} from './composer-agent-controls'\nimport { ComposerModeControls } from './composer-mode-controls'\nimport type { ComposerPlanModeSelection } from './types'\n\nexport interface EntryComposerProps {\n /** The one line above the input. Domain copy — always a product parameter. */\n heading?: ReactNode\n /** Optional supporting line under the heading. */\n subheading?: ReactNode\n placeholder?: string\n initialValue?: string\n sendLabel?: string\n disabled?: boolean\n /**\n * Agent identity (profile/backend/model/effort). Pass it and the control row renders;\n * omit it and the composer ships without one. Omitting is a real choice for a\n * surface with nothing to choose — it should never be an oversight, which is\n * why this is one prop rather than a free-form slot a caller can forget.\n */\n agent?: ComposerAgentControlsProps\n /**\n * Product-specific behavioral controls docked on the LEFT. A mode is an\n * on/off switch, not a value picker, so it sits apart from agent identity.\n * For the standard plan-approval control, prefer `planMode`.\n */\n modes?: ReactNode\n /**\n * Standard plan-approval mode. Pass only when the selected backend supports\n * it; omitted means the control is not rendered.\n */\n planMode?: ComposerPlanModeSelection\n /**\n * Upload endpoint for staged attachments. Omit and the attach affordance is\n * hidden — a composer with no place to put a file must not offer one.\n */\n uploadUrl?: string\n accept?: string\n onAttachmentError?: (reason: string) => void\n onRejectFiles?: Parameters<typeof AgentComposer>[0]['onRejectFiles']\n /**\n * `@`-file mentions. The hook itself is shared (`useFileMentions`), but the\n * cold-box policy around it — whether pressing `@` is worth starting a\n * sandbox — is a per-surface product call, so the result is injected rather\n * than created here.\n */\n mentions?: UseFileMentionsResult\n mentionPopoverClassName?: string\n /** Rendered under the composer: suggestion pills, an onboarding nudge, a\n * disclaimer. All domain copy. */\n footer?: ReactNode\n /** Block submit until a persisted selection has resolved against the catalog,\n * so the first turn cannot go out under the wrong model. Defaults to true. */\n ready?: boolean\n onSubmit: (\n prompt: string,\n attachments: ChatAttachmentInput[],\n mentions: FileMention[],\n ) => void\n className?: string\n composerClassName?: string\n /** Max width of the centered column. Defaults to the fleet's 820px. */\n maxWidth?: number\n}\n\n/**\n * `EntryComposer` — the centered \"what do you want to work on?\" surface a\n * product shows before a conversation exists (a new thread, an empty session,\n * a workspace overview).\n *\n * It exists because three products each grew their own, and they drifted into\n * three different capability sets rather than three different looks: one lost\n * the attach button, one lost the model and effort pickers entirely, one\n * hand-rolled a `<textarea>` and wired pickers from three separate packages\n * into one row. The composer, the pickers, the attachment queue and the mention\n * index were all ALREADY shared — what was not shared was the assembly, so\n * every product re-derived which controls an entry surface gets, and each\n * re-derivation dropped a different one.\n *\n * Mechanism lives here: layout, the attachment queue, the mention wiring, the\n * submit gate (nothing sends while an upload is pending or failed, or before\n * the model selection has resolved). Domain stays a parameter: `heading`,\n * `placeholder`, `footer` (suggestion pills, disclaimers) and the selections\n * themselves.\n *\n * The docked in-thread composer is NOT this component — it renders\n * `AgentComposer` directly with the same {@link ComposerAgentControls}, because\n * a docked composer has a transcript above it and no hero layout.\n */\nexport function EntryComposer({\n heading,\n subheading,\n placeholder,\n initialValue = '',\n sendLabel,\n disabled,\n agent,\n modes,\n planMode,\n uploadUrl,\n accept = ATTACHMENT_ACCEPT,\n onAttachmentError,\n onRejectFiles,\n mentions,\n mentionPopoverClassName,\n footer,\n ready = true,\n onSubmit,\n className,\n composerClassName,\n maxWidth = 820,\n}: EntryComposerProps) {\n const [value, setValue] = useState(initialValue)\n const attachments = useComposerAttachments({\n uploadUrl,\n enabled: !!uploadUrl,\n onReject: onAttachmentError,\n onError: onAttachmentError,\n })\n\n function submit(prompt: string) {\n if (!ready || disabled) return\n const next = prompt.trim()\n // A pending or failed upload must not send: the turn would reference an\n // attachment the store does not have. Surface why rather than no-op'ing.\n if (attachments.hasPending || attachments.hasError) {\n if (attachments.blockReason) onAttachmentError?.(attachments.blockReason)\n return\n }\n if (!next && attachments.references.length === 0) return\n onSubmit(next, attachments.references, mentions?.mentions ?? [])\n setValue('')\n attachments.clear()\n mentions?.clearMentions()\n }\n\n return (\n <div\n className={\n className ??\n 'relative flex flex-1 flex-col items-center justify-center overflow-hidden bg-background px-5'\n }\n >\n <div className=\"w-full\" style={{ maxWidth }}>\n {heading ? (\n <h2 className=\"mb-4 text-center text-[1.75rem] font-medium tracking-tight text-foreground\">\n {heading}\n </h2>\n ) : null}\n {subheading ? (\n <p className=\"mx-auto mb-9 max-w-md text-center text-sm leading-relaxed text-muted-foreground\">\n {subheading}\n </p>\n ) : (\n heading ? <div className=\"mb-7\" /> : null\n )}\n <AgentComposer\n className={composerClassName ?? 'vt-composer'}\n value={value}\n onChange={setValue}\n onSubmit={() => submit(value)}\n placeholder={placeholder}\n sendLabel={sendLabel}\n disabled={disabled}\n autoFocus\n canSubmitAttachmentsOnly\n accept={accept}\n attachments={attachments.composerFiles}\n onAttach={uploadUrl ? (files) => void attachments.addFiles(files) : undefined}\n onRejectFiles={onRejectFiles}\n onRemoveFile={attachments.removeAttachment}\n onRetryFile={attachments.retry}\n mention={\n mentions\n ? {\n ...mentions.mention,\n // Sidebar tone + hairline so the popover reads as app chrome\n // (the same treatment the picker menus get) instead of the\n // brighter overlay tone the component defaults to.\n popoverClassName:\n mentionPopoverClassName ??\n 'bg-surface-container-low border-[var(--md3-outline-variant)]',\n }\n : undefined\n }\n controls={modes ?? <ComposerModeControls planMode={planMode} />}\n trailing={\n agent ? <ComposerAgentControls menuPlacement=\"down\" {...agent} /> : undefined\n }\n />\n {footer ? <div className=\"mt-7\">{footer}</div> : null}\n </div>\n </div>\n )\n}\n","import { ListChecks } from 'lucide-react'\nimport { cn } from '@tangle-network/sandbox-ui/utils'\nimport type { ComposerPlanModeSelection } from './types'\n\nexport interface ComposerModeControlsProps {\n /**\n * Plan-approval mode. Products pass it only when the selected backend can\n * propose a plan and wait for approval; omitted means nothing renders.\n */\n planMode?: ComposerPlanModeSelection\n}\n\n/**\n * The shared plan-mode toggle for the left side of an agent composer.\n * Plan mode is a behavioral switch, not part of the profile/backend/model/\n * thinking identity controls on the right.\n */\nexport function ComposerModeControls({ planMode }: ComposerModeControlsProps) {\n if (!planMode) return null\n\n return (\n <button\n type=\"button\"\n aria-pressed={planMode.enabled}\n disabled={planMode.saving}\n onClick={() => planMode.setEnabled(!planMode.enabled)}\n title=\"Plan mode: the agent proposes a plan you approve before it executes\"\n className={cn(\n 'inline-flex h-7 items-center gap-1 rounded-full border px-2.5 text-xs transition-colors',\n planMode.enabled\n ? 'border-primary/50 bg-primary/10 text-primary'\n : 'border-border bg-transparent text-muted-foreground hover:text-foreground',\n planMode.saving && 'opacity-60',\n )}\n >\n <ListChecks className=\"h-3.5 w-3.5\" />\n Plan\n </button>\n )\n}\n"],"mappings":";;;;;;;;;;;;AAAA,SAAS,aAAa,SAAS,cAAc;AAC7C;AAAA,EACE;AAAA,OAEK;AACP,SAAS,wBAAwB;AAsQ3B,mBACE,KADF;AA1JN,SAAS,oBACP,WACA,SACwC;AACxC,MAAI,CAAC,UAAW,QAAO;AACvB,MAAI,YAAY,OAAQ,QAAO;AAC/B,SAAO,UAAU,OAAO,CAAC,MAAM,MAAM,UAAU;AACjD;AAsBA,SAAS,iBACP,QACA,YACA,SACa;AACb,MAAI,YAAY,OAAQ,QAAO;AAC/B,SAAO,OAAO;AAAA,IACZ,CAAC,MACC,EAAE,OAAO,cACT,iBAAiB,CAAC,MAAM,cACxB,mBAAmB,CAA2B;AAAA,EAClD;AACF;AAgCO,SAAS,sBAAsB;AAAA,EACpC;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA,UAAU;AAAA,EACV,SAAS;AAAA,EACT;AAAA,EACA,wBAAwB;AAC1B,GAA+B;AAC7B,QAAM,oBAAoB,QAAQ,MAAM;AACtC,UAAM,WAAW,MAAM,OAAO,KAAK,CAAC,MAAM,EAAE,OAAO,MAAM,KAAK;AAC9D,QAAI,SAAU,QAAO,iBAAiB,QAAQ;AAG9C,WAAO,MAAM;AAAA,EACf,GAAG,CAAC,MAAM,OAAO,MAAM,MAAM,CAAC;AAE9B,QAAM,gBAAgB;AAAA,IACpB,MAAM,iBAAiB,MAAM,QAAQ,MAAM,OAAO,OAAO;AAAA,IACzD,CAAC,MAAM,QAAQ,MAAM,OAAO,OAAO;AAAA,EACrC;AAEA,QAAM,mBAAmB,OAAO,KAAK;AACrC,QAAM,kBAA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Q,kBAAO,IAAS;AAAA,SACnD;AAAA;AAAA,EACF;AAEJ;","names":["jsx","jsxs","jsx","jsxs"]}
|
|
@@ -43,10 +43,6 @@ import {
|
|
|
43
43
|
selectTickStep
|
|
44
44
|
} from "../chunk-KPRBFNGT.js";
|
|
45
45
|
import "../chunk-TZO3SOUL.js";
|
|
46
|
-
import {
|
|
47
|
-
DesignCanvasChromeLazy,
|
|
48
|
-
DesignCanvasLazy
|
|
49
|
-
} from "../chunk-OO4DROKM.js";
|
|
50
46
|
import "../chunk-ZN5J47UX.js";
|
|
51
47
|
import {
|
|
52
48
|
DEFAULT_INSERT_TEMPLATES,
|
|
@@ -87,6 +83,10 @@ import {
|
|
|
87
83
|
setPagePropsCommand,
|
|
88
84
|
ungroupElementCommand
|
|
89
85
|
} from "../chunk-O22STZ3P.js";
|
|
86
|
+
import {
|
|
87
|
+
DesignCanvasChromeLazy,
|
|
88
|
+
DesignCanvasLazy
|
|
89
|
+
} from "../chunk-OO4DROKM.js";
|
|
90
90
|
import {
|
|
91
91
|
assertSceneMediaSrc,
|
|
92
92
|
bleedAwareExportBounds,
|
|
@@ -0,0 +1,89 @@
|
|
|
1
|
+
import * as react from 'react';
|
|
2
|
+
import { ReactNode } from 'react';
|
|
3
|
+
import { SidebarLayoutProps, SidebarLayoutNavItem } from '@tangle-network/sandbox-ui/dashboard';
|
|
4
|
+
import { NavRouteDef, SessionSummary, SessionRowActions, RailPrefetch } from '../session-shell/index.js';
|
|
5
|
+
|
|
6
|
+
type WorkspaceIcon = SidebarLayoutNavItem['icon'];
|
|
7
|
+
/** The session data and product-owned URLs needed by the default workspace. */
|
|
8
|
+
interface AgentWorkspaceSessionConfig {
|
|
9
|
+
/** Icon shown beside the expandable History row. */
|
|
10
|
+
icon: WorkspaceIcon;
|
|
11
|
+
/** Id for the session row; defaults to `history`. */
|
|
12
|
+
id?: string;
|
|
13
|
+
/** Product copy for the session row; defaults to `History`. */
|
|
14
|
+
label?: string;
|
|
15
|
+
/** Full-history route used by the row and overflow item. */
|
|
16
|
+
href: string;
|
|
17
|
+
/** Product-owned URL for an individual session. */
|
|
18
|
+
hrefForSession: (sessionId: string) => string;
|
|
19
|
+
/** Server-loaded rows, ordered by the product's query. */
|
|
20
|
+
sessions: SessionSummary[];
|
|
21
|
+
/** Sessions created by another tab before the loader revalidates. */
|
|
22
|
+
optimisticSessions?: SessionSummary[];
|
|
23
|
+
/** Number of rows shown in the rail before the full-history link. */
|
|
24
|
+
limit?: number;
|
|
25
|
+
/** Total persisted session count, used to decide whether overflow exists. */
|
|
26
|
+
totalCount?: number;
|
|
27
|
+
/** Session currently open in the route. */
|
|
28
|
+
activeSessionId?: string | null;
|
|
29
|
+
/** Sessions with a live turn. */
|
|
30
|
+
respondingSessionIds?: ReadonlySet<string>;
|
|
31
|
+
/** Live unread ids from the product's event channel. */
|
|
32
|
+
liveUnreadIds?: ReadonlySet<string>;
|
|
33
|
+
/** Ids this tab has opened since the loader ran. */
|
|
34
|
+
locallyReadIds?: ReadonlySet<string>;
|
|
35
|
+
/** Optional product-owned rename/delete/pin actions. */
|
|
36
|
+
actions?: SessionRowActions<WorkspaceIcon>;
|
|
37
|
+
/** Label for the overflow row. Defaults to `View all chats`. */
|
|
38
|
+
overflowLabel?: string;
|
|
39
|
+
/** Empty state for the expanded rail row. Defaults to `No chats yet`. */
|
|
40
|
+
emptyLabel?: string;
|
|
41
|
+
/** Fallback title for untitled sessions. */
|
|
42
|
+
untitledLabel?: string;
|
|
43
|
+
/** Router prefetch behavior for session links. */
|
|
44
|
+
prefetch?: RailPrefetch;
|
|
45
|
+
/** Whether History starts expanded. Defaults to `true`. */
|
|
46
|
+
defaultOpen?: boolean;
|
|
47
|
+
}
|
|
48
|
+
/** Route data for the shared active-nav resolver. */
|
|
49
|
+
interface AgentWorkspaceActiveRoute {
|
|
50
|
+
/** Current browser pathname, including the product's workspace base. */
|
|
51
|
+
pathname: string;
|
|
52
|
+
/** Product route root, for example `/app/ws_123`. */
|
|
53
|
+
base: string;
|
|
54
|
+
/** Product-owned rail routes, relative to `base`. */
|
|
55
|
+
routes: NavRouteDef[];
|
|
56
|
+
/** Extra route prefixes that should highlight an existing row. */
|
|
57
|
+
aliases?: Record<string, string>;
|
|
58
|
+
/** Route prefixes that intentionally highlight no row. */
|
|
59
|
+
claimsNothing?: string[];
|
|
60
|
+
}
|
|
61
|
+
interface AgentWorkspaceLayoutProps extends Omit<SidebarLayoutProps, 'activeId' | 'children' | 'navItems' | 'hideBelow' | 'railLabels'> {
|
|
62
|
+
children: ReactNode;
|
|
63
|
+
/** Product-owned destinations. The shared History row is appended after them. */
|
|
64
|
+
navItems: SidebarLayoutNavItem[];
|
|
65
|
+
/** Omit for a workflow-only shell with no conversational session rail. */
|
|
66
|
+
sessions?: AgentWorkspaceSessionConfig;
|
|
67
|
+
/** When supplied, active navigation is resolved by the shared route rules. */
|
|
68
|
+
activeRoute?: AgentWorkspaceActiveRoute;
|
|
69
|
+
/** Escape hatch for routers that already resolved the active item. */
|
|
70
|
+
activeId?: string;
|
|
71
|
+
/** Hide the fixed desktop rail below this breakpoint. Defaults to `lg`. */
|
|
72
|
+
hideBelow?: SidebarLayoutProps['hideBelow'];
|
|
73
|
+
/** Show labels beside rail icons. Defaults to `true`. */
|
|
74
|
+
railLabels?: SidebarLayoutProps['railLabels'];
|
|
75
|
+
}
|
|
76
|
+
/**
|
|
77
|
+
* The default agent workspace composition.
|
|
78
|
+
*
|
|
79
|
+
* Products own their navigation taxonomy, routes, and session storage. This
|
|
80
|
+
* component owns the repeated assembly: the standard visual layout, the
|
|
81
|
+
* expandable History row, capped session composition, unread state, and active
|
|
82
|
+
* route resolution. The full History route and the empty-state composer stay
|
|
83
|
+
* separate because their data and domain copy belong to the product; pair this
|
|
84
|
+
* with `SessionHistoryPanel` and `EntryComposer` for the complete chat-first
|
|
85
|
+
* structure.
|
|
86
|
+
*/
|
|
87
|
+
declare function AgentWorkspaceLayout({ children, navItems, sessions, activeRoute, activeId, ...sidebarProps }: AgentWorkspaceLayoutProps): react.JSX.Element;
|
|
88
|
+
|
|
89
|
+
export { type AgentWorkspaceActiveRoute, AgentWorkspaceLayout, type AgentWorkspaceLayoutProps, type AgentWorkspaceSessionConfig };
|
|
@@ -0,0 +1,82 @@
|
|
|
1
|
+
import {
|
|
2
|
+
buildSessionNavItem,
|
|
3
|
+
composeSidebarSessions,
|
|
4
|
+
resolveActiveNavId
|
|
5
|
+
} from "../chunk-GINKOZFD.js";
|
|
6
|
+
|
|
7
|
+
// src/workspace-react/index.tsx
|
|
8
|
+
import { SidebarLayout } from "@tangle-network/sandbox-ui/dashboard";
|
|
9
|
+
import { jsx } from "react/jsx-runtime";
|
|
10
|
+
function routePathFromHref(href, base) {
|
|
11
|
+
const path = href.split(/[?#]/, 1)[0] ?? "";
|
|
12
|
+
const root = base.replace(/\/+$/, "");
|
|
13
|
+
if (path === root) return "/";
|
|
14
|
+
if (!path.startsWith(`${root}/`)) return null;
|
|
15
|
+
return path.slice(root.length);
|
|
16
|
+
}
|
|
17
|
+
function AgentWorkspaceLayout({
|
|
18
|
+
children,
|
|
19
|
+
navItems,
|
|
20
|
+
sessions,
|
|
21
|
+
activeRoute,
|
|
22
|
+
activeId,
|
|
23
|
+
...sidebarProps
|
|
24
|
+
}) {
|
|
25
|
+
const sessionNav = sessions ? (() => {
|
|
26
|
+
const composed = composeSidebarSessions({
|
|
27
|
+
loaderSessions: sessions.sessions,
|
|
28
|
+
optimisticSessions: sessions.optimisticSessions,
|
|
29
|
+
limit: sessions.limit ?? 20,
|
|
30
|
+
totalCount: sessions.totalCount,
|
|
31
|
+
liveUnreadIds: sessions.liveUnreadIds,
|
|
32
|
+
locallyReadIds: sessions.locallyReadIds,
|
|
33
|
+
currentSessionId: sessions.activeSessionId
|
|
34
|
+
});
|
|
35
|
+
return buildSessionNavItem({
|
|
36
|
+
id: sessions.id,
|
|
37
|
+
label: sessions.label,
|
|
38
|
+
icon: sessions.icon,
|
|
39
|
+
href: sessions.href,
|
|
40
|
+
sessions: composed.sessions,
|
|
41
|
+
hrefForSession: sessions.hrefForSession,
|
|
42
|
+
activeSessionId: sessions.activeSessionId,
|
|
43
|
+
respondingSessionIds: sessions.respondingSessionIds,
|
|
44
|
+
actions: sessions.actions,
|
|
45
|
+
overflow: composed.hasMore ? { href: sessions.href, label: sessions.overflowLabel } : void 0,
|
|
46
|
+
emptyLabel: sessions.emptyLabel,
|
|
47
|
+
untitledLabel: sessions.untitledLabel,
|
|
48
|
+
prefetch: sessions.prefetch,
|
|
49
|
+
defaultOpen: sessions.defaultOpen
|
|
50
|
+
});
|
|
51
|
+
})() : void 0;
|
|
52
|
+
const workspaceNavItems = sessionNav ? [...navItems, sessionNav] : navItems;
|
|
53
|
+
const historyRoutePath = sessions && activeRoute ? routePathFromHref(sessions.href, activeRoute.base) : null;
|
|
54
|
+
const resolvedActiveId = activeRoute ? resolveActiveNavId({
|
|
55
|
+
...activeRoute,
|
|
56
|
+
routes: sessionNav && historyRoutePath ? [
|
|
57
|
+
...activeRoute.routes,
|
|
58
|
+
{
|
|
59
|
+
id: sessions?.id ?? "history",
|
|
60
|
+
path: historyRoutePath
|
|
61
|
+
}
|
|
62
|
+
] : activeRoute.routes
|
|
63
|
+
}) : activeId;
|
|
64
|
+
const layoutProps = {
|
|
65
|
+
hideBelow: "lg",
|
|
66
|
+
railLabels: true,
|
|
67
|
+
...sidebarProps
|
|
68
|
+
};
|
|
69
|
+
return /* @__PURE__ */ jsx(
|
|
70
|
+
SidebarLayout,
|
|
71
|
+
{
|
|
72
|
+
...layoutProps,
|
|
73
|
+
navItems: workspaceNavItems,
|
|
74
|
+
activeId: resolvedActiveId,
|
|
75
|
+
children
|
|
76
|
+
}
|
|
77
|
+
);
|
|
78
|
+
}
|
|
79
|
+
export {
|
|
80
|
+
AgentWorkspaceLayout
|
|
81
|
+
};
|
|
82
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../src/workspace-react/index.tsx"],"sourcesContent":["import { SidebarLayout, type SidebarLayoutNavItem, type SidebarLayoutProps } from '@tangle-network/sandbox-ui/dashboard'\nimport type { ReactNode } from 'react'\n\nimport {\n buildSessionNavItem,\n composeSidebarSessions,\n resolveActiveNavId,\n type NavRouteDef,\n type RailPrefetch,\n type SessionRowActions,\n type SessionSummary,\n} from '../session-shell'\n\ntype WorkspaceIcon = SidebarLayoutNavItem['icon']\n\nfunction routePathFromHref(href: string, base: string): string | null {\n const path = href.split(/[?#]/, 1)[0] ?? ''\n const root = base.replace(/\\/+$/, '')\n if (path === root) return '/'\n if (!path.startsWith(`${root}/`)) return null\n return path.slice(root.length)\n}\n\n/** The session data and product-owned URLs needed by the default workspace. */\nexport interface AgentWorkspaceSessionConfig {\n /** Icon shown beside the expandable History row. */\n icon: WorkspaceIcon\n /** Id for the session row; defaults to `history`. */\n id?: string\n /** Product copy for the session row; defaults to `History`. */\n label?: string\n /** Full-history route used by the row and overflow item. */\n href: string\n /** Product-owned URL for an individual session. */\n hrefForSession: (sessionId: string) => string\n /** Server-loaded rows, ordered by the product's query. */\n sessions: SessionSummary[]\n /** Sessions created by another tab before the loader revalidates. */\n optimisticSessions?: SessionSummary[]\n /** Number of rows shown in the rail before the full-history link. */\n limit?: number\n /** Total persisted session count, used to decide whether overflow exists. */\n totalCount?: number\n /** Session currently open in the route. */\n activeSessionId?: string | null\n /** Sessions with a live turn. */\n respondingSessionIds?: ReadonlySet<string>\n /** Live unread ids from the product's event channel. */\n liveUnreadIds?: ReadonlySet<string>\n /** Ids this tab has opened since the loader ran. */\n locallyReadIds?: ReadonlySet<string>\n /** Optional product-owned rename/delete/pin actions. */\n actions?: SessionRowActions<WorkspaceIcon>\n /** Label for the overflow row. Defaults to `View all chats`. */\n overflowLabel?: string\n /** Empty state for the expanded rail row. Defaults to `No chats yet`. */\n emptyLabel?: string\n /** Fallback title for untitled sessions. */\n untitledLabel?: string\n /** Router prefetch behavior for session links. */\n prefetch?: RailPrefetch\n /** Whether History starts expanded. Defaults to `true`. */\n defaultOpen?: boolean\n}\n\n/** Route data for the shared active-nav resolver. */\nexport interface AgentWorkspaceActiveRoute {\n /** Current browser pathname, including the product's workspace base. */\n pathname: string\n /** Product route root, for example `/app/ws_123`. */\n base: string\n /** Product-owned rail routes, relative to `base`. */\n routes: NavRouteDef[]\n /** Extra route prefixes that should highlight an existing row. */\n aliases?: Record<string, string>\n /** Route prefixes that intentionally highlight no row. */\n claimsNothing?: string[]\n}\n\nexport interface AgentWorkspaceLayoutProps\n extends Omit<SidebarLayoutProps, 'activeId' | 'children' | 'navItems' | 'hideBelow' | 'railLabels'> {\n children: ReactNode\n /** Product-owned destinations. The shared History row is appended after them. */\n navItems: SidebarLayoutNavItem[]\n /** Omit for a workflow-only shell with no conversational session rail. */\n sessions?: AgentWorkspaceSessionConfig\n /** When supplied, active navigation is resolved by the shared route rules. */\n activeRoute?: AgentWorkspaceActiveRoute\n /** Escape hatch for routers that already resolved the active item. */\n activeId?: string\n /** Hide the fixed desktop rail below this breakpoint. Defaults to `lg`. */\n hideBelow?: SidebarLayoutProps['hideBelow']\n /** Show labels beside rail icons. Defaults to `true`. */\n railLabels?: SidebarLayoutProps['railLabels']\n}\n\n/**\n * The default agent workspace composition.\n *\n * Products own their navigation taxonomy, routes, and session storage. This\n * component owns the repeated assembly: the standard visual layout, the\n * expandable History row, capped session composition, unread state, and active\n * route resolution. The full History route and the empty-state composer stay\n * separate because their data and domain copy belong to the product; pair this\n * with `SessionHistoryPanel` and `EntryComposer` for the complete chat-first\n * structure.\n */\nexport function AgentWorkspaceLayout({\n children,\n navItems,\n sessions,\n activeRoute,\n activeId,\n ...sidebarProps\n}: AgentWorkspaceLayoutProps) {\n const sessionNav = sessions\n ? (() => {\n const composed = composeSidebarSessions({\n loaderSessions: sessions.sessions,\n optimisticSessions: sessions.optimisticSessions,\n limit: sessions.limit ?? 20,\n totalCount: sessions.totalCount,\n liveUnreadIds: sessions.liveUnreadIds,\n locallyReadIds: sessions.locallyReadIds,\n currentSessionId: sessions.activeSessionId,\n })\n\n return buildSessionNavItem<WorkspaceIcon>({\n id: sessions.id,\n label: sessions.label,\n icon: sessions.icon,\n href: sessions.href,\n sessions: composed.sessions,\n hrefForSession: sessions.hrefForSession,\n activeSessionId: sessions.activeSessionId,\n respondingSessionIds: sessions.respondingSessionIds,\n actions: sessions.actions,\n overflow: composed.hasMore\n ? { href: sessions.href, label: sessions.overflowLabel }\n : undefined,\n emptyLabel: sessions.emptyLabel,\n untitledLabel: sessions.untitledLabel,\n prefetch: sessions.prefetch,\n defaultOpen: sessions.defaultOpen,\n })\n })()\n : undefined\n\n const workspaceNavItems: SidebarLayoutNavItem[] = sessionNav\n ? [...navItems, sessionNav]\n : navItems\n\n const historyRoutePath = sessions && activeRoute\n ? routePathFromHref(sessions.href, activeRoute.base)\n : null\n\n const resolvedActiveId = activeRoute\n ? resolveActiveNavId({\n ...activeRoute,\n routes: sessionNav && historyRoutePath\n ? [\n ...activeRoute.routes,\n {\n id: sessions?.id ?? 'history',\n path: historyRoutePath,\n },\n ]\n : activeRoute.routes,\n })\n : activeId\n\n const layoutProps = {\n hideBelow: 'lg' as const,\n railLabels: true,\n ...sidebarProps,\n }\n\n return (\n <SidebarLayout\n {...layoutProps}\n navItems={workspaceNavItems}\n activeId={resolvedActiveId}\n >\n {children}\n </SidebarLayout>\n )\n}\n"],"mappings":";;;;;;;AAAA,SAAS,qBAAyE;AAkL9E;AAnKJ,SAAS,kBAAkB,MAAc,MAA6B;AACpE,QAAM,OAAO,KAAK,MAAM,QAAQ,CAAC,EAAE,CAAC,KAAK;AACzC,QAAM,OAAO,KAAK,QAAQ,QAAQ,EAAE;AACpC,MAAI,SAAS,KAAM,QAAO;AAC1B,MAAI,CAAC,KAAK,WAAW,GAAG,IAAI,GAAG,EAAG,QAAO;AACzC,SAAO,KAAK,MAAM,KAAK,MAAM;AAC/B;AAsFO,SAAS,qBAAqB;AAAA,EACnC;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAA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AAAA,MACJ,UAAU;AAAA,MACV,UAAU;AAAA,MAET;AAAA;AAAA,EACH;AAEJ;","names":[]}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@tangle-network/agent-app",
|
|
3
|
-
"version": "0.45.
|
|
3
|
+
"version": "0.45.14",
|
|
4
4
|
"packageManager": "pnpm@11.17.0",
|
|
5
5
|
"description": "Build agent applications with typed chat, tools, sandboxes, integrations, billing, and evaluation.",
|
|
6
6
|
"keywords": [
|
|
@@ -243,6 +243,11 @@
|
|
|
243
243
|
"import": "./dist/chat-react/index.js",
|
|
244
244
|
"default": "./dist/chat-react/index.js"
|
|
245
245
|
},
|
|
246
|
+
"./workspace-react": {
|
|
247
|
+
"types": "./dist/workspace-react/index.d.ts",
|
|
248
|
+
"import": "./dist/workspace-react/index.js",
|
|
249
|
+
"default": "./dist/workspace-react/index.js"
|
|
250
|
+
},
|
|
246
251
|
"./assistant": {
|
|
247
252
|
"types": "./dist/assistant/index.d.ts",
|
|
248
253
|
"import": "./dist/assistant/index.js",
|