@base44-preview/platform 0.2.0-pr.337.2f0349e → 0.3.0-pr.339.c920557
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/dist/react/chat-items.js +12 -3
- package/package.json +1 -1
package/dist/react/chat-items.js
CHANGED
|
@@ -67,16 +67,16 @@ function toStep(toolCall, answerToolCall) {
|
|
|
67
67
|
id: toolCall.id,
|
|
68
68
|
tool: toolName,
|
|
69
69
|
files,
|
|
70
|
-
label: stepLabel(toolName, files, summary, display),
|
|
70
|
+
label: stepLabel(toolName, files, summary, display, status),
|
|
71
71
|
status,
|
|
72
72
|
...(question && { question }),
|
|
73
73
|
...(answered && { answered }),
|
|
74
74
|
};
|
|
75
75
|
}
|
|
76
76
|
// Base44's own description of the step reads best; then the entity it touched; then the files.
|
|
77
|
-
function stepLabel(toolName, files, summary, display) {
|
|
77
|
+
function stepLabel(toolName, files, summary, display, status) {
|
|
78
78
|
if (summary)
|
|
79
|
-
return summary;
|
|
79
|
+
return summaryForStatus(summary, status);
|
|
80
80
|
const entityName = display === null || display === void 0 ? void 0 : display.entity_name;
|
|
81
81
|
if (entityName) {
|
|
82
82
|
const recordCount = display === null || display === void 0 ? void 0 : display.record_count;
|
|
@@ -84,6 +84,15 @@ function stepLabel(toolName, files, summary, display) {
|
|
|
84
84
|
}
|
|
85
85
|
return [toolName, ...files].join(" ");
|
|
86
86
|
}
|
|
87
|
+
// The AI often writes a summary as "present | past", such as "Looking at your app | Looked at your
|
|
88
|
+
// app". Like Base44's builder, a step still going shows the first half and a finished one the last.
|
|
89
|
+
function summaryForStatus(summary, status) {
|
|
90
|
+
const halves = summary.split("|").map(half => half.trim()).filter(Boolean);
|
|
91
|
+
if (halves.length < 2)
|
|
92
|
+
return summary.trim();
|
|
93
|
+
const isGoing = status === "running" || status === "waiting";
|
|
94
|
+
return isGoing ? halves[0] : halves[halves.length - 1];
|
|
95
|
+
}
|
|
87
96
|
// What the user answered on a choice, each answer next to the question it answers.
|
|
88
97
|
function answersOf(toolCall) {
|
|
89
98
|
var _a, _b, _c;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@base44-preview/platform",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.3.0-pr.339.c920557",
|
|
4
4
|
"description": "Base44 Platform SDK for white-label platforms: a browser client for watching the builder and a server entrypoint for webhooks",
|
|
5
5
|
"main": "dist/client/index.js",
|
|
6
6
|
"types": "dist/client/index.d.ts",
|