@object-ui/plugin-chatbot 5.3.2 → 5.4.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 +71 -0
- package/README.md +50 -1
- package/dist/index.js +1615 -425
- package/dist/index.umd.cjs +2 -1
- package/dist/packages/plugin-chatbot/src/ChatbotEnhanced.d.ts +74 -5
- package/dist/packages/plugin-chatbot/src/ChatbotEnhanced.d.ts.map +1 -1
- package/dist/packages/plugin-chatbot/src/elements/code-block.d.ts +18 -0
- package/dist/packages/plugin-chatbot/src/elements/code-block.d.ts.map +1 -0
- package/dist/packages/plugin-chatbot/src/elements/conversation.d.ts +16 -0
- package/dist/packages/plugin-chatbot/src/elements/conversation.d.ts.map +1 -0
- package/dist/packages/plugin-chatbot/src/elements/index.d.ts +22 -0
- package/dist/packages/plugin-chatbot/src/elements/index.d.ts.map +1 -0
- package/dist/packages/plugin-chatbot/src/elements/loader.d.ts +6 -0
- package/dist/packages/plugin-chatbot/src/elements/loader.d.ts.map +1 -0
- package/dist/packages/plugin-chatbot/src/elements/message.d.ts +47 -0
- package/dist/packages/plugin-chatbot/src/elements/message.d.ts.map +1 -0
- package/dist/packages/plugin-chatbot/src/elements/prompt-input.d.ts +185 -0
- package/dist/packages/plugin-chatbot/src/elements/prompt-input.d.ts.map +1 -0
- package/dist/packages/plugin-chatbot/src/elements/reasoning.d.ts +27 -0
- package/dist/packages/plugin-chatbot/src/elements/reasoning.d.ts.map +1 -0
- package/dist/packages/plugin-chatbot/src/elements/shimmer.d.ts +10 -0
- package/dist/packages/plugin-chatbot/src/elements/shimmer.d.ts.map +1 -0
- package/dist/packages/plugin-chatbot/src/elements/sources.d.ts +13 -0
- package/dist/packages/plugin-chatbot/src/elements/sources.d.ts.map +1 -0
- package/dist/packages/plugin-chatbot/src/elements/suggestion.d.ts +10 -0
- package/dist/packages/plugin-chatbot/src/elements/suggestion.d.ts.map +1 -0
- package/dist/packages/plugin-chatbot/src/elements/tool.d.ts +24 -0
- package/dist/packages/plugin-chatbot/src/elements/tool.d.ts.map +1 -0
- package/dist/packages/plugin-chatbot/src/elements/ui/button-group.d.ts +12 -0
- package/dist/packages/plugin-chatbot/src/elements/ui/button-group.d.ts.map +1 -0
- package/dist/packages/plugin-chatbot/src/elements/ui/input-group.d.ts +17 -0
- package/dist/packages/plugin-chatbot/src/elements/ui/input-group.d.ts.map +1 -0
- package/dist/packages/plugin-chatbot/src/index.d.ts +1 -0
- package/dist/packages/plugin-chatbot/src/index.d.ts.map +1 -1
- package/dist/packages/plugin-chatbot/src/useObjectChat.d.ts.map +1 -1
- package/package.json +13 -5
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,76 @@
|
|
|
1
1
|
# @object-ui/plugin-chatbot
|
|
2
2
|
|
|
3
|
+
## 5.4.1
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- @object-ui/types@5.4.1
|
|
8
|
+
- @object-ui/core@5.4.1
|
|
9
|
+
- @object-ui/react@5.4.1
|
|
10
|
+
- @object-ui/components@5.4.1
|
|
11
|
+
|
|
12
|
+
## 5.4.0
|
|
13
|
+
|
|
14
|
+
### Minor Changes
|
|
15
|
+
|
|
16
|
+
- 3a8c754: Rebuilt the chatbot UI on top of **Vercel AI Elements** (MIT) and wired in
|
|
17
|
+
the v1 capabilities exposed by `@objectstack/service-ai` (tracing,
|
|
18
|
+
`generateObject`, `query_data` tool, `ModelRegistry`).
|
|
19
|
+
- **What's new**
|
|
20
|
+
- `ChatbotEnhanced` is now composed from `Conversation`, `Message`,
|
|
21
|
+
`PromptInput`, `Suggestion`, `Tool`, `Reasoning`, `Sources`, and friends.
|
|
22
|
+
Sticky-to-bottom scrolling, keyboard-aware textarea, file pill chips,
|
|
23
|
+
copy/retry actions, and the streaming/error banners now match the
|
|
24
|
+
shadcn-style AI surface used across the ecosystem.
|
|
25
|
+
- **Tool / reasoning / sources rendering**: assistant messages with
|
|
26
|
+
`toolInvocations`, `reasoning`, or `sources` automatically render the
|
|
27
|
+
collapsible tool panels, the chain-of-thought block, and the citation
|
|
28
|
+
pill. `useObjectChat` parses these directly from `vercel/ai`'s
|
|
29
|
+
`UIMessage.parts` stream — no extra wiring needed at the call site.
|
|
30
|
+
- **Model picker**: optional `models` + `selectedModelId` + `onModelChange`
|
|
31
|
+
props render an inline `<select>` in the prompt-input toolbar. Designed
|
|
32
|
+
to be fed straight from `GET /api/v1/ai/models` (new in service-ai
|
|
33
|
+
v1).
|
|
34
|
+
- **Trace links**: new optional `traceId` on `ChatMessage` surfaces a
|
|
35
|
+
small "trace" link on assistant messages — pair with the `ai_traces`
|
|
36
|
+
object exposed by service-ai's auto-tracing.
|
|
37
|
+
- New optional `suggestions?: string[]` prop renders a chip row in the
|
|
38
|
+
empty state and forwards the picked suggestion to `onSendMessage`.
|
|
39
|
+
- All vendored AI Elements (10 components) plus two missing shadcn
|
|
40
|
+
primitives (`button-group`, `input-group`) are exported as a namespace —
|
|
41
|
+
`import { AIElements } from '@object-ui/plugin-chatbot'` — so apps can
|
|
42
|
+
compose bespoke chat surfaces without dropping back to the legacy
|
|
43
|
+
primitives.
|
|
44
|
+
- **Type-level changes**
|
|
45
|
+
- `@object-ui/types` `ChatMessage` gains optional `reasoning`, `sources`,
|
|
46
|
+
`traceId` fields, and a new `ChatMessageSource` interface.
|
|
47
|
+
- `ChatToolInvocation` accepts the AI SDK v6 lifecycle states
|
|
48
|
+
(`input-streaming`/`input-available`/`output-available`/`output-error`/
|
|
49
|
+
…) in addition to the legacy `partial-call`/`call`/`result`. `args`
|
|
50
|
+
is now optional and accepts arbitrary shapes; new optional `errorText`
|
|
51
|
+
field.
|
|
52
|
+
- **What hasn't changed**
|
|
53
|
+
- Public prop signature on `FloatingChatbot`, `FloatingChatbotPanel`, and
|
|
54
|
+
the SDUI `"chatbot"` renderer.
|
|
55
|
+
- Hook contracts: `useObjectChat`, `useAgents`,
|
|
56
|
+
`useFloatingChatbot`.
|
|
57
|
+
- SSR / Tailwind 4 / React 18+19 support.
|
|
58
|
+
- **Under the hood**
|
|
59
|
+
- New deps: `streamdown`, `use-stick-to-bottom`, `shiki`, `motion`,
|
|
60
|
+
`nanoid`, `@radix-ui/react-use-controllable-state`,
|
|
61
|
+
`@radix-ui/react-slot`, `class-variance-authority`.
|
|
62
|
+
- Vendored sources live under `src/elements/` with header comments pointing
|
|
63
|
+
back to `registry.ai-sdk.dev`. Rule #7 No-Touch Zones are respected —
|
|
64
|
+
`packages/components/src/ui/**` was not modified.
|
|
65
|
+
|
|
66
|
+
### Patch Changes
|
|
67
|
+
|
|
68
|
+
- Updated dependencies [3a8c754]
|
|
69
|
+
- @object-ui/types@5.4.0
|
|
70
|
+
- @object-ui/components@5.4.0
|
|
71
|
+
- @object-ui/core@5.4.0
|
|
72
|
+
- @object-ui/react@5.4.0
|
|
73
|
+
|
|
3
74
|
## 5.3.2
|
|
4
75
|
|
|
5
76
|
### Patch Changes
|
package/README.md
CHANGED
|
@@ -1,6 +1,15 @@
|
|
|
1
1
|
# @object-ui/plugin-chatbot
|
|
2
2
|
|
|
3
|
-
Chatbot interface plugin for Object UI with full AI SDUI support
|
|
3
|
+
Chatbot interface plugin for Object UI with full AI SDUI support, built on
|
|
4
|
+
[Vercel AI Elements](https://elements.ai-sdk.dev) (MIT) and
|
|
5
|
+
[shadcn/ui](https://ui.shadcn.com) (MIT).
|
|
6
|
+
|
|
7
|
+
> Why AI Elements? They give us a production-grade, shadcn-style chat
|
|
8
|
+
> surface — conversation, message bubbles, streaming reasoning, tool calls,
|
|
9
|
+
> sources, code blocks, suggestions — that already matches our Tailwind 4
|
|
10
|
+
> design tokens. We vendor them into `src/elements/` so we can ship without a
|
|
11
|
+
> network dep, and we wrap them inside `ChatbotEnhanced` to keep the public
|
|
12
|
+
> ObjectUI prop API stable. See [Architecture](#architecture) below.
|
|
4
13
|
|
|
5
14
|
## Installation
|
|
6
15
|
|
|
@@ -210,6 +219,46 @@ const aiSchema = {
|
|
|
210
219
|
- 🤝 [Contributing Guide](https://github.com/objectstack-ai/objectui/blob/main/CONTRIBUTING.md)
|
|
211
220
|
- 🗺️ [Roadmap](https://github.com/objectstack-ai/objectui/blob/main/ROADMAP.md)
|
|
212
221
|
|
|
222
|
+
## Architecture
|
|
223
|
+
|
|
224
|
+
Internally the chatbot is composed from three layers:
|
|
225
|
+
|
|
226
|
+
```
|
|
227
|
+
┌─────────────────────────────────────────────────────┐
|
|
228
|
+
│ ChatbotEnhanced (public surface, stable props) │
|
|
229
|
+
│ ├─ Conversation / Message (AI Elements) │
|
|
230
|
+
│ ├─ PromptInput (AI Elements) │
|
|
231
|
+
│ └─ Suggestion / Reasoning / Tool (AI Elements) │
|
|
232
|
+
├─────────────────────────────────────────────────────┤
|
|
233
|
+
│ src/elements/ │
|
|
234
|
+
│ Vendored Vercel AI Elements + missing shadcn │
|
|
235
|
+
│ primitives (button-group, input-group). Rewritten │
|
|
236
|
+
│ to import from `@object-ui/components`. Do NOT │
|
|
237
|
+
│ edit — re-sync from registry.ai-sdk.dev. │
|
|
238
|
+
├─────────────────────────────────────────────────────┤
|
|
239
|
+
│ @object-ui/components (shadcn + Tailwind 4) │
|
|
240
|
+
└─────────────────────────────────────────────────────┘
|
|
241
|
+
```
|
|
242
|
+
|
|
243
|
+
The vendored components are also re-exported under a namespace for advanced
|
|
244
|
+
users who want to compose their own chat surface:
|
|
245
|
+
|
|
246
|
+
```tsx
|
|
247
|
+
import { AIElements } from '@object-ui/plugin-chatbot';
|
|
248
|
+
|
|
249
|
+
<AIElements.Conversation>
|
|
250
|
+
<AIElements.ConversationContent>
|
|
251
|
+
<AIElements.Message from="assistant">
|
|
252
|
+
<AIElements.MessageContent>Hello.</AIElements.MessageContent>
|
|
253
|
+
</AIElements.Message>
|
|
254
|
+
</AIElements.ConversationContent>
|
|
255
|
+
</AIElements.Conversation>;
|
|
256
|
+
```
|
|
257
|
+
|
|
213
258
|
## License
|
|
214
259
|
|
|
215
260
|
MIT © ObjectStack Inc.
|
|
261
|
+
|
|
262
|
+
Third-party code shipped under `src/elements/`:
|
|
263
|
+
- **Vercel AI Elements** — MIT © Vercel, Inc.
|
|
264
|
+
- **shadcn/ui** primitives (`button-group`, `input-group`) — MIT © shadcn.
|