@subako-ai/assistant-ui 0.1.1 → 0.1.2
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 +5 -6
- package/dist/chat.d.ts +1 -1
- package/dist/chat.js +3 -3
- package/package.json +5 -5
- package/src/chat.tsx +3 -3
package/README.md
CHANGED
|
@@ -23,7 +23,6 @@ import { SubakoProvider, useSession } from "@subako-ai/react";
|
|
|
23
23
|
import { SubakoChat } from "@subako-ai/assistant-ui";
|
|
24
24
|
|
|
25
25
|
const subako = new SubakoSessionClient({
|
|
26
|
-
baseUrl: "https://api.us.cloud.subako.ai",
|
|
27
26
|
getToken: (sessionId) => fetch(`/api/subako/token/${sessionId}`).then((r) => r.text()),
|
|
28
27
|
});
|
|
29
28
|
|
|
@@ -83,7 +82,7 @@ layer, that turns unlayered element rules away and takes the layered ones
|
|
|
83
82
|
instead, so Tailwind v3's preflight, a `normalize.css`, and the app's global
|
|
84
83
|
`button` all leave the chat as it is. The one rule of a reset's that still
|
|
85
84
|
reaches a button is `[type="button"]`, which names an attribute; it takes the
|
|
86
|
-
background only, and the buttons are the
|
|
85
|
+
background only, and the buttons are the color of the bar they sit on. A tool
|
|
87
86
|
UI the app draws itself is not guarded: that is the app's own markup.
|
|
88
87
|
|
|
89
88
|
An app whose CSS is layered itself — Tailwind v4 is one — says where `subako`
|
|
@@ -113,10 +112,10 @@ nonce the page puts on its own tags:
|
|
|
113
112
|
A page with no such policy needs nothing: left out, the attribute is not
|
|
114
113
|
written at all.
|
|
115
114
|
|
|
116
|
-
###
|
|
115
|
+
### Colors
|
|
117
116
|
|
|
118
|
-
Every surface names its own
|
|
119
|
-
legible on a page of any
|
|
117
|
+
Every surface names its own color and its own background, so the chat is
|
|
118
|
+
legible on a page of any color instead of inheriting half of one. They come
|
|
120
119
|
from eight custom properties, light by default and dark under
|
|
121
120
|
`prefers-color-scheme: dark`; the root also carries `color-scheme: light dark`
|
|
122
121
|
so form controls follow. Set the properties on `.subako-chat` itself to theme
|
|
@@ -276,7 +275,7 @@ A tool that needs approval has to ask for it from whatever draws it: a row of
|
|
|
276
275
|
the app's own gets `approval` and `respondToApproval` like any tool-call part,
|
|
277
276
|
and the run waits until something answers. `SubakoToolApproval` is the chat's
|
|
278
277
|
own prompt, for dropping in — Allow and Deny while the server waits on the
|
|
279
|
-
person, nothing once there is an answer or the run was
|
|
278
|
+
person, nothing once there is an answer or the run was canceled:
|
|
280
279
|
|
|
281
280
|
```tsx
|
|
282
281
|
import { SubakoToolApproval } from "@subako-ai/assistant-ui";
|
package/dist/chat.d.ts
CHANGED
|
@@ -7,7 +7,7 @@ export type SubakoToolApprovalProps = Pick<ToolCallMessagePartProps, "toolName"
|
|
|
7
7
|
/**
|
|
8
8
|
* The approval prompt of the chat's own tool row, for a tool UI the app draws
|
|
9
9
|
* itself: Allow and Deny while the server waits on the person, and nothing
|
|
10
|
-
* once there is an answer or the run was
|
|
10
|
+
* once there is an answer or the run was canceled. Spread the tool call's
|
|
11
11
|
* props into it; the answer reaches `resolveApproval` the same way.
|
|
12
12
|
*/
|
|
13
13
|
export declare function SubakoToolApproval({ toolName, approval, respondToApproval }: SubakoToolApprovalProps): ReactNode;
|
package/dist/chat.js
CHANGED
|
@@ -8,8 +8,8 @@ import remarkGfm from "remark-gfm";
|
|
|
8
8
|
import { useSubakoRuntime } from "./runtime.js";
|
|
9
9
|
/**
|
|
10
10
|
* Enough style to read a conversation with no setup at all. Every surface names
|
|
11
|
-
* its own
|
|
12
|
-
*
|
|
11
|
+
* its own color and its own background, so the chat is legible on a page of any
|
|
12
|
+
* color rather than inheriting half of one. The eight custom properties are the
|
|
13
13
|
* theming seam: light by default, dark when the browser asks for it, and an app
|
|
14
14
|
* that sets them on `.subako-chat` overrides both. `className` is where an app
|
|
15
15
|
* takes the rest over.
|
|
@@ -153,7 +153,7 @@ const awaiting = (approval) => approval !== undefined && approval.approved === u
|
|
|
153
153
|
/**
|
|
154
154
|
* The approval prompt of the chat's own tool row, for a tool UI the app draws
|
|
155
155
|
* itself: Allow and Deny while the server waits on the person, and nothing
|
|
156
|
-
* once there is an answer or the run was
|
|
156
|
+
* once there is an answer or the run was canceled. Spread the tool call's
|
|
157
157
|
* props into it; the answer reaches `resolveApproval` the same way.
|
|
158
158
|
*/
|
|
159
159
|
export function SubakoToolApproval({ toolName, approval, respondToApproval }) {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@subako-ai/assistant-ui",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.2",
|
|
4
4
|
"description": "assistant-ui runtime and chat for Subako sessions",
|
|
5
5
|
"homepage": "https://subako.ai",
|
|
6
6
|
"license": "Apache-2.0",
|
|
@@ -34,15 +34,15 @@
|
|
|
34
34
|
"react": "^19.2.0",
|
|
35
35
|
"react-dom": "^19.2.0",
|
|
36
36
|
"typescript": "^5.9.3",
|
|
37
|
-
"@subako-ai/
|
|
38
|
-
"@subako-ai/
|
|
37
|
+
"@subako-ai/react": "0.1.2",
|
|
38
|
+
"@subako-ai/sdk": "0.1.2"
|
|
39
39
|
},
|
|
40
40
|
"peerDependencies": {
|
|
41
41
|
"@assistant-ui/react": "^0.15.0",
|
|
42
42
|
"@assistant-ui/react-markdown": "^0.14.15",
|
|
43
43
|
"react": "^19.0.0",
|
|
44
|
-
"@subako-ai/react": "^0.1.
|
|
45
|
-
"@subako-ai/sdk": "^0.1.
|
|
44
|
+
"@subako-ai/react": "^0.1.2",
|
|
45
|
+
"@subako-ai/sdk": "^0.1.2"
|
|
46
46
|
},
|
|
47
47
|
"engines": {
|
|
48
48
|
"node": ">=22"
|
package/src/chat.tsx
CHANGED
|
@@ -18,8 +18,8 @@ import { useSubakoRuntime } from "./runtime.js";
|
|
|
18
18
|
|
|
19
19
|
/**
|
|
20
20
|
* Enough style to read a conversation with no setup at all. Every surface names
|
|
21
|
-
* its own
|
|
22
|
-
*
|
|
21
|
+
* its own color and its own background, so the chat is legible on a page of any
|
|
22
|
+
* color rather than inheriting half of one. The eight custom properties are the
|
|
23
23
|
* theming seam: light by default, dark when the browser asks for it, and an app
|
|
24
24
|
* that sets them on `.subako-chat` overrides both. `className` is where an app
|
|
25
25
|
* takes the rest over.
|
|
@@ -188,7 +188,7 @@ export type SubakoToolApprovalProps = Pick<ToolCallMessagePartProps, "toolName"
|
|
|
188
188
|
/**
|
|
189
189
|
* The approval prompt of the chat's own tool row, for a tool UI the app draws
|
|
190
190
|
* itself: Allow and Deny while the server waits on the person, and nothing
|
|
191
|
-
* once there is an answer or the run was
|
|
191
|
+
* once there is an answer or the run was canceled. Spread the tool call's
|
|
192
192
|
* props into it; the answer reaches `resolveApproval` the same way.
|
|
193
193
|
*/
|
|
194
194
|
export function SubakoToolApproval({ toolName, approval, respondToApproval }: SubakoToolApprovalProps): ReactNode {
|