@invergent/agent-chat-react 2.2.3 → 2.2.4

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
@@ -5975,7 +5975,7 @@ function ChatComposerInner({
5975
5975
  },
5976
5976
  children: [
5977
5977
  /* @__PURE__ */ jsx(AttachmentPreviewStrip, {}),
5978
- /* @__PURE__ */ jsxs("div", { className: "flex flex-wrap items-center justify-end gap-2 px-1 pb-2", children: [
5978
+ viewMode === "expert" && /* @__PURE__ */ jsxs("div", { className: "flex flex-wrap items-center justify-end gap-2 px-1 pb-2", children: [
5979
5979
  /* @__PURE__ */ jsxs(
5980
5980
  Button,
5981
5981
  {
@@ -7768,7 +7768,7 @@ function TurnSummaryCard({
7768
7768
  }) {
7769
7769
  const hasRecap = summary.recap.trim().length > 0;
7770
7770
  const hasArtifacts = summary.artifacts.length > 0;
7771
- if (!hasRecap && !hasArtifacts) return null;
7771
+ if (!hasArtifacts) return null;
7772
7772
  return /* @__PURE__ */ jsxs("div", { className: "mt-3 rounded border border-border bg-muted/50 px-3 py-2 text-sm", children: [
7773
7773
  /* @__PURE__ */ jsx("div", { className: "mb-2 text-xs font-semibold uppercase tracking-wide", children: "Summary" }),
7774
7774
  hasRecap && /* @__PURE__ */ jsx("p", { className: "mb-2 whitespace-pre-wrap text-foreground", children: summary.recap }),
@@ -8374,6 +8374,8 @@ var _SIMPLE_MODE_HIDDEN_TOOLS = /* @__PURE__ */ new Set([
8374
8374
  "search_files",
8375
8375
  "session_search",
8376
8376
  "skills_list",
8377
+ "skill_view",
8378
+ "skill_manage",
8377
8379
  "process",
8378
8380
  "memory",
8379
8381
  // Shell commands and code execution are infrastructure plumbing the
@@ -8383,6 +8385,16 @@ var _SIMPLE_MODE_HIDDEN_TOOLS = /* @__PURE__ */ new Set([
8383
8385
  "terminal",
8384
8386
  "execute_code"
8385
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
+ }
8386
8398
  function _isHiddenSimpleTool(tc) {
8387
8399
  if (_SIMPLE_MODE_HIDDEN_TOOLS.has(tc.toolName)) return true;
8388
8400
  if (tc.toolName.startsWith("browser_")) return true;
@@ -8557,6 +8569,7 @@ function IterationGroup({
8557
8569
  }) {
8558
8570
  const summary = message.iterationSummary?.summary;
8559
8571
  const [open, setOpen] = useState(false);
8572
+ if (_isSkillOnlyIteration(message)) return null;
8560
8573
  if (isIterationLive(message)) {
8561
8574
  const askCall = (message.toolCalls ?? []).find(
8562
8575
  (tc) => tc.toolName === "ask_user_question" && tc.status === "running"
@@ -8693,6 +8706,7 @@ function SimpleAssistantGroup({
8693
8706
  /* @__PURE__ */ jsxs("div", { className: "space-y-2", children: [
8694
8707
  messages.map((message) => {
8695
8708
  if (message.role === "system") {
8709
+ if (message.systemKind === "skill_invoked") return null;
8696
8710
  return /* @__PURE__ */ jsx(
8697
8711
  OrphanSystemMarker,
8698
8712
  {
@@ -8934,6 +8948,9 @@ function ChatThread({
8934
8948
  }
8935
8949
  if (group.role === "system") {
8936
8950
  const msg = group.messages[0];
8951
+ if (viewMode === "simple" && msg.systemKind === "skill_invoked") {
8952
+ return null;
8953
+ }
8937
8954
  const groupRetry2 = msg.id === activeFailureId ? onRetry : void 0;
8938
8955
  return /* @__PURE__ */ jsx(
8939
8956
  OrphanSystemMarker,