@agents24/chat-react 0.5.41 → 0.5.42
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/activity.d.ts +4 -0
- package/dist/{chunk-5PWUQTLK.js → chunk-YRUYJFPJ.js} +15 -1
- package/dist/{chunk-5PWUQTLK.js.map → chunk-YRUYJFPJ.js.map} +1 -1
- package/dist/index.cjs +15 -0
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.ts +1 -0
- package/dist/index.js +3 -1
- package/dist/index.js.map +1 -1
- package/dist/registry/agents24-chat.json +5 -5
- package/dist/ui/index.cjs +34 -4
- package/dist/ui/index.cjs.map +1 -1
- package/dist/ui/index.d.ts +1 -0
- package/dist/ui/index.js +22 -5
- package/dist/ui/index.js.map +1 -1
- package/package.json +2 -2
package/dist/ui/index.d.ts
CHANGED
package/dist/ui/index.js
CHANGED
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
import {
|
|
2
2
|
getActiveStreamingTextPartId,
|
|
3
|
+
getAgentChatActivity,
|
|
3
4
|
useStreamingText
|
|
4
|
-
} from "../chunk-
|
|
5
|
+
} from "../chunk-YRUYJFPJ.js";
|
|
5
6
|
import {
|
|
6
7
|
attachmentFileAccept,
|
|
7
8
|
canonicalInputMimeType,
|
|
@@ -2989,7 +2990,7 @@ function AgentChatActivityRow({
|
|
|
2989
2990
|
}) {
|
|
2990
2991
|
const content = /* @__PURE__ */ jsxs9(Fragment4, { children: [
|
|
2991
2992
|
/* @__PURE__ */ jsx14(ToolActivityOrb, { label, kind: "planning", renderActivityIcon }),
|
|
2992
|
-
/* @__PURE__ */ jsx14("span", { className: "a24-tool-trigger__label a24-tool-shimmer", children: /* @__PURE__ */ jsx14(ToolActivityReel, { label }) })
|
|
2993
|
+
/* @__PURE__ */ jsx14("span", { className: "a24-tool-trigger__label a24-tool-shimmer", children: /* @__PURE__ */ jsx14(ToolActivityReel, { label }, label) })
|
|
2993
2994
|
] });
|
|
2994
2995
|
return /* @__PURE__ */ jsx14("div", { className: "a24-tool-trigger-row a24-tool-trigger-row--root", "data-agents24-model-turn": modelTurnId, role: "status", children: onSelect ? /* @__PURE__ */ jsx14("button", { className: "a24-tool-trigger a24-tool-trigger--root a24-tool-trigger--active", onClick: onSelect, type: "button", children: content }) : /* @__PURE__ */ jsx14("div", { className: "a24-tool-trigger a24-tool-trigger--root a24-tool-trigger--active", children: content }) });
|
|
2995
2996
|
}
|
|
@@ -3495,7 +3496,7 @@ function AgentResponseTimeline({
|
|
|
3495
3496
|
toolViewMode = "closed"
|
|
3496
3497
|
}) {
|
|
3497
3498
|
isLoading = isLoading && !message.responseCompletion;
|
|
3498
|
-
const parts = (displayParts || message.parts || []).filter((part) => (part.kind !== "tool" || !isInternalAskUserTool(part)) && (part.kind !== "hitl" || part.hitlKind === "user_input" || part.status === "pending" || getHitlActionState?.(part)?.status === "accepted") && (part.kind !== "model-turn" || part.turnKind === "agent") && (part.kind !== "node-activity" || nodeActivityMode === "all" || nodeActivityMode === "default" && part.defaultChatVisible));
|
|
3499
|
+
const parts = (displayParts || message.parts || []).filter((part) => (part.kind !== "tool" || !isInternalAskUserTool(part)) && (part.kind !== "hitl" || part.hitlKind === "user_input" || part.status === "pending" || getHitlActionState?.(part)?.status === "accepted") && (part.kind !== "model-turn" || part.turnKind === "agent" && !message.isFinal && !message.responseCompletion && (!message.activity || message.activity.status === "running")) && (part.kind !== "node-activity" || nodeActivityMode === "all" || nodeActivityMode === "default" && part.defaultChatVisible));
|
|
3499
3500
|
const toolParts = parts.filter((part) => part.kind === "tool");
|
|
3500
3501
|
const activeToolId = latestRunningAgentChatToolId(toolParts);
|
|
3501
3502
|
const activeTextPartId = getActiveStreamingTextPartId(
|
|
@@ -3561,8 +3562,23 @@ function AgentResponseTimeline({
|
|
|
3561
3562
|
if (rendered.length === 0 && message.content) {
|
|
3562
3563
|
rendered.push(/* @__PURE__ */ jsx15(MessageResponse, { children: message.content }, `${message.id}-fallback`));
|
|
3563
3564
|
}
|
|
3564
|
-
|
|
3565
|
-
|
|
3565
|
+
const activity = getAgentChatActivity(message, parts, isLoading);
|
|
3566
|
+
if (activity) {
|
|
3567
|
+
const labels = {
|
|
3568
|
+
thinking: "Thinking",
|
|
3569
|
+
capacity: "Waiting for provider capacity",
|
|
3570
|
+
waiting: "Waiting for external work",
|
|
3571
|
+
interrupted: "Waiting to resume",
|
|
3572
|
+
cancelling: "Cancelling"
|
|
3573
|
+
};
|
|
3574
|
+
rendered.push(/* @__PURE__ */ jsx15(
|
|
3575
|
+
AgentChatActivityRow,
|
|
3576
|
+
{
|
|
3577
|
+
renderActivityIcon: toolSlots?.renderActivityIcon,
|
|
3578
|
+
label: labels[activity]
|
|
3579
|
+
},
|
|
3580
|
+
`${message.id}-active-activity`
|
|
3581
|
+
));
|
|
3566
3582
|
}
|
|
3567
3583
|
return /* @__PURE__ */ jsx15("div", { className: "space-y-3", children: rendered });
|
|
3568
3584
|
}
|
|
@@ -4049,6 +4065,7 @@ export {
|
|
|
4049
4065
|
contextStatusMetrics,
|
|
4050
4066
|
createAgentChatComposerFile,
|
|
4051
4067
|
defaultHitlSubmissionLabels,
|
|
4068
|
+
getAgentChatActivity,
|
|
4052
4069
|
hitlActionLabel,
|
|
4053
4070
|
hitlTitle,
|
|
4054
4071
|
isAgentChatSubagent,
|