@invergent/agent-chat-react 2.2.3 → 2.2.5

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.cjs CHANGED
@@ -6256,7 +6256,7 @@ function ChatComposerInner({
6256
6256
  },
6257
6257
  children: [
6258
6258
  /* @__PURE__ */ jsxRuntime.jsx(AttachmentPreviewStrip, {}),
6259
- /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex flex-wrap items-center justify-end gap-2 px-1 pb-2", children: [
6259
+ viewMode === "expert" && /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex flex-wrap items-center justify-end gap-2 px-1 pb-2", children: [
6260
6260
  /* @__PURE__ */ jsxRuntime.jsxs(
6261
6261
  Button,
6262
6262
  {
@@ -8063,7 +8063,7 @@ function TurnSummaryCard({
8063
8063
  }) {
8064
8064
  const hasRecap = summary.recap.trim().length > 0;
8065
8065
  const hasArtifacts = summary.artifacts.length > 0;
8066
- if (!hasRecap && !hasArtifacts) return null;
8066
+ if (!hasArtifacts) return null;
8067
8067
  return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "mt-3 rounded border border-border bg-muted/50 px-3 py-2 text-sm", children: [
8068
8068
  /* @__PURE__ */ jsxRuntime.jsx("div", { className: "mb-2 text-xs font-semibold uppercase tracking-wide", children: "Summary" }),
8069
8069
  hasRecap && /* @__PURE__ */ jsxRuntime.jsx("p", { className: "mb-2 whitespace-pre-wrap text-foreground", children: summary.recap }),
@@ -8672,6 +8672,8 @@ var _SIMPLE_MODE_HIDDEN_TOOLS = /* @__PURE__ */ new Set([
8672
8672
  "search_files",
8673
8673
  "session_search",
8674
8674
  "skills_list",
8675
+ "skill_view",
8676
+ "skill_manage",
8675
8677
  "process",
8676
8678
  "memory",
8677
8679
  // Shell commands and code execution are infrastructure plumbing the
@@ -8681,6 +8683,16 @@ var _SIMPLE_MODE_HIDDEN_TOOLS = /* @__PURE__ */ new Set([
8681
8683
  "terminal",
8682
8684
  "execute_code"
8683
8685
  ]);
8686
+ var _SKILL_TOOL_NAMES = /* @__PURE__ */ new Set([
8687
+ "skills_list",
8688
+ "skill_view",
8689
+ "skill_manage"
8690
+ ]);
8691
+ function _isSkillOnlyIteration(message) {
8692
+ const calls = message.toolCalls ?? [];
8693
+ if (calls.length === 0) return false;
8694
+ return calls.every((tc) => _SKILL_TOOL_NAMES.has(tc.toolName));
8695
+ }
8684
8696
  function _isHiddenSimpleTool(tc) {
8685
8697
  if (_SIMPLE_MODE_HIDDEN_TOOLS.has(tc.toolName)) return true;
8686
8698
  if (tc.toolName.startsWith("browser_")) return true;
@@ -8855,6 +8867,7 @@ function IterationGroup({
8855
8867
  }) {
8856
8868
  const summary = message.iterationSummary?.summary;
8857
8869
  const [open, setOpen] = react.useState(false);
8870
+ if (_isSkillOnlyIteration(message)) return null;
8858
8871
  if (isIterationLive(message)) {
8859
8872
  const askCall = (message.toolCalls ?? []).find(
8860
8873
  (tc) => tc.toolName === "ask_user_question" && tc.status === "running"
@@ -8991,6 +9004,7 @@ function SimpleAssistantGroup({
8991
9004
  /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "space-y-2", children: [
8992
9005
  messages.map((message) => {
8993
9006
  if (message.role === "system") {
9007
+ if (message.systemKind === "skill_invoked") return null;
8994
9008
  return /* @__PURE__ */ jsxRuntime.jsx(
8995
9009
  OrphanSystemMarker,
8996
9010
  {
@@ -9232,6 +9246,9 @@ function ChatThread({
9232
9246
  }
9233
9247
  if (group.role === "system") {
9234
9248
  const msg = group.messages[0];
9249
+ if (viewMode === "simple" && msg.systemKind === "skill_invoked") {
9250
+ return null;
9251
+ }
9235
9252
  const groupRetry2 = msg.id === activeFailureId ? onRetry : void 0;
9236
9253
  return /* @__PURE__ */ jsxRuntime.jsx(
9237
9254
  OrphanSystemMarker,