@blade-hq/agent-react 2612.0.0-beta.40 → 2612.0.0-beta.41

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.
@@ -113,10 +113,11 @@ import {
113
113
  usePlanRevealRevision,
114
114
  useSessionHandle,
115
115
  useSessionPluginActivation,
116
+ useSessionSkills,
116
117
  useSessionSource,
117
118
  useSessionState,
118
119
  useSingleSessionSource
119
- } from "./chunk-5S4H3CJD.js";
120
+ } from "./chunk-42P352DI.js";
120
121
  import {
121
122
  __export
122
123
  } from "./chunk-PR4QN5HX.js";
@@ -40427,6 +40428,17 @@ function getLoopCardStyles(status) {
40427
40428
  // src/chat/WorkflowRunBlock.tsx
40428
40429
  import { Fragment as Fragment16, jsx as jsx38, jsxs as jsxs33 } from "react/jsx-runtime";
40429
40430
  var EMPTY_ENTRIES = [];
40431
+ var NO_SKILLS = [];
40432
+ function workflowTitle(name, argumentsJson, skills) {
40433
+ let skillId = "";
40434
+ try {
40435
+ const raw = JSON.parse(argumentsJson)?.skill_id;
40436
+ skillId = typeof raw === "string" ? raw.trim() : "";
40437
+ } catch {
40438
+ }
40439
+ const displayName = skillId ? skills.find((skill) => skill.skill_id === skillId)?.display_name?.trim() : "";
40440
+ return displayName ? name.replace(`\u300C${skillId}\u300D`, () => `\u300C${displayName}\u300D`) : name;
40441
+ }
40430
40442
  function synthToolCall(loopName, info, desc) {
40431
40443
  return {
40432
40444
  id: loopName,
@@ -40588,7 +40600,10 @@ function WorkflowRunBlock({ toolCall, sessionId }) {
40588
40600
  const status = run?.status ?? "running";
40589
40601
  const running = status === "running";
40590
40602
  const stepCount = groups.length || stepLoops.length;
40591
- const title = run?.name || "\u6280\u80FD";
40603
+ const viewerRole = useSessionState(sessionId, (state) => state.viewerRole);
40604
+ const canListSkills = !sessionId.startsWith("share:") && viewerRole !== "viewer";
40605
+ const { data: sessionSkills = NO_SKILLS } = useSessionSkills(canListSkills ? sessionId : null);
40606
+ const title = workflowTitle(run?.name || "\u6280\u80FD", toolCall.arguments, sessionSkills);
40592
40607
  const statusSummary = running ? `\u8FDB\u884C\u4E2D \xB7 ${stepCount} \u6B65` : status === "error" ? `\u5931\u8D25 \xB7 ${stepCount} \u6B65` : status === "cancelled" ? `\u5DF2\u53D6\u6D88 \xB7 ${stepCount} \u6B65` : `\u5DF2\u5B8C\u6210 \xB7 ${stepCount} \u6B65`;
40593
40608
  const hasStepContent = groups.length > 0 || stepLoops.length > 0;
40594
40609
  return /* @__PURE__ */ jsxs33("div", { className: "msg-animate overflow-hidden rounded-xl border border-[hsl(var(--border))] bg-[hsl(var(--card))]/50", children: [
@@ -50378,4 +50393,4 @@ use-stick-to-bottom/dist/StickToBottom.js:
50378
50393
  js-yaml/dist/js-yaml.mjs:
50379
50394
  (*! js-yaml 4.1.1 https://github.com/nodeca/js-yaml @license MIT *)
50380
50395
  */
50381
- //# sourceMappingURL=chunk-5X6RBFGB.js.map
50396
+ //# sourceMappingURL=chunk-F7BR2KMK.js.map