@invergent/agent-chat-react 2.2.8 → 2.3.0

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/index.js CHANGED
@@ -8279,7 +8279,7 @@ function SimpleFinalAnswer({
8279
8279
  }) {
8280
8280
  const content = useSmoothStream(text, isStreaming);
8281
8281
  const revealComplete = content.length >= text.length;
8282
- return /* @__PURE__ */ jsxs("div", { className: "mt-3", children: [
8282
+ return /* @__PURE__ */ jsxs("div", { children: [
8283
8283
  /* @__PURE__ */ jsx(MessageResponse, { children: content }),
8284
8284
  tail?.status === "complete" && revealComplete && /* @__PURE__ */ jsx(TurnFeedback, { msg: tail })
8285
8285
  ] });
@@ -8385,16 +8385,6 @@ var _SIMPLE_MODE_HIDDEN_TOOLS = /* @__PURE__ */ new Set([
8385
8385
  "terminal",
8386
8386
  "execute_code"
8387
8387
  ]);
8388
- var _SKILL_TOOL_NAMES = /* @__PURE__ */ new Set([
8389
- "skills_list",
8390
- "skill_view",
8391
- "skill_manage"
8392
- ]);
8393
- function _isSkillOnlyIteration(message) {
8394
- const calls = message.toolCalls ?? [];
8395
- if (calls.length === 0) return false;
8396
- return calls.every((tc) => _SKILL_TOOL_NAMES.has(tc.toolName));
8397
- }
8398
8388
  function _isHiddenSimpleTool(tc) {
8399
8389
  if (_SIMPLE_MODE_HIDDEN_TOOLS.has(tc.toolName)) return true;
8400
8390
  if (tc.toolName.startsWith("browser_")) return true;
@@ -8569,7 +8559,6 @@ function IterationGroup({
8569
8559
  }) {
8570
8560
  const summary = message.iterationSummary?.summary;
8571
8561
  const [open, setOpen] = useState(false);
8572
- if (_isSkillOnlyIteration(message)) return null;
8573
8562
  if (isIterationLive(message)) {
8574
8563
  const askCall = (message.toolCalls ?? []).find(
8575
8564
  (tc) => tc.toolName === "ask_user_question" && tc.status === "running"
@@ -8578,7 +8567,7 @@ function IterationGroup({
8578
8567
  return /* @__PURE__ */ jsx("div", { className: "px-1 py-0.5", children: /* @__PURE__ */ jsx(AskUserQuestionToolBlock, { tc: askCall }) });
8579
8568
  }
8580
8569
  const label2 = liveIterationLabel(message);
8581
- return /* @__PURE__ */ jsx("div", { className: "px-1 py-0.5 text-sm", children: /* @__PURE__ */ jsx(Shimmer, { duration: 3, spread: 3, className: "text-sm", children: label2 }) });
8570
+ return /* @__PURE__ */ jsx("div", { className: "py-0.5 text-sm", children: /* @__PURE__ */ jsx(Shimmer, { duration: 3, spread: 3, className: "text-sm", children: label2 }) });
8582
8571
  }
8583
8572
  const label = summary ?? deriveIterationLabel(message);
8584
8573
  if (!label) {
@@ -8685,7 +8674,8 @@ function SimpleAssistantGroup({
8685
8674
  const tailIsTextOnly = !!tail && !tailHasTools;
8686
8675
  const finalText = tailIsTextOnly && tail.content ? tail.content : "";
8687
8676
  const isTailGroup = lastGlobalIndex === totalMessages - 1;
8688
- const showThinkingShim = isTailGroup && isRunning && (!tail && messages.some((m) => m.role !== "assistant") || tailIsTextOnly && tail.status === "streaming" && !tail.content);
8677
+ const tailRendersOwnShimmer = !!tail && isIterationLive(tail) && !tailIsTextOnly;
8678
+ const showThinkingShim = isTailGroup && isRunning && !tailRendersOwnShimmer;
8689
8679
  const showErrorInfo = !!tail && tail.status === "error" && !!tail.errorInfo;
8690
8680
  const turnComplete = !isRunning && tail?.status === "complete";
8691
8681
  const effectiveTurnSummary = (() => {
@@ -8703,34 +8693,31 @@ function SimpleAssistantGroup({
8703
8693
  };
8704
8694
  })();
8705
8695
  return /* @__PURE__ */ jsx(Message, { from: "assistant", children: /* @__PURE__ */ jsxs(MessageContent, { children: [
8706
- /* @__PURE__ */ jsxs("div", { className: "space-y-2", children: [
8707
- messages.map((message) => {
8708
- if (message.role === "system") {
8709
- if (message.systemKind === "skill_invoked") return null;
8710
- return /* @__PURE__ */ jsx(
8711
- OrphanSystemMarker,
8712
- {
8713
- message,
8714
- sessionId,
8715
- onRetry: void 0
8716
- },
8717
- message.id
8718
- );
8719
- }
8720
- if (message === tail && tailIsTextOnly) return null;
8696
+ /* @__PURE__ */ jsx("div", { className: "space-y-2", children: messages.map((message) => {
8697
+ if (message.role === "system") {
8698
+ if (message.systemKind === "skill_invoked") return null;
8721
8699
  return /* @__PURE__ */ jsx(
8722
- IterationGroup,
8700
+ OrphanSystemMarker,
8723
8701
  {
8724
8702
  message,
8725
8703
  sessionId,
8726
- artifactFallbacks,
8727
- onFileSelect
8704
+ onRetry: void 0
8728
8705
  },
8729
8706
  message.id
8730
8707
  );
8731
- }),
8732
- showThinkingShim && /* @__PURE__ */ jsx(Shimmer, { duration: 3, spread: 3, className: "text-sm", children: "Working on it..." })
8733
- ] }),
8708
+ }
8709
+ if (message === tail && tailIsTextOnly) return null;
8710
+ return /* @__PURE__ */ jsx(
8711
+ IterationGroup,
8712
+ {
8713
+ message,
8714
+ sessionId,
8715
+ artifactFallbacks,
8716
+ onFileSelect
8717
+ },
8718
+ message.id
8719
+ );
8720
+ }) }),
8734
8721
  finalText && /* @__PURE__ */ jsx(
8735
8722
  SimpleFinalAnswer,
8736
8723
  {
@@ -8739,6 +8726,7 @@ function SimpleAssistantGroup({
8739
8726
  tail
8740
8727
  }
8741
8728
  ),
8729
+ showThinkingShim && /* @__PURE__ */ jsx("div", { className: "mt-2", children: /* @__PURE__ */ jsx(Shimmer, { duration: 3, spread: 3, className: "text-sm", children: "Working on it..." }) }),
8742
8730
  effectiveTurnSummary ? /* @__PURE__ */ jsx(
8743
8731
  TurnSummaryCard,
8744
8732
  {