@theoremjs/react 0.3.5-next.1002.g355bde0 → 0.3.5-next.1003.g05ad1e8
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 +1 -1
- package/package.json +3 -3
- package/ui/ChatComposerRow.d.ts +3 -2
- package/ui/ChatComposerRow.js +1 -1
package/README.md
CHANGED
|
@@ -592,7 +592,7 @@ function Dock({ chat, iface }) {
|
|
|
592
592
|
|
|
593
593
|
`TheoremChatComposer` takes `layout`, `icons`, `pills`, `placeholder`, and `inputRef`. `TheoremChatTranscript` takes the props of `ChatTranscript` that the chat does not give: `handle`, `emptyState`, `dividers`, `usage`, `bodyKindPlacement`, `stepLayout`, and `showToolDurations`. Its `handle` is the handle of the profile when you leave it out. Put both pieces inside one `TheoremSurface`. It takes what `TheoremChat` takes for the look and the media: `theme`, `mode`, `labels`, `detectCodeLanguage`, `media`, `resolveMedia`, and `mediaViewer`.
|
|
594
594
|
|
|
595
|
-
Use `pills` to show your own notice in the pill row of the `row` layout, for example "New from your agent" while the chat is closed. Each pill is `{ id, label, onSelect? }`. It comes after the working pill and the background calls, and looks like them. A click calls `onSelect`. A pill without `onSelect` only shows.
|
|
595
|
+
Use `pills` to show your own notice in the pill row of the `row` layout, for example "New from your agent" while the chat is closed. Each pill is `{ id, label, icon?, onSelect? }`. It comes after the working pill and the background calls, and looks like them. The icon goes before the words. A click calls `onSelect`. A pill without `onSelect` only shows.
|
|
596
596
|
|
|
597
597
|
The two pieces read one clock: `chat.turnClock`. So the working pill of the composer and the status line of the transcript show the same time. `chat.workingSince` is when the reply in progress started, less its waits for approval. For a reply that runs elsewhere, it is `chat.runningElsewhere.since`. `chat.shownBlocks` is what the transcript shows: `chat.blocks`, then `chat.streamBlocks`.
|
|
598
598
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@theoremjs/react",
|
|
3
|
-
"version": "0.3.5-next.
|
|
3
|
+
"version": "0.3.5-next.1003.g05ad1e8",
|
|
4
4
|
"description": "React bindings for Theorem: headless hooks + transport, an Astryx chat UI, and a Web-standard server handler.",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"type": "module",
|
|
@@ -60,8 +60,8 @@
|
|
|
60
60
|
"@stylexjs/stylex": "0.19.0",
|
|
61
61
|
"react": "^19.0.0",
|
|
62
62
|
"react-dom": "^19.0.0",
|
|
63
|
-
"@theoremjs/agents": "^0.3.5-next.
|
|
64
|
-
"@theoremjs/web": "^0.3.5-next.
|
|
63
|
+
"@theoremjs/agents": "^0.3.5-next.1003.g05ad1e8",
|
|
64
|
+
"@theoremjs/web": "^0.3.5-next.1003.g05ad1e8"
|
|
65
65
|
},
|
|
66
66
|
"peerDependenciesMeta": {
|
|
67
67
|
"@astryxdesign/core": {
|
package/ui/ChatComposerRow.d.ts
CHANGED
|
@@ -15,12 +15,13 @@ export type ComposerRowIcons = {
|
|
|
15
15
|
stop?: ReactNode;
|
|
16
16
|
};
|
|
17
17
|
/**
|
|
18
|
-
* A pill the app puts in the pill row after Theorem's own, drawn as they are: its
|
|
19
|
-
* a click does. One without `onSelect` only shows.
|
|
18
|
+
* A pill the app puts in the pill row after Theorem's own, drawn as they are: its icon, its words,
|
|
19
|
+
* and what a click does. One without `icon` has words only; one without `onSelect` only shows.
|
|
20
20
|
*/
|
|
21
21
|
export type ComposerPill = {
|
|
22
22
|
id: string;
|
|
23
23
|
label: string;
|
|
24
|
+
icon?: ReactNode;
|
|
24
25
|
onSelect?: () => void;
|
|
25
26
|
};
|
|
26
27
|
/** What waits to send: the count and label for the tray's header, and the content it folds. */
|
package/ui/ChatComposerRow.js
CHANGED
|
@@ -106,7 +106,7 @@ function PillRow(props) {
|
|
|
106
106
|
const pills = [
|
|
107
107
|
props.isWorking ? (_jsx(WorkingPill, { since: props.workingSince, icons: props.icons, onStop: props.onStop }, "working")) : null,
|
|
108
108
|
...props.backgroundJobs.map((job) => (_jsx(Token, { size: "lg", className: "theorem-composer-pill", "data-pill": "background", style: PILL, label: job.label, description: t('@theorem.composer.pill.background'), icon: props.icons?.backgroundJob ?? (_jsx(Spinner, { size: "sm", shade: "inherit", "aria-label": t('@theorem.composer.pill.background') })) }, job.callId))),
|
|
109
|
-
...(props.pills ?? []).map((pill) => (_jsx(Token, { size: "lg", className: "theorem-composer-pill", "data-pill": "app", style: PILL, label: pill.label, onClick: pill.onSelect }, pill.id))),
|
|
109
|
+
...(props.pills ?? []).map((pill) => (_jsx(Token, { size: "lg", className: "theorem-composer-pill", "data-pill": "app", style: PILL, label: pill.label, icon: pill.icon, onClick: pill.onSelect }, pill.id))),
|
|
110
110
|
].filter(Boolean);
|
|
111
111
|
if (pills.length === 0 && !props.hint)
|
|
112
112
|
return null;
|