@agents24/chat-react 0.5.20 → 0.5.22

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/ui/index.js CHANGED
@@ -1,7 +1,7 @@
1
1
  import {
2
2
  getActiveStreamingTextPartId,
3
3
  useStreamingText
4
- } from "../chunk-SSUO4EPD.js";
4
+ } from "../chunk-5PWUQTLK.js";
5
5
 
6
6
  // src/ui/agent-chat-composer.tsx
7
7
  import * as React3 from "react";
@@ -1036,7 +1036,7 @@ import { Fragment, jsx as jsx4, jsxs as jsxs2 } from "react/jsx-runtime";
1036
1036
  function QueueRow({ message, onRemove, onEdit }) {
1037
1037
  const [busy, setBusy] = React4.useState(false);
1038
1038
  const [error, setError] = React4.useState(null);
1039
- const editable = message.status === "queued" || message.status === "blocked";
1039
+ const editable = message.revision > 0 && (message.status === "queued" || message.status === "blocked");
1040
1040
  const act = async (operation) => {
1041
1041
  setBusy(true);
1042
1042
  setError(null);
@@ -1095,7 +1095,7 @@ function AgentChatQueue({ pending, queue, onRemove, onEdit, onResume, className
1095
1095
  }, className: "font-medium text-foreground hover:underline", children: "Resume queue" })
1096
1096
  ] }) : null,
1097
1097
  resumeError ? /* @__PURE__ */ jsx4("p", { role: "alert", className: "px-3 pb-2 text-xs text-destructive", children: resumeError }) : null,
1098
- /* @__PURE__ */ jsx4("div", { className: "max-h-40 overflow-y-auto", children: pending.map((message) => /* @__PURE__ */ jsx4(QueueRow, { message, onRemove, onEdit }, message.id)) })
1098
+ /* @__PURE__ */ jsx4("div", { className: "max-h-40 overflow-y-auto", children: pending.map((message) => /* @__PURE__ */ jsx4(QueueRow, { message, onRemove, onEdit }, message.client_submission_id || message.id)) })
1099
1099
  ] });
1100
1100
  }
1101
1101
 
@@ -2513,6 +2513,7 @@ function AgentResponseTimeline({
2513
2513
  toolSlots,
2514
2514
  toolViewMode = "closed"
2515
2515
  }) {
2516
+ isLoading = isLoading && !message.responseCompletion;
2516
2517
  const parts = (displayParts || message.parts || []).filter((part) => (part.kind !== "tool" || !isInternalAskUserTool(part)) && (part.kind !== "model-turn" || part.turnKind === "agent") && (part.kind !== "node-activity" || nodeActivityMode === "all" || nodeActivityMode === "default" && part.defaultChatVisible));
2517
2518
  const toolParts = parts.filter((part) => part.kind === "tool");
2518
2519
  const activeToolId = latestRunningAgentChatToolId(toolParts);
@@ -2688,7 +2689,7 @@ function AgentChatMessage({
2688
2689
  userMessageShowMoreLabel
2689
2690
  }) {
2690
2691
  const isAssistant = message.role === "assistant";
2691
- const isStreaming = isAssistant && message.id === streamingMessageId;
2692
+ const isStreaming = isAssistant && message.id === streamingMessageId && !message.responseCompletion;
2692
2693
  const resolvedUserContent = userMessageContent ?? message.content;
2693
2694
  const shouldRenderContent = isAssistant || Boolean(renderUserContent || resolvedUserContent);
2694
2695
  const showAttachments = Boolean(message.attachments?.length) && (message.role === "user" || showAssistantAttachments);