@theoremjs/react 0.3.5-next.911.g193d75c → 0.3.5-next.912.g25d311a
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 -0
- package/package.json +3 -3
- package/ui/ChatTranscript.js +10 -1
package/README.md
CHANGED
|
@@ -483,6 +483,8 @@ To show the transcript and the composer, use `ChatTranscript` and `ChatComposerB
|
|
|
483
483
|
|
|
484
484
|
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.
|
|
485
485
|
|
|
486
|
+
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`.
|
|
487
|
+
|
|
486
488
|
`ChatTranscript` places `citation` blocks after the answer text by default (the Sources strip under the prose). Pass `bodyKindPlacement={{}}` when citations must stay in stream order between text segments (inline citations).
|
|
487
489
|
|
|
488
490
|
The hooks and the client write no English text. They return kinds, codes, and states. You write the words.
|
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.912.g25d311a",
|
|
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.912.g25d311a",
|
|
64
|
+
"@theoremjs/web": "^0.3.5-next.912.g25d311a"
|
|
65
65
|
},
|
|
66
66
|
"peerDependenciesMeta": {
|
|
67
67
|
"@astryxdesign/core": {
|
package/ui/ChatTranscript.js
CHANGED
|
@@ -442,6 +442,15 @@ function toolDuration(t, tool) {
|
|
|
442
442
|
function toolUsageStats(state, showUsage) {
|
|
443
443
|
return showUsage && state.tokens ? { stats: _jsx(Usage, { tokens: state.tokens }) } : {};
|
|
444
444
|
}
|
|
445
|
+
// why: The row already reads the failure's message, and `error` is the person's wording of the
|
|
446
|
+
// same failure, so the detail holds only what the row does not say.
|
|
447
|
+
function failureDetail(failure) {
|
|
448
|
+
return {
|
|
449
|
+
code: failure.code,
|
|
450
|
+
kind: failure.kind,
|
|
451
|
+
...(failure.details === undefined ? {} : { details: failure.details }),
|
|
452
|
+
};
|
|
453
|
+
}
|
|
445
454
|
function toolCallItem(t, id, tool, showUsage) {
|
|
446
455
|
const base = { key: id, name: toolCallLabel(tool) };
|
|
447
456
|
const { state } = tool;
|
|
@@ -453,7 +462,7 @@ function toolCallItem(t, id, tool, showUsage) {
|
|
|
453
462
|
target: state.failure.message,
|
|
454
463
|
...toolUsageStats(state, showUsage),
|
|
455
464
|
errorMessage: state.failure.message,
|
|
456
|
-
resultDetail: toolDetail(t, tool, _jsx(ShapedData, { value: state.failure, title: t('@theorem.transcript.tool_error') })),
|
|
465
|
+
resultDetail: toolDetail(t, tool, _jsx(ShapedData, { value: failureDetail(state.failure), title: t('@theorem.transcript.tool_error') })),
|
|
457
466
|
};
|
|
458
467
|
case 'complete':
|
|
459
468
|
return {
|