@theoremjs/react 0.3.5-next.1001.g68d8dcf → 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 +2 -2
- package/package.json +3 -3
- package/ui/ChatComposerRow.d.ts +3 -2
- package/ui/ChatComposerRow.js +1 -1
- package/ui/ChatTranscript.js +1 -1
- package/ui/labels.d.ts +2 -2
- package/ui/labels.js +2 -2
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
|
|
|
@@ -600,7 +600,7 @@ To draw one piece in your own way, use `ChatTranscript` and `ChatComposerBar` fr
|
|
|
600
600
|
|
|
601
601
|
The composer bar has a selector for the model, its effort, and each option. When their values do not fit the bar, each selector shows only its icon, and a tooltip gives its name and value. When the icons do not fit either, the row scrolls inside the composer. A control you pass as `generationSelect` keeps its own look and scrolls with the row.
|
|
602
602
|
|
|
603
|
-
A tool call that runs on in the background after its reply ends shows as running, with
|
|
603
|
+
A tool call that runs on in the background after its reply ends shows as running, with "⋅ running in the background" after its name (`@theorem.transcript.tool_background`). The words go when the call's end reaches the transcript.
|
|
604
604
|
|
|
605
605
|
A failed tool call in `ChatTranscript` shows its failure once: the row shows the message the model read, and the details show its `code`, `kind`, and `details`.
|
|
606
606
|
|
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;
|
package/ui/ChatTranscript.js
CHANGED
|
@@ -516,7 +516,7 @@ function toolCallItem(t, id, tool, shows) {
|
|
|
516
516
|
return {
|
|
517
517
|
...base,
|
|
518
518
|
status: 'running',
|
|
519
|
-
|
|
519
|
+
target: t('@theorem.transcript.tool_background'),
|
|
520
520
|
...rowDetail(t, tool, shows),
|
|
521
521
|
};
|
|
522
522
|
default:
|
package/ui/labels.d.ts
CHANGED
|
@@ -286,8 +286,8 @@ export declare const THEOREM_UI_CATALOG: {
|
|
|
286
286
|
readonly description: "The calls the agent an agent tool ran made, in its detail.";
|
|
287
287
|
};
|
|
288
288
|
readonly '@theorem.transcript.tool_background': {
|
|
289
|
-
readonly defaultMessage: "
|
|
290
|
-
readonly description: "The
|
|
289
|
+
readonly defaultMessage: "⋅ running in the background";
|
|
290
|
+
readonly description: "The words after a tool call's name, on its row, while it runs on in the background.";
|
|
291
291
|
};
|
|
292
292
|
readonly '@theorem.transcript.tool_output': {
|
|
293
293
|
readonly defaultMessage: "Output";
|
package/ui/labels.js
CHANGED
|
@@ -270,8 +270,8 @@ export const THEOREM_UI_CATALOG = {
|
|
|
270
270
|
description: 'The calls the agent an agent tool ran made, in its detail.',
|
|
271
271
|
},
|
|
272
272
|
'@theorem.transcript.tool_background': {
|
|
273
|
-
defaultMessage: '
|
|
274
|
-
description: "The
|
|
273
|
+
defaultMessage: '⋅ running in the background',
|
|
274
|
+
description: "The words after a tool call's name, on its row, while it runs on in the background.",
|
|
275
275
|
},
|
|
276
276
|
'@theorem.transcript.tool_output': {
|
|
277
277
|
defaultMessage: 'Output',
|