@truefoundry/trueforge-ui 0.1.0 → 0.2.1
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/CHANGELOG.md +34 -15
- package/README.md +38 -38
- package/dist/{ConnectorSettings-H37ZFC6Z.js → ConnectorSettings-XEO5ZQO5.js} +8 -6
- package/dist/{ConnectorSettings-H37ZFC6Z.js.map → ConnectorSettings-XEO5ZQO5.js.map} +1 -1
- package/dist/{DockLayout-KEMFRWIR.js → DockLayout-F2KYSY4U.js} +10 -8
- package/dist/{DockLayout-KEMFRWIR.js.map → DockLayout-F2KYSY4U.js.map} +1 -1
- package/dist/{DrawerLayout-ZVWCKEIS.js → DrawerLayout-FJ7XC2FU.js} +12 -9
- package/dist/{DrawerLayout-ZVWCKEIS.js.map → DrawerLayout-FJ7XC2FU.js.map} +1 -1
- package/dist/{ModelSettings-QJMYHCMD.js → ModelSettings-2QB7LE22.js} +8 -6
- package/dist/{ModelSettings-QJMYHCMD.js.map → ModelSettings-2QB7LE22.js.map} +1 -1
- package/dist/OpenUiFenceBlock-3EFPY4JW.js +9 -0
- package/dist/{SandboxSettings-BUBMLW7Q.js → SandboxSettings-QDDIPRBP.js} +8 -6
- package/dist/{SandboxSettings-BUBMLW7Q.js.map → SandboxSettings-QDDIPRBP.js.map} +1 -1
- package/dist/{SettingsBuilder-26XSGIHK.js → SettingsBuilder-4NF3Y7UZ.js} +10 -8
- package/dist/{SettingsBuilder-26XSGIHK.js.map → SettingsBuilder-4NF3Y7UZ.js.map} +1 -1
- package/dist/ShellRouteSync-T4WLY57Q.js +172 -0
- package/dist/ShellRouteSync-T4WLY57Q.js.map +1 -0
- package/dist/{SidebarLayout-F3XFXW7B.js → SidebarLayout-KX6RSJTP.js} +12 -9
- package/dist/{SidebarLayout-F3XFXW7B.js.map → SidebarLayout-KX6RSJTP.js.map} +1 -1
- package/dist/{SkillSettings-IRMGDFRG.js → SkillSettings-5EETEEDI.js} +8 -6
- package/dist/{SkillSettings-IRMGDFRG.js.map → SkillSettings-5EETEEDI.js.map} +1 -1
- package/dist/TrueForgeUIWithRouter-IAQQTD5V.js +30 -0
- package/dist/TrueForgeUIWithRouter-IAQQTD5V.js.map +1 -0
- package/dist/{WidgetLayout-SZMABKIR.js → WidgetLayout-S6EK62TZ.js} +10 -8
- package/dist/{WidgetLayout-SZMABKIR.js.map → WidgetLayout-S6EK62TZ.js.map} +1 -1
- package/dist/chunk-72LC2M3R.js +567 -0
- package/dist/chunk-72LC2M3R.js.map +1 -0
- package/dist/chunk-EKVN6QSO.js +493 -0
- package/dist/chunk-EKVN6QSO.js.map +1 -0
- package/dist/chunk-FXCYLEFB.js +64 -0
- package/dist/chunk-FXCYLEFB.js.map +1 -0
- package/dist/chunk-IFLE7OMM.js +527 -0
- package/dist/chunk-IFLE7OMM.js.map +1 -0
- package/dist/{chunk-HT5HKQXE.js → chunk-JRRCAKEP.js} +2 -2
- package/dist/{chunk-7EEOWDLE.js → chunk-PTYEOSHT.js} +10 -8
- package/dist/{chunk-7EEOWDLE.js.map → chunk-PTYEOSHT.js.map} +1 -1
- package/dist/{chunk-H7DR64W3.js → chunk-UACLSDNL.js} +39 -94
- package/dist/chunk-UACLSDNL.js.map +1 -0
- package/dist/{chunk-QGNLP2EE.js → chunk-UU7C5DQ3.js} +18 -8
- package/dist/chunk-UU7C5DQ3.js.map +1 -0
- package/dist/chunk-WQULF5AT.js +460 -0
- package/dist/chunk-WQULF5AT.js.map +1 -0
- package/dist/{chunk-LRQHHZDX.js → chunk-X6U2Q7X5.js} +7 -5
- package/dist/{chunk-LRQHHZDX.js.map → chunk-X6U2Q7X5.js.map} +1 -1
- package/dist/chunk-YIWUG6MC.js +101 -0
- package/dist/chunk-YIWUG6MC.js.map +1 -0
- package/dist/index.d.ts +57 -9
- package/dist/index.js +41 -428
- package/dist/index.js.map +1 -1
- package/dist/plugins/trueforge-agent-server-adapter/index.js.map +1 -1
- package/dist/styles.css +1 -1
- package/package.json +9 -6
- package/dist/OpenUiFenceBlock-XFBUGPKQ.js +0 -9
- package/dist/chunk-DTF7ZMUJ.js +0 -567
- package/dist/chunk-DTF7ZMUJ.js.map +0 -1
- package/dist/chunk-H7DR64W3.js.map +0 -1
- package/dist/chunk-QGNLP2EE.js.map +0 -1
- package/dist/chunk-XAZ5HJXV.js +0 -862
- package/dist/chunk-XAZ5HJXV.js.map +0 -1
- /package/dist/{OpenUiFenceBlock-XFBUGPKQ.js.map → OpenUiFenceBlock-3EFPY4JW.js.map} +0 -0
- /package/dist/{chunk-HT5HKQXE.js.map → chunk-JRRCAKEP.js.map} +0 -0
package/CHANGELOG.md
CHANGED
|
@@ -1,10 +1,29 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## 0.2.1
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- c5223ad: Ship `react-dom` and `react-router-dom` as package dependencies instead of peers so consumers no longer need to install them separately.
|
|
8
|
+
- 92ee970: Decode common escape sequences (`\n`, `\t`, `\r`, `\uXXXX`, …) in user-facing API error messages and render them with `whitespace-pre-wrap` so multi-line Zod validation output displays correctly.
|
|
9
|
+
- 53104b1: Keep active and remembered draft sandbox settings synchronized with server capabilities.
|
|
10
|
+
|
|
11
|
+
## 0.2.0
|
|
12
|
+
|
|
13
|
+
### Minor Changes
|
|
14
|
+
|
|
15
|
+
- 9a4d1a7: Add opt-in `withRouter` URL sync for shell places (`/`, `/agents/:agentName`, `/sessions/:sessionId`, `/settings`), with path customization via `routes` and `react-router-dom` as an optional peer. Serve the app shell for client-side deep links from the TrueForge server.
|
|
16
|
+
|
|
17
|
+
### Patch Changes
|
|
18
|
+
|
|
19
|
+
- Updated dependencies [5100c59]
|
|
20
|
+
- @truefoundry/trueforge-sdk@0.1.1
|
|
21
|
+
|
|
3
22
|
## 0.1.0
|
|
4
23
|
|
|
5
24
|
### Minor Changes
|
|
6
25
|
|
|
7
|
-
- 2f08a99: Remember plain-draft composer choices (model, skills, MCP connectors, config) across New Chat and reloads via localStorage. Edit-flow and immutable library agents are unchanged. `
|
|
26
|
+
- 2f08a99: Remember plain-draft composer choices (model, skills, MCP connectors, config) across New Chat and reloads via localStorage. Edit-flow and immutable library agents are unchanged. `TrueForgeUI` `layout` is optional and defaults to `"sidebar"`.
|
|
8
27
|
- b56c003: Initial 0.1.0-rc.1 prerelease of all public packages.
|
|
9
28
|
|
|
10
29
|
### Patch Changes
|
|
@@ -20,7 +39,7 @@
|
|
|
20
39
|
|
|
21
40
|
### Minor Changes
|
|
22
41
|
|
|
23
|
-
- 2f08a99: Remember plain-draft composer choices (model, skills, MCP connectors, config) across New Chat and reloads via localStorage. Edit-flow and immutable library agents are unchanged. `
|
|
42
|
+
- 2f08a99: Remember plain-draft composer choices (model, skills, MCP connectors, config) across New Chat and reloads via localStorage. Edit-flow and immutable library agents are unchanged. `TrueForgeUI` `layout` is optional and defaults to `"sidebar"`.
|
|
24
43
|
|
|
25
44
|
### Patch Changes
|
|
26
45
|
|
|
@@ -83,8 +102,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
|
|
83
102
|
config choices are remembered (in-memory + `localStorage`) and seed the next
|
|
84
103
|
New Chat after reload. Stale catalog entries are pruned once catalogs load.
|
|
85
104
|
Edit-flow (`agentId` set) and immutable library agents are unchanged.
|
|
86
|
-
- **Optional `layout`** — `<
|
|
87
|
-
- **`type: "trueforge"` built-in server** — `<
|
|
105
|
+
- **Optional `layout`** — `<TrueForgeUI />` `layout` prop defaults to `"sidebar"`.
|
|
106
|
+
- **`type: "trueforge"` built-in server** — `<TrueForgeUI server={{ type: 'trueforge', baseUrl?, token?, fetch? }} />`
|
|
88
107
|
resolves a full Harness `AgentUIServer` via
|
|
89
108
|
`@truefoundry/trueforge-ui/plugins/trueforge-agent-server-adapter`
|
|
90
109
|
(`createTrueForgeAgentUIServer`), including chat, builder, and default settings
|
|
@@ -164,9 +183,9 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
|
|
164
183
|
Save Agent / welcome chrome key off `isMutable`, not draft|named.
|
|
165
184
|
Hosts that inspected `mode.type` must switch to `mode.status` /
|
|
166
185
|
`mode.isMutable` (see `shellIsMutable`).
|
|
167
|
-
- **Renamed `TrueFoundryAssistantUI` → `
|
|
168
|
-
`TrueFoundryAssistantUIProps` → `
|
|
169
|
-
- **`
|
|
186
|
+
- **Renamed `TrueFoundryAssistantUI` → `TrueForgeUI`** (props type
|
|
187
|
+
`TrueFoundryAssistantUIProps` → `TrueForgeUIProps`). Update imports and JSX.
|
|
188
|
+
- **`TrueForgeUI` agent props** — replaced top-level `agentName` and
|
|
170
189
|
`defaultAgentSpec` with a single discriminated `agentConfig`. There is no
|
|
171
190
|
compat shim; hosts must update call sites.
|
|
172
191
|
- **Icons use Lucide** (`lucide-react`) instead of Font Awesome. Default
|
|
@@ -220,10 +239,10 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
|
|
220
239
|
`CreateSandboxRequest`, `UpdateSandboxRequest`, `SandboxCatalogServer`.
|
|
221
240
|
`apiKey` is never stored in the catalog and is optional on update (blank keeps
|
|
222
241
|
the existing key).
|
|
223
|
-
- `
|
|
242
|
+
- `TrueForgeBuiltInServerConfig` exported for hosts that build the built-in
|
|
224
243
|
config separately.
|
|
225
244
|
|
|
226
|
-
- **`agentConfig` shell modes** on `
|
|
245
|
+
- **`agentConfig` shell modes** on `TrueForgeUI` /
|
|
227
246
|
`ShellModeProvider`:
|
|
228
247
|
- `SingleAgent` — locked named agent (`name` required)
|
|
229
248
|
- `AgentLibrary` — Agents Library only; idle empty state until pick; no New Chat
|
|
@@ -259,8 +278,8 @@ import { TrueFoundryAssistantUI } from '@truefoundry/trueforge-ui';
|
|
|
259
278
|
<TrueFoundryAssistantUI server={server} layout="sidebar" />;
|
|
260
279
|
|
|
261
280
|
// After
|
|
262
|
-
import {
|
|
263
|
-
<
|
|
281
|
+
import { TrueForgeUI } from '@truefoundry/trueforge-ui';
|
|
282
|
+
<TrueForgeUI server={server} layout="sidebar" />;
|
|
264
283
|
```
|
|
265
284
|
|
|
266
285
|
#### `agentConfig` (host must update)
|
|
@@ -282,12 +301,12 @@ import { TrueforgeUI } from '@truefoundry/trueforge-ui';
|
|
|
282
301
|
/>
|
|
283
302
|
|
|
284
303
|
// After
|
|
285
|
-
<
|
|
304
|
+
<TrueForgeUI
|
|
286
305
|
server={server}
|
|
287
306
|
layout="sidebar"
|
|
288
307
|
agentConfig={{ mode: "SingleAgent", name: "support-agent" }}
|
|
289
308
|
/>
|
|
290
|
-
<
|
|
309
|
+
<TrueForgeUI
|
|
291
310
|
server={server}
|
|
292
311
|
layout="sidebar"
|
|
293
312
|
agentConfig={{
|
|
@@ -336,7 +355,7 @@ import { TrueforgeUI } from '@truefoundry/trueforge-ui';
|
|
|
336
355
|
|
|
337
356
|
### Added
|
|
338
357
|
|
|
339
|
-
- `
|
|
358
|
+
- `TrueForgeUI` quick-start component with `layout`: `sidebar` | `drawer` |
|
|
340
359
|
`dock` | `widget` (slots outside the chat provider so toast overrides apply).
|
|
341
360
|
- Curated re-exports: `useAui`, `useAuiState`, `AssistantState` from the main
|
|
342
361
|
barrel and `@truefoundry/trueforge-ui/assistant-ui`; `useTheme` from the main
|
|
@@ -368,7 +387,7 @@ import { TrueforgeUI } from '@truefoundry/trueforge-ui';
|
|
|
368
387
|
- Font Awesome packages this SDK imports (`fontawesome-svg-core`,
|
|
369
388
|
`free-solid-svg-icons`) moved to `dependencies`.
|
|
370
389
|
- `SlotOverrides` is `Partial<AtomSlots>` only (no `Record<string, unknown>`).
|
|
371
|
-
- `
|
|
390
|
+
- `TrueForgeUI` lazy-layout `Suspense` fallback is a pulse skeleton
|
|
372
391
|
instead of blank.
|
|
373
392
|
- README reordered: quick start (prefer `client`) before advanced sections.
|
|
374
393
|
|
package/README.md
CHANGED
|
@@ -12,7 +12,7 @@ Powered by [assistant-ui](https://www.assistant-ui.com/), it follows the familia
|
|
|
12
12
|
|
|
13
13
|
- **Fully themeable** — Use built-in themes inspired by **TrueFoundry**, **ChatGPT**, **Claude**, and **Gemini**, or create your own brand identity.
|
|
14
14
|
- **Composable by design** — Swap layouts, components, and interaction patterns to fit your product.
|
|
15
|
-
- **Backend agnostic** — Connect to **TrueFoundry**, **TrueForge**, or any custom API via `
|
|
15
|
+
- **Backend agnostic** — Connect to **TrueFoundry**, **TrueForge**, or any custom API via `TrueForgeServerConfig`.
|
|
16
16
|
- **Open source** — Extend, customize, and contribute without vendor lock-in.
|
|
17
17
|
- **Built on assistant-ui** — Leverage a modern React foundation with seamless shadcn/ui and Tailwind CSS integration.
|
|
18
18
|
- **Production ready** — Focus on your agents while the SDK handles the chat experience.
|
|
@@ -27,7 +27,7 @@ Bring your own **brand, colors, layout, components, and server**—the Agent SDK
|
|
|
27
27
|
|
|
28
28
|
- [Installation](#installation)
|
|
29
29
|
- [Getting started](#getting-started)
|
|
30
|
-
- [`<
|
|
30
|
+
- [`<TrueForgeUI />` props](#trueforgeui--props)
|
|
31
31
|
- [Theming](#theming)
|
|
32
32
|
- [Content classNames](#content-classnames)
|
|
33
33
|
- [Brand / logo](#brand--logo)
|
|
@@ -60,7 +60,7 @@ and your app chrome work alongside the SDK. In the host stylesheet:
|
|
|
60
60
|
@import 'tailwindcss';
|
|
61
61
|
```
|
|
62
62
|
|
|
63
|
-
SDK styles (tokens, utilities, OpenUI) load automatically when `
|
|
63
|
+
SDK styles (tokens, utilities, OpenUI) load automatically when `TrueForgeUI` /
|
|
64
64
|
`ThemeProvider` mounts — you do **not** need to import the SDK stylesheet for
|
|
65
65
|
client-only apps.
|
|
66
66
|
|
|
@@ -83,12 +83,12 @@ Zero-config path: the SDK builds the agent UI server from your API key and
|
|
|
83
83
|
control plane URL (optional explicit gateway URL).
|
|
84
84
|
|
|
85
85
|
```tsx
|
|
86
|
-
import {
|
|
86
|
+
import { TrueForgeUI } from '@truefoundry/trueforge-ui';
|
|
87
87
|
|
|
88
88
|
export default function App() {
|
|
89
89
|
return (
|
|
90
90
|
<div style={{ height: '100dvh' }}>
|
|
91
|
-
<
|
|
91
|
+
<TrueForgeUI
|
|
92
92
|
server={{
|
|
93
93
|
type: 'truefoundry',
|
|
94
94
|
apiKey: process.env.TFY_API_KEY!,
|
|
@@ -118,12 +118,12 @@ pnpm add @truefoundry/trueforge-sdk
|
|
|
118
118
|
**Bearer token (embeds / remote API):**
|
|
119
119
|
|
|
120
120
|
```tsx
|
|
121
|
-
import {
|
|
121
|
+
import { TrueForgeUI } from '@truefoundry/trueforge-ui';
|
|
122
122
|
|
|
123
123
|
export default function App() {
|
|
124
124
|
return (
|
|
125
125
|
<div style={{ height: '100dvh' }}>
|
|
126
|
-
<
|
|
126
|
+
<TrueForgeUI
|
|
127
127
|
server={{
|
|
128
128
|
type: 'trueforge',
|
|
129
129
|
baseUrl: process.env.TRUEFORGE_BASE_URL, // optional; default '/'
|
|
@@ -140,7 +140,7 @@ export default function App() {
|
|
|
140
140
|
auth-aware wrapper that follows OIDC cookies):
|
|
141
141
|
|
|
142
142
|
```tsx
|
|
143
|
-
<
|
|
143
|
+
<TrueForgeUI
|
|
144
144
|
server={{
|
|
145
145
|
type: 'trueforge',
|
|
146
146
|
baseUrl: '/',
|
|
@@ -157,7 +157,7 @@ auth-aware wrapper that follows OIDC cookies):
|
|
|
157
157
|
Optional: pass `catalog` to override the built-in settings catalogs, or import
|
|
158
158
|
`createTrueForgeAgentUIServer` from
|
|
159
159
|
`@truefoundry/trueforge-ui/plugins/trueforge-agent-server-adapter` when you need
|
|
160
|
-
the factory outside `<
|
|
160
|
+
the factory outside `<TrueForgeUI />`.
|
|
161
161
|
|
|
162
162
|
**Custom** — bring your own `AgentUIServer`
|
|
163
163
|
|
|
@@ -165,7 +165,7 @@ Use this when you compose chat + builder yourself (e.g. chat-only gateway
|
|
|
165
165
|
adapter + stub catalog, or a full host BFF). Pass the server object directly.
|
|
166
166
|
|
|
167
167
|
```tsx
|
|
168
|
-
import {
|
|
168
|
+
import { TrueForgeUI, createTrueFoundryServer } from '@truefoundry/trueforge-ui';
|
|
169
169
|
import { createTrueFoundryChatServer } from '@truefoundry/assistant-ui-runtime/plugins/truefoundry-agent-server-adapter';
|
|
170
170
|
|
|
171
171
|
const chatServer = createTrueFoundryChatServer({
|
|
@@ -185,18 +185,18 @@ const server = createTrueFoundryServer({
|
|
|
185
185
|
export default function App() {
|
|
186
186
|
return (
|
|
187
187
|
<div style={{ height: '100dvh' }}>
|
|
188
|
-
<
|
|
188
|
+
<TrueForgeUI server={server} layout="sidebar" />
|
|
189
189
|
</div>
|
|
190
190
|
);
|
|
191
191
|
}
|
|
192
192
|
```
|
|
193
193
|
|
|
194
|
-
## `<
|
|
194
|
+
## `<TrueForgeUI />` props
|
|
195
195
|
|
|
196
|
-
`<
|
|
196
|
+
`<TrueForgeUI />` is the single entry point. Every capability is driven by a prop.
|
|
197
197
|
|
|
198
198
|
```tsx
|
|
199
|
-
<
|
|
199
|
+
<TrueForgeUI
|
|
200
200
|
server={{
|
|
201
201
|
type: 'truefoundry',
|
|
202
202
|
apiKey: process.env.TFY_API_KEY!,
|
|
@@ -218,7 +218,7 @@ export default function App() {
|
|
|
218
218
|
|
|
219
219
|
| Prop | Type | Required | Description |
|
|
220
220
|
| ------------------ | -------------------------- | -------- | ------------------------------------------------------------------------------------------------------------------ |
|
|
221
|
-
| `server` | `
|
|
221
|
+
| `server` | `TrueForgeServerConfig` | ✅ | Built-in config (`truefoundry` / `trueforge`) **or** a ready `AgentUIServer`. |
|
|
222
222
|
| `layout` | `LayoutProp` | ✅ | Built-in layout string **or** a custom React component. |
|
|
223
223
|
| `agentConfig` | `AgentConfig` | — | Shell mode: SingleAgent / AgentLibrary / AgentComposer / AgentLibraryWithComposer. Defaults to library + composer. |
|
|
224
224
|
| `theme` | `ThemeConfig` | — | Preset, mode, tokens, brand, icons, **content `classNames`** (see [Theming](#theming)). |
|
|
@@ -227,7 +227,7 @@ export default function App() {
|
|
|
227
227
|
| `initialSessionId` | `string` | — | Resume a specific session. |
|
|
228
228
|
| `onError` | `(error: unknown) => void` | — | Host error hook (runtime + server init). |
|
|
229
229
|
|
|
230
|
-
Later sections use `server` as a `
|
|
230
|
+
Later sections use `server` as a `TrueForgeServerConfig` (usually `type: "truefoundry"`). For a host-built port, pass the `AgentUIServer` directly.
|
|
231
231
|
|
|
232
232
|
---
|
|
233
233
|
|
|
@@ -242,7 +242,7 @@ const server = {
|
|
|
242
242
|
controlPlaneURL: process.env.TFY_CONTROL_PLANE_URL!,
|
|
243
243
|
};
|
|
244
244
|
|
|
245
|
-
<
|
|
245
|
+
<TrueForgeUI
|
|
246
246
|
server={server}
|
|
247
247
|
layout="sidebar"
|
|
248
248
|
theme={{
|
|
@@ -280,11 +280,11 @@ See [docs/theming.md](./docs/theming.md) for presets, controlled vs uncontrolled
|
|
|
280
280
|
## Content classNames
|
|
281
281
|
|
|
282
282
|
Style content renderers (markdown, code fences, OpenUI, Monaco) without swapping
|
|
283
|
-
slots. Pass `theme.classNames` on `<
|
|
283
|
+
slots. Pass `theme.classNames` on `<TrueForgeUI />` — values merge onto the
|
|
284
284
|
defaults via `cn()`:
|
|
285
285
|
|
|
286
286
|
```tsx
|
|
287
|
-
<
|
|
287
|
+
<TrueForgeUI
|
|
288
288
|
server={server}
|
|
289
289
|
layout="sidebar"
|
|
290
290
|
theme={{
|
|
@@ -324,7 +324,7 @@ package). Host CSS on `.aui-markdown` / `.aui-syntax-highlighter` / `.aui-openui
|
|
|
324
324
|
**Base layouts** — pass `theme.brand` and the SDK positions the mark + name in the default slots:
|
|
325
325
|
|
|
326
326
|
```tsx
|
|
327
|
-
<
|
|
327
|
+
<TrueForgeUI
|
|
328
328
|
server={server}
|
|
329
329
|
layout="sidebar"
|
|
330
330
|
theme={{
|
|
@@ -340,7 +340,7 @@ package). Host CSS on `.aui-markdown` / `.aui-syntax-highlighter` / `.aui-openui
|
|
|
340
340
|
the resolved mode. `href` wraps the logo in a same-tab link:
|
|
341
341
|
|
|
342
342
|
```tsx
|
|
343
|
-
<
|
|
343
|
+
<TrueForgeUI
|
|
344
344
|
server={server}
|
|
345
345
|
layout="sidebar"
|
|
346
346
|
theme={{
|
|
@@ -358,7 +358,7 @@ Set only one mode and it is used for both. `name` labels the image, so no `alt`
|
|
|
358
358
|
component, override the `BrandLogo` slot, the same way you replace any other atom:
|
|
359
359
|
|
|
360
360
|
```tsx
|
|
361
|
-
<
|
|
361
|
+
<TrueForgeUI server={server} layout="sidebar" overrides={{ BrandLogo: MyMark }} />
|
|
362
362
|
```
|
|
363
363
|
|
|
364
364
|
**Custom layouts** — import `BrandLogo` and place it anywhere; pair it with `useBrandName()` when you also want the name as text (see [Custom layouts](#custom-layouts)).
|
|
@@ -384,22 +384,22 @@ In library modes, picking an agent from the Agents Library switches to a named c
|
|
|
384
384
|
{
|
|
385
385
|
/* Library + draft (default) */
|
|
386
386
|
}
|
|
387
|
-
<
|
|
387
|
+
<TrueForgeUI server={server} layout="sidebar" />;
|
|
388
388
|
|
|
389
389
|
{
|
|
390
390
|
/* Named-only lock */
|
|
391
391
|
}
|
|
392
|
-
<
|
|
392
|
+
<TrueForgeUI server={server} layout="sidebar" agentConfig={{ mode: 'SingleAgent', name: 'support-agent' }} />;
|
|
393
393
|
|
|
394
394
|
{
|
|
395
395
|
/* Library only — select an agent to start */
|
|
396
396
|
}
|
|
397
|
-
<
|
|
397
|
+
<TrueForgeUI server={server} layout="sidebar" agentConfig={{ mode: 'AgentLibrary' }} />;
|
|
398
398
|
|
|
399
399
|
{
|
|
400
400
|
/* Composer only */
|
|
401
401
|
}
|
|
402
|
-
<
|
|
402
|
+
<TrueForgeUI
|
|
403
403
|
server={server}
|
|
404
404
|
layout="sidebar"
|
|
405
405
|
agentConfig={{
|
|
@@ -456,10 +456,10 @@ function Layout({ className }: { className?: string }) {
|
|
|
456
456
|
);
|
|
457
457
|
}
|
|
458
458
|
|
|
459
|
-
<
|
|
459
|
+
<TrueForgeUI server={server} layout={Layout} />;
|
|
460
460
|
```
|
|
461
461
|
|
|
462
|
-
For deeper composition without `
|
|
462
|
+
For deeper composition without `TrueForgeUI`, nest `SlotsProvider` outside `TrueFoundryChatProvider` — see [docs/customization.md](./docs/customization.md).
|
|
463
463
|
|
|
464
464
|
> _Screenshot: a custom layout assembled from_ `BrandLogo`_,_ `ThreadListContainer`_, and_ `Thread`_._
|
|
465
465
|
|
|
@@ -470,7 +470,7 @@ For deeper composition without `TrueforgeUI`, nest `SlotsProvider` outside `True
|
|
|
470
470
|
Every curated feature atom is overridable. Provide an `overrides` map to swap any single component while inheriting the rest.
|
|
471
471
|
|
|
472
472
|
```tsx
|
|
473
|
-
import {
|
|
473
|
+
import { TrueForgeUI, type AssistantMessageBubbleProps } from '@truefoundry/trueforge-ui';
|
|
474
474
|
|
|
475
475
|
function MyBubble({ children, error, actionBar, className }: AssistantMessageBubbleProps) {
|
|
476
476
|
return (
|
|
@@ -482,7 +482,7 @@ function MyBubble({ children, error, actionBar, className }: AssistantMessageBub
|
|
|
482
482
|
);
|
|
483
483
|
}
|
|
484
484
|
|
|
485
|
-
<
|
|
485
|
+
<TrueForgeUI
|
|
486
486
|
server={server}
|
|
487
487
|
layout="sidebar"
|
|
488
488
|
overrides={{
|
|
@@ -500,11 +500,11 @@ See [docs/customization.md](./docs/customization.md) for the full slot list.
|
|
|
500
500
|
|
|
501
501
|
## Server
|
|
502
502
|
|
|
503
|
-
`<
|
|
503
|
+
`<TrueForgeUI />` takes a **`TrueForgeServerConfig`**: built-in backends init
|
|
504
504
|
inside the component, or pass a ready `AgentUIServer` directly.
|
|
505
505
|
|
|
506
506
|
```ts
|
|
507
|
-
type
|
|
507
|
+
type TrueForgeServerConfig =
|
|
508
508
|
| {
|
|
509
509
|
type: 'truefoundry';
|
|
510
510
|
apiKey: string;
|
|
@@ -539,7 +539,7 @@ host-owned: pass `token` and/or `fetch`.
|
|
|
539
539
|
**Compose your own `AgentUIServer` (custom):**
|
|
540
540
|
|
|
541
541
|
```tsx
|
|
542
|
-
import {
|
|
542
|
+
import { TrueForgeUI, createTrueFoundryServer } from '@truefoundry/trueforge-ui';
|
|
543
543
|
import { createTrueFoundryChatServer } from '@truefoundry/assistant-ui-runtime/plugins/truefoundry-agent-server-adapter';
|
|
544
544
|
|
|
545
545
|
const chatServer = createTrueFoundryChatServer({ apiKey, baseUrl });
|
|
@@ -552,13 +552,13 @@ const agentServer = createTrueFoundryServer({
|
|
|
552
552
|
saveAgent,
|
|
553
553
|
});
|
|
554
554
|
|
|
555
|
-
<
|
|
555
|
+
<TrueForgeUI server={agentServer} layout="sidebar" />;
|
|
556
556
|
```
|
|
557
557
|
|
|
558
558
|
**Implement `AgentUIServer` yourself:**
|
|
559
559
|
|
|
560
560
|
```tsx
|
|
561
|
-
import {
|
|
561
|
+
import { TrueForgeUI, type AgentUIServer } from '@truefoundry/trueforge-ui';
|
|
562
562
|
|
|
563
563
|
const agentServer: AgentUIServer = {
|
|
564
564
|
// AgentChatServer methods…
|
|
@@ -576,7 +576,7 @@ const agentServer: AgentUIServer = {
|
|
|
576
576
|
saveAgent: async ({ agentName, agentSpec }) => ({ ok: true }),
|
|
577
577
|
};
|
|
578
578
|
|
|
579
|
-
<
|
|
579
|
+
<TrueForgeUI server={agentServer} layout="sidebar" />;
|
|
580
580
|
```
|
|
581
581
|
|
|
582
582
|
See [docs/server.md](./docs/server.md) for the full method list and BYO guidance.
|
|
@@ -587,8 +587,8 @@ See [docs/server.md](./docs/server.md) for the full method list and BYO guidance
|
|
|
587
587
|
|
|
588
588
|
| Export | Kind | Purpose |
|
|
589
589
|
| ------------------------------------------------------------------ | ---------- | ------------------------------------------------------------ |
|
|
590
|
-
| `
|
|
591
|
-
| `
|
|
590
|
+
| `TrueForgeUI` | Component | Root component — accepts all props above |
|
|
591
|
+
| `TrueForgeServerConfig` | Type | `server` prop: `truefoundry` / `trueforge` / `AgentUIServer` |
|
|
592
592
|
| `createTrueFoundryServer` | Function | Compose chat + builder into `AgentUIServer` |
|
|
593
593
|
| `Thread`, `ThreadListContainer`, `BrandLogo` | Components | Layout primitives for custom layouts |
|
|
594
594
|
| Composer / message / tool atoms | Components | Overridable, themeable building blocks |
|
|
@@ -7,16 +7,18 @@ import {
|
|
|
7
7
|
auiInputClass,
|
|
8
8
|
useMCPAuth,
|
|
9
9
|
useToasterOptional
|
|
10
|
-
} from "./chunk-
|
|
10
|
+
} from "./chunk-UU7C5DQ3.js";
|
|
11
11
|
import {
|
|
12
12
|
Icon,
|
|
13
|
-
getErrorMessage
|
|
13
|
+
getErrorMessage
|
|
14
|
+
} from "./chunk-IFLE7OMM.js";
|
|
15
|
+
import {
|
|
14
16
|
useCatalogServer
|
|
15
|
-
} from "./chunk-
|
|
16
|
-
import "./chunk-
|
|
17
|
+
} from "./chunk-WQULF5AT.js";
|
|
18
|
+
import "./chunk-JRRCAKEP.js";
|
|
17
19
|
import {
|
|
18
20
|
cn
|
|
19
|
-
} from "./chunk-
|
|
21
|
+
} from "./chunk-72LC2M3R.js";
|
|
20
22
|
|
|
21
23
|
// src/containers/SettingsBuilder/ConnectorSettings.tsx
|
|
22
24
|
import { useCallback, useEffect as useEffect2, useMemo, useState as useState3 } from "react";
|
|
@@ -918,4 +920,4 @@ var ConnectorSettings_default = ConnectorSettings;
|
|
|
918
920
|
export {
|
|
919
921
|
ConnectorSettings_default as default
|
|
920
922
|
};
|
|
921
|
-
//# sourceMappingURL=ConnectorSettings-
|
|
923
|
+
//# sourceMappingURL=ConnectorSettings-XEO5ZQO5.js.map
|