@industry-theme/agent-panels 0.2.2 → 0.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.
@@ -17,8 +17,10 @@ export declare const createMockEvents: () => PanelEventEmitter;
17
17
  * Wraps components with mock context and ThemeProvider for Storybook
18
18
  */
19
19
  export declare const MockPanelProvider: React.FC<{
20
- children: (props: PanelComponentProps) => React.ReactNode;
20
+ children: React.ReactNode | ((props: PanelComponentProps) => React.ReactNode);
21
21
  contextOverrides?: any;
22
22
  actionsOverrides?: Partial<PanelActions>;
23
+ mockSlices?: any;
24
+ mockAdapters?: any;
23
25
  }>;
24
26
  //# sourceMappingURL=panelContext.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"panelContext.d.ts","sourceRoot":"","sources":["../../src/mocks/panelContext.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,OAAO,KAAK,EACV,mBAAmB,EAEnB,YAAY,EACZ,iBAAiB,EAIlB,MAAM,UAAU,CAAC;AA+BlB;;GAEG;AAEH,eAAO,MAAM,iBAAiB,GAAI,YAAY,GAAG,KAAG,GAsJnD,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,iBAAiB,GAC5B,YAAY,OAAO,CAAC,YAAY,CAAC,KAChC,YAkBD,CAAC;AAEH;;GAEG;AACH,eAAO,MAAM,gBAAgB,QAAO,iBAwCnC,CAAC;AAEF;;;GAGG;AACH,eAAO,MAAM,iBAAiB,EAAE,KAAK,CAAC,EAAE,CAAC;IACvC,QAAQ,EAAE,CAAC,KAAK,EAAE,mBAAmB,KAAK,KAAK,CAAC,SAAS,CAAC;IAE1D,gBAAgB,CAAC,EAAE,GAAG,CAAC;IACvB,gBAAgB,CAAC,EAAE,OAAO,CAAC,YAAY,CAAC,CAAC;CAC1C,CAYA,CAAC"}
1
+ {"version":3,"file":"panelContext.d.ts","sourceRoot":"","sources":["../../src/mocks/panelContext.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,OAAO,KAAK,EACV,mBAAmB,EAEnB,YAAY,EACZ,iBAAiB,EAIlB,MAAM,UAAU,CAAC;AA+BlB;;GAEG;AAEH,eAAO,MAAM,iBAAiB,GAAI,YAAY,GAAG,KAAG,GAsJnD,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,iBAAiB,GAC5B,YAAY,OAAO,CAAC,YAAY,CAAC,KAChC,YAkBD,CAAC;AAEH;;GAEG;AACH,eAAO,MAAM,gBAAgB,QAAO,iBAwCnC,CAAC;AAEF;;;GAGG;AACH,eAAO,MAAM,iBAAiB,EAAE,KAAK,CAAC,EAAE,CAAC;IACvC,QAAQ,EAAE,KAAK,CAAC,SAAS,GAAG,CAAC,CAAC,KAAK,EAAE,mBAAmB,KAAK,KAAK,CAAC,SAAS,CAAC,CAAC;IAE9E,gBAAgB,CAAC,EAAE,GAAG,CAAC;IACvB,gBAAgB,CAAC,EAAE,OAAO,CAAC,YAAY,CAAC,CAAC;IAEzC,UAAU,CAAC,EAAE,GAAG,CAAC;IAEjB,YAAY,CAAC,EAAE,GAAG,CAAC;CACpB,CAiCA,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"AgentDetailPanel.d.ts","sourceRoot":"","sources":["../../src/panels/AgentDetailPanel.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAsC,MAAM,OAAO,CAAC;AAC3D,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,UAAU,CAAC;AAQpD,MAAM,WAAW,qBAAsB,SAAQ,mBAAmB;CAAG;AAOrE,eAAO,MAAM,gBAAgB,EAAE,KAAK,CAAC,EAAE,CAAC,qBAAqB,CAgb5D,CAAC"}
1
+ {"version":3,"file":"AgentDetailPanel.d.ts","sourceRoot":"","sources":["../../src/panels/AgentDetailPanel.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAsC,MAAM,OAAO,CAAC;AAC3D,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,UAAU,CAAC;AAQpD,MAAM,WAAW,qBAAsB,SAAQ,mBAAmB;CAAG;AAOrE,eAAO,MAAM,gBAAgB,EAAE,KAAK,CAAC,EAAE,CAAC,qBAAqB,CAgc5D,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"SkillsListPanel.d.ts","sourceRoot":"","sources":["../../src/panels/SkillsListPanel.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAoC,MAAM,OAAO,CAAC;AAIzD,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,UAAU,CAAC;AAMpD,MAAM,WAAW,oBAAqB,SAAQ,mBAAmB;IAC/D;;;OAGG;IACH,UAAU,CAAC,EAAE,OAAO,CAAC;CACtB;AAED;;;;;;;;GAQG;AACH,eAAO,MAAM,eAAe,EAAE,KAAK,CAAC,EAAE,CAAC,oBAAoB,CA8Z1D,CAAC"}
1
+ {"version":3,"file":"SkillsListPanel.d.ts","sourceRoot":"","sources":["../../src/panels/SkillsListPanel.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAoC,MAAM,OAAO,CAAC;AAIzD,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,UAAU,CAAC;AAMpD,MAAM,WAAW,oBAAqB,SAAQ,mBAAmB;IAC/D;;;OAGG;IACH,UAAU,CAAC,EAAE,OAAO,CAAC;CACtB;AAED;;;;;;;;GAQG;AACH,eAAO,MAAM,eAAe,EAAE,KAAK,CAAC,EAAE,CAAC,oBAAoB,CA4Z1D,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"useAgentsData.d.ts","sourceRoot":"","sources":["../../../../src/panels/agents/hooks/useAgentsData.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,gBAAgB,CAAC;AAExD,MAAM,MAAM,WAAW,GACnB,cAAc,GACd,gBAAgB,GAChB,kBAAkB,CAAC;AAEvB,MAAM,WAAW,KAAK;IACpB,EAAE,EAAE,MAAM,CAAC;IACX,IAAI,EA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,KAAK,CAAC,EAAE,MAAM,CAAC;QACf,KAAK,CAAC,EAAE,MAAM,CAAC;QACf,IAAI,CAAC,EAAE,MAAM,CAAC;QACd,KAAK,CAAC,EAAE,MAAM,CAAC;KAChB,CAAC;CACH;AAKD;;GAEG;AACH,MAAM,WAAW,iBAAiB;IAChC,MAAM,EAAE,KAAK,EAAE,CAAC;CACjB;AAED,UAAU,mBAAmB;IAC3B,OAAO,EAAE,iBAAiB,CAAC;CAC5B;AAED,UAAU,mBAAmB;IAC3B,MAAM,EAAE,KAAK,EAAE,CAAC;IAChB,SAAS,EAAE,OAAO,CAAC;IACnB,KAAK,EAAE,MAAM,GAAG,IAAI,CAAC;IACrB,aAAa,EAAE,MAAM,OAAO,CAAC,IAAI,CAAC,CAAC;CACpC;AA4GD;;GAEG;AACH,eAAO,MAAM,aAAa,GAAI,cAE3B,mBAAmB,KAAG,mBAwGxB,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"useSubagentsData.d.ts","sourceRoot":"","sources":["../../../../src/panels/agents/hooks/useSubagentsData.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,gBAAgB,CAAC;AAExD,MAAM,MAAM,cAAc,GACtB,gBAAgB,GAChB,eAAe,CAAC;AAEpB,MAAM,WAAW,mBAAmB;IAClC,IAAI,EAAE,MAAM,CAAC;IACb,WAAW,EAAE,MAAM,CAAC;IACpB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB,KAAK,CAAC,EAAE,QAAQ,GAAG,MAAM,GAAG,OAAO,GAAG,SAAS,CAAC;IAChD,cAAc,CAAC,EAAE,SAAS,GAAG,aAAa,GAAG,SAAS,GAAG,mBAAmB,GAAG,MAAM,CAAC;IACtF,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,KAAK,CAAC,EAAE,OAAO,CAAC;CACjB;AAED,MAAM,WAAW,QAAQ;IACvB,EAAE,EAAE,MAAM,CAAC;IACX,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,EAAE,MAAM,CAAC;IACb,OAAO,EAAE,MAAM,CAAC;IAChB,MAAM,EAAE,MAAM,CAAC;IACf,WAAW,EAAE,mBAAmB,CAAC;IACjC,MAAM,EAAE,cAAc,CAAC;IACvB,QAAQ,EAAE,CAAC,GAAG,CAAC,CAAC;CACjB;AAED;;GAEG;AACH,MAAM,WAAW,oBAAoB;IACnC,SAAS,EAAE,QAAQ,EAAE,CAAC;CACvB;AAED,UAAU,sBAAsB;IAC9B,OAAO,EAAE,iBAAiB,CAAC;CAC5B;AAED,UAAU,sBAAsB;IAC9B,SAAS,EAAE,QAAQ,EAAE,CAAC;IACtB,SAAS,EAAE,OAAO,CAAC;IACnB,KAAK,EAAE,MAAM,GAAG,IAAI,CAAC;IACrB,gBAAgB,EAAE,MAAM,OAAO,CAAC,IAAI,CAAC,CAAC;CACvC;AAoHD;;GAEG;AACH,eAAO,MAAM,gBAAgB,GAAI,cAE9B,sBAAsB,KAAG,sBAoF3B,CAAC"}
1
+ {"version":3,"file":"useSubagentsData.d.ts","sourceRoot":"","sources":["../../../../src/panels/agents/hooks/useSubagentsData.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,gBAAgB,CAAC;AAExD,MAAM,MAAM,cAAc,GACtB,gBAAgB,GAChB,eAAe,CAAC;AAEpB,MAAM,WAAW,mBAAmB;IAClC,IAAI,EAAE,MAAM,CAAC;IACb,WAAW,EAAE,MAAM,CAAC;IACpB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB,KAAK,CAAC,EAAE,QAAQ,GAAG,MAAM,GAAG,OAAO,GAAG,SAAS,CAAC;IAChD,cAAc,CAAC,EAAE,SAAS,GAAG,aAAa,GAAG,SAAS,GAAG,mBAAmB,GAAG,MAAM,CAAC;IACtF,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,KAAK,CAAC,EAAE,OAAO,CAAC;CACjB;AAED,MAAM,WAAW,QAAQ;IACvB,EAAE,EAAE,MAAM,CAAC;IACX,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,EAAE,MAAM,CAAC;IACb,OAAO,EAAE,MAAM,CAAC;IAChB,MAAM,EAAE,MAAM,CAAC;IACf,WAAW,EAAE,mBAAmB,CAAC;IACjC,MAAM,EAAE,cAAc,CAAC;IACvB,QAAQ,EAAE,CAAC,GAAG,CAAC,CAAC;CACjB;AAKD;;GAEG;AACH,MAAM,WAAW,oBAAoB;IACnC,SAAS,EAAE,QAAQ,EAAE,CAAC;CACvB;AAED,UAAU,sBAAsB;IAC9B,OAAO,EAAE,iBAAiB,CAAC;CAC5B;AAED,UAAU,sBAAsB;IAC9B,SAAS,EAAE,QAAQ,EAAE,CAAC;IACtB,SAAS,EAAE,OAAO,CAAC;IACnB,KAAK,EAAE,MAAM,GAAG,IAAI,CAAC;IACrB,gBAAgB,EAAE,MAAM,OAAO,CAAC,IAAI,CAAC,CAAC;CACvC;AAoHD;;GAEG;AACH,eAAO,MAAM,gBAAgB,GAAI,cAE9B,sBAAsB,KAAG,sBAwG3B,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"useSkillsData.d.ts","sourceRoot":"","sources":["../../../../src/panels/skills/hooks/useSkillsData.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,gBAAgB,CAAC;AAExD,MAAM,MAAM,WAAW,GACnB,mBAAmB,GACnB,kBAAkB,GAClB,gBAAgB,GAChB,eAAe,GACf,eAAe,CAAC;AAEpB,MAAM,WAAW,aAAa;IAC5B,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,WAAW,CAAC,EAAE,MAAM,CAAC;I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AC;CACjB;AAED,UAAU,mBAAmB;IAC3B,OAAO,EAAE,iBAAiB,CAAC;CAC5B;AAED,UAAU,mBAAmB;IAC3B,MAAM,EAAE,KAAK,EAAE,CAAC;IAChB,SAAS,EAAE,OAAO,CAAC;IACnB,KAAK,EAAE,MAAM,GAAG,IAAI,CAAC;IACrB,aAAa,EAAE,MAAM,OAAO,CAAC,IAAI,CAAC,CAAC;CACpC;AA2KD;;GAEG;AACH,eAAO,MAAM,aAAa,GAAI,cAE3B,mBAAmB,KAAG,mBA0GxB,CAAC"}
@@ -2548,6 +2548,7 @@ const __iconNode = [
2548
2548
  ]
2549
2549
  ];
2550
2550
  const Zap = createLucideIcon("zap", __iconNode);
2551
+ const EMPTY_SKILLS_ARRAY = [];
2551
2552
  const determineSkillSource = (path2) => {
2552
2553
  if (path2.includes(".agent/skills/")) {
2553
2554
  return { source: "project-universal", priority: 1 };
@@ -2656,17 +2657,25 @@ const useSkillsData = ({
2656
2657
  context
2657
2658
  }) => {
2658
2659
  var _a, _b, _c;
2659
- const [skills, setSkills] = useState([]);
2660
+ const [skills, setSkills] = useState(EMPTY_SKILLS_ARRAY);
2660
2661
  const [isLoading, setIsLoading] = useState(true);
2661
2662
  const [error, setError] = useState(null);
2662
2663
  const fileTreeSlice = context.getSlice("fileTree");
2663
2664
  const fileTree = fileTreeSlice == null ? void 0 : fileTreeSlice.data;
2664
2665
  const fileTreeSha = fileTree == null ? void 0 : fileTree.sha;
2665
2666
  const globalSkillsSlice = context.getSlice("globalSkills");
2666
- const globalSkills = ((_a = globalSkillsSlice == null ? void 0 : globalSkillsSlice.data) == null ? void 0 : _a.skills) || [];
2667
+ const globalSkills = ((_a = globalSkillsSlice == null ? void 0 : globalSkillsSlice.data) == null ? void 0 : _a.skills) ?? EMPTY_SKILLS_ARRAY;
2668
+ const globalSkillsCount = globalSkills.length;
2667
2669
  const repoPath = (_b = context.currentScope.repository) == null ? void 0 : _b.path;
2668
2670
  const fileSystem = (_c = context.adapters) == null ? void 0 : _c.fileSystem;
2671
+ const lastLoadedSha = useRef(void 0);
2672
+ const lastGlobalSkillsCount = useRef(0);
2669
2673
  const loadSkills = useCallback(async () => {
2674
+ if (fileTreeSha === lastLoadedSha.current && globalSkillsCount === lastGlobalSkillsCount.current) {
2675
+ console.log("[useSkillsData] Skipping reload - data unchanged (SHA:", fileTreeSha, "globalCount:", globalSkillsCount, ")");
2676
+ return;
2677
+ }
2678
+ console.log("[useSkillsData] Loading skills - SHA changed:", fileTreeSha !== lastLoadedSha.current, "globalCount changed:", globalSkillsCount !== lastGlobalSkillsCount.current);
2670
2679
  setIsLoading(true);
2671
2680
  setError(null);
2672
2681
  try {
@@ -2695,6 +2704,8 @@ const useSkillsData = ({
2695
2704
  const allSkills = [...localSkills, ...globalSkills];
2696
2705
  console.log("[useSkillsData] Total skills:", allSkills.length);
2697
2706
  setSkills(allSkills);
2707
+ lastLoadedSha.current = fileTreeSha;
2708
+ lastGlobalSkillsCount.current = globalSkillsCount;
2698
2709
  } catch (err) {
2699
2710
  const errorMessage = err instanceof Error ? err.message : "Failed to load skills";
2700
2711
  setError(errorMessage);
@@ -2702,8 +2713,10 @@ const useSkillsData = ({
2702
2713
  } finally {
2703
2714
  setIsLoading(false);
2704
2715
  }
2705
- }, [fileTree, fileTreeSha, globalSkills, repoPath, fileSystem]);
2716
+ }, [fileTree, fileTreeSha, globalSkills, globalSkillsCount, repoPath, fileSystem]);
2706
2717
  const refreshSkills = useCallback(async () => {
2718
+ lastLoadedSha.current = void 0;
2719
+ lastGlobalSkillsCount.current = -1;
2707
2720
  await loadSkills();
2708
2721
  }, [loadSkills]);
2709
2722
  useEffect(() => {
@@ -3326,7 +3339,7 @@ const SkillsListPanel = ({
3326
3339
  children: "All Skills"
3327
3340
  }
3328
3341
  ),
3329
- /* @__PURE__ */ jsxs(
3342
+ /* @__PURE__ */ jsx(
3330
3343
  "button",
3331
3344
  {
3332
3345
  onClick: () => setSkillFilter("project"),
@@ -3345,13 +3358,10 @@ const SkillsListPanel = ({
3345
3358
  fontWeight: skillFilter === "project" ? 600 : 400,
3346
3359
  transition: "all 0.2s ease"
3347
3360
  },
3348
- children: [
3349
- /* @__PURE__ */ jsx(Folder, { size: 14 }),
3350
- browseMode ? "Git Repo" : "Project"
3351
- ]
3361
+ children: browseMode ? "Git Repo" : "Project"
3352
3362
  }
3353
3363
  ),
3354
- /* @__PURE__ */ jsxs(
3364
+ /* @__PURE__ */ jsx(
3355
3365
  "button",
3356
3366
  {
3357
3367
  onClick: () => setSkillFilter("global"),
@@ -3370,10 +3380,7 @@ const SkillsListPanel = ({
3370
3380
  fontWeight: skillFilter === "global" ? 600 : 400,
3371
3381
  transition: "all 0.2s ease"
3372
3382
  },
3373
- children: [
3374
- /* @__PURE__ */ jsx(Globe, { size: 14 }),
3375
- "Global"
3376
- ]
3383
+ children: "Global"
3377
3384
  }
3378
3385
  )
3379
3386
  ]
@@ -47534,6 +47541,57 @@ var Ut;
47534
47541
  }
47535
47542
  return Ut || (Ut = createContext(void 0)), Ut;
47536
47543
  })();
47544
+ var DocumentView = ({
47545
+ content: content2,
47546
+ onCheckboxChange,
47547
+ maxWidth = "900px",
47548
+ slideIdPrefix = "document",
47549
+ enableHtmlPopout = true,
47550
+ enableKeyboardScrolling = true,
47551
+ autoFocusOnVisible = true,
47552
+ onLinkClick,
47553
+ handleRunBashCommand,
47554
+ handlePromptCopy,
47555
+ repositoryInfo,
47556
+ fontSizeScale,
47557
+ theme: theme2,
47558
+ transparentBackground = false,
47559
+ editable = false
47560
+ }) => {
47561
+ const containerRef = useRef(null);
47562
+ const backgroundColor = transparentBackground ? "transparent" : theme2.colors.background;
47563
+ return /* @__PURE__ */ React2__default.createElement("div", {
47564
+ ref: containerRef,
47565
+ style: {
47566
+ height: "100%",
47567
+ overflow: "auto",
47568
+ backgroundColor
47569
+ }
47570
+ }, /* @__PURE__ */ React2__default.createElement("div", {
47571
+ style: {
47572
+ maxWidth: typeof maxWidth === "number" ? `${maxWidth}px` : maxWidth,
47573
+ margin: "0 auto",
47574
+ height: "100%"
47575
+ }
47576
+ }, /* @__PURE__ */ React2__default.createElement(IndustryMarkdownSlide, {
47577
+ content: content2,
47578
+ slideIdPrefix,
47579
+ slideIndex: 0,
47580
+ isVisible: true,
47581
+ theme: theme2,
47582
+ onCheckboxChange,
47583
+ enableHtmlPopout,
47584
+ enableKeyboardScrolling,
47585
+ autoFocusOnVisible,
47586
+ onLinkClick,
47587
+ handleRunBashCommand,
47588
+ fontSizeScale,
47589
+ handlePromptCopy,
47590
+ repositoryInfo,
47591
+ transparentBackground,
47592
+ editable
47593
+ })));
47594
+ };
47537
47595
  var formatRelativeTime = (dateString) => {
47538
47596
  try {
47539
47597
  const date = new Date(dateString);
@@ -48085,6 +48143,7 @@ const SkillDetailPanel = ({
48085
48143
  }
48086
48144
  );
48087
48145
  };
48146
+ const EMPTY_AGENTS_ARRAY = [];
48088
48147
  const determineAgentSource = (path2) => {
48089
48148
  if (path2 === "AGENTS.md") {
48090
48149
  return { source: "project-root", priority: 1 };
@@ -48152,7 +48211,7 @@ const useAgentsData = ({
48152
48211
  context
48153
48212
  }) => {
48154
48213
  var _a, _b, _c;
48155
- const [agents, setAgents] = useState([]);
48214
+ const [agents, setAgents] = useState(EMPTY_AGENTS_ARRAY);
48156
48215
  const [isLoading, setIsLoading] = useState(true);
48157
48216
  const [error, setError] = useState(null);
48158
48217
  const fileTreeSlice = context.getSlice("fileTree");
@@ -48162,13 +48221,21 @@ const useAgentsData = ({
48162
48221
  const globalAgents = useMemo(
48163
48222
  () => {
48164
48223
  var _a2;
48165
- return ((_a2 = globalAgentsSlice == null ? void 0 : globalAgentsSlice.data) == null ? void 0 : _a2.agents) || [];
48224
+ return ((_a2 = globalAgentsSlice == null ? void 0 : globalAgentsSlice.data) == null ? void 0 : _a2.agents) ?? EMPTY_AGENTS_ARRAY;
48166
48225
  },
48167
48226
  [(_a = globalAgentsSlice == null ? void 0 : globalAgentsSlice.data) == null ? void 0 : _a.agents]
48168
48227
  );
48228
+ const globalAgentsCount = globalAgents.length;
48169
48229
  const repoPath = (_b = context.currentScope.repository) == null ? void 0 : _b.path;
48170
48230
  const fileSystem = (_c = context.adapters) == null ? void 0 : _c.fileSystem;
48231
+ const lastLoadedSha = useRef(void 0);
48232
+ const lastGlobalAgentsCount = useRef(0);
48171
48233
  const loadAgents = useCallback(async () => {
48234
+ if (fileTreeSha === lastLoadedSha.current && globalAgentsCount === lastGlobalAgentsCount.current) {
48235
+ console.log("[useAgentsData] Skipping reload - data unchanged (SHA:", fileTreeSha, "globalCount:", globalAgentsCount, ")");
48236
+ return;
48237
+ }
48238
+ console.log("[useAgentsData] Loading agents - SHA changed:", fileTreeSha !== lastLoadedSha.current, "globalCount changed:", globalAgentsCount !== lastGlobalAgentsCount.current);
48172
48239
  setIsLoading(true);
48173
48240
  setError(null);
48174
48241
  try {
@@ -48195,6 +48262,8 @@ const useAgentsData = ({
48195
48262
  const allAgents = [...localAgents, ...globalAgents];
48196
48263
  console.log("[useAgentsData] Total agents:", allAgents.length);
48197
48264
  setAgents(allAgents);
48265
+ lastLoadedSha.current = fileTreeSha;
48266
+ lastGlobalAgentsCount.current = globalAgentsCount;
48198
48267
  } catch (err) {
48199
48268
  const errorMessage = err instanceof Error ? err.message : "Failed to load agents";
48200
48269
  setError(errorMessage);
@@ -48202,8 +48271,10 @@ const useAgentsData = ({
48202
48271
  } finally {
48203
48272
  setIsLoading(false);
48204
48273
  }
48205
- }, [fileTree, fileTreeSha, globalAgents, repoPath, fileSystem]);
48274
+ }, [fileTree, fileTreeSha, globalAgents, globalAgentsCount, repoPath, fileSystem]);
48206
48275
  const refreshAgents = useCallback(async () => {
48276
+ lastLoadedSha.current = void 0;
48277
+ lastGlobalAgentsCount.current = -1;
48207
48278
  await loadAgents();
48208
48279
  }, [loadAgents]);
48209
48280
  useEffect(() => {
@@ -48216,6 +48287,7 @@ const useAgentsData = ({
48216
48287
  refreshAgents
48217
48288
  };
48218
48289
  };
48290
+ const EMPTY_SUBAGENTS_ARRAY = [];
48219
48291
  const determineSubagentSource = (path2) => {
48220
48292
  if (path2.includes(".claude/agents/")) {
48221
48293
  return { source: "project-claude", priority: 1 };
@@ -48290,7 +48362,7 @@ const useSubagentsData = ({
48290
48362
  context
48291
48363
  }) => {
48292
48364
  var _a, _b, _c;
48293
- const [subagents, setSubagents] = useState([]);
48365
+ const [subagents, setSubagents] = useState(EMPTY_SUBAGENTS_ARRAY);
48294
48366
  const [isLoading, setIsLoading] = useState(true);
48295
48367
  const [error, setError] = useState(null);
48296
48368
  const fileTreeSlice = context.getSlice("fileTree");
@@ -48300,13 +48372,21 @@ const useSubagentsData = ({
48300
48372
  const globalSubagents = useMemo(
48301
48373
  () => {
48302
48374
  var _a2;
48303
- return ((_a2 = globalSubagentsSlice == null ? void 0 : globalSubagentsSlice.data) == null ? void 0 : _a2.subagents) || [];
48375
+ return ((_a2 = globalSubagentsSlice == null ? void 0 : globalSubagentsSlice.data) == null ? void 0 : _a2.subagents) ?? EMPTY_SUBAGENTS_ARRAY;
48304
48376
  },
48305
48377
  [(_a = globalSubagentsSlice == null ? void 0 : globalSubagentsSlice.data) == null ? void 0 : _a.subagents]
48306
48378
  );
48379
+ const globalSubagentsCount = globalSubagents.length;
48307
48380
  const repoPath = (_b = context.currentScope.repository) == null ? void 0 : _b.path;
48308
48381
  const fileSystem = (_c = context.adapters) == null ? void 0 : _c.fileSystem;
48382
+ const lastLoadedSha = useRef(void 0);
48383
+ const lastGlobalSubagentsCount = useRef(0);
48309
48384
  const loadSubagents = useCallback(async () => {
48385
+ if (fileTreeSha === lastLoadedSha.current && globalSubagentsCount === lastGlobalSubagentsCount.current) {
48386
+ console.log("[useSubagentsData] Skipping reload - data unchanged (SHA:", fileTreeSha, "globalCount:", globalSubagentsCount, ")");
48387
+ return;
48388
+ }
48389
+ console.log("[useSubagentsData] Loading subagents - SHA changed:", fileTreeSha !== lastLoadedSha.current, "globalCount changed:", globalSubagentsCount !== lastGlobalSubagentsCount.current);
48310
48390
  setIsLoading(true);
48311
48391
  setError(null);
48312
48392
  try {
@@ -48333,6 +48413,8 @@ const useSubagentsData = ({
48333
48413
  const allSubagents = [...localSubagents, ...globalSubagents];
48334
48414
  console.log("[useSubagentsData] Total subagents:", allSubagents.length);
48335
48415
  setSubagents(allSubagents);
48416
+ lastLoadedSha.current = fileTreeSha;
48417
+ lastGlobalSubagentsCount.current = globalSubagentsCount;
48336
48418
  } catch (err) {
48337
48419
  const errorMessage = err instanceof Error ? err.message : "Failed to load subagents";
48338
48420
  setError(errorMessage);
@@ -48340,8 +48422,10 @@ const useSubagentsData = ({
48340
48422
  } finally {
48341
48423
  setIsLoading(false);
48342
48424
  }
48343
- }, [fileTree, fileTreeSha, globalSubagents, repoPath, fileSystem]);
48425
+ }, [fileTree, fileTreeSha, globalSubagents, globalSubagentsCount, repoPath, fileSystem]);
48344
48426
  const refreshSubagents = useCallback(async () => {
48427
+ lastLoadedSha.current = void 0;
48428
+ lastGlobalSubagentsCount.current = -1;
48345
48429
  await loadSubagents();
48346
48430
  }, [loadSubagents]);
48347
48431
  useEffect(() => {
@@ -49306,9 +49390,9 @@ const AgentDetailPanel = ({
49306
49390
  tabIndex: -1,
49307
49391
  style: {
49308
49392
  height: "100%",
49309
- overflow: "auto",
49393
+ display: "flex",
49394
+ flexDirection: "column",
49310
49395
  backgroundColor: theme2.colors.background,
49311
- padding: "clamp(16px, 3vw, 24px)",
49312
49396
  fontFamily: theme2.fonts.body,
49313
49397
  outline: "none"
49314
49398
  },
@@ -49317,9 +49401,11 @@ const AgentDetailPanel = ({
49317
49401
  "div",
49318
49402
  {
49319
49403
  style: {
49320
- marginBottom: "24px",
49404
+ flexShrink: 0,
49405
+ padding: "clamp(16px, 3vw, 24px)",
49321
49406
  paddingBottom: "16px",
49322
- borderBottom: `1px solid ${theme2.colors.border}`
49407
+ borderBottom: `1px solid ${theme2.colors.border}`,
49408
+ backgroundColor: theme2.colors.background
49323
49409
  },
49324
49410
  children: [
49325
49411
  /* @__PURE__ */ jsxs("div", { style: { display: "flex", alignItems: "center", gap: "12px", marginBottom: "8px" }, children: [
@@ -49355,9 +49441,12 @@ const AgentDetailPanel = ({
49355
49441
  "div",
49356
49442
  {
49357
49443
  style: {
49444
+ flex: 1,
49445
+ overflow: "auto",
49446
+ padding: "clamp(16px, 3vw, 24px)",
49358
49447
  color: theme2.colors.text
49359
49448
  },
49360
- children: /* @__PURE__ */ jsx(SkillMarkdown, { content: agent.content, theme: theme2 })
49449
+ children: /* @__PURE__ */ jsx(DocumentView, { content: agent.content, theme: theme2 })
49361
49450
  }
49362
49451
  )
49363
49452
  ]
@@ -49374,9 +49463,9 @@ const AgentDetailPanel = ({
49374
49463
  tabIndex: -1,
49375
49464
  style: {
49376
49465
  height: "100%",
49377
- overflow: "auto",
49466
+ display: "flex",
49467
+ flexDirection: "column",
49378
49468
  backgroundColor: theme2.colors.background,
49379
- padding: "clamp(16px, 3vw, 24px)",
49380
49469
  fontFamily: theme2.fonts.body,
49381
49470
  outline: "none"
49382
49471
  },
@@ -49385,9 +49474,11 @@ const AgentDetailPanel = ({
49385
49474
  "div",
49386
49475
  {
49387
49476
  style: {
49388
- marginBottom: "24px",
49477
+ flexShrink: 0,
49478
+ padding: "clamp(16px, 3vw, 24px)",
49389
49479
  paddingBottom: "16px",
49390
- borderBottom: `1px solid ${theme2.colors.border}`
49480
+ borderBottom: `1px solid ${theme2.colors.border}`,
49481
+ backgroundColor: theme2.colors.background
49391
49482
  },
49392
49483
  children: [
49393
49484
  /* @__PURE__ */ jsxs("div", { style: { display: "flex", alignItems: "center", gap: "12px", marginBottom: "8px" }, children: [
@@ -49609,62 +49700,74 @@ const AgentDetailPanel = ({
49609
49700
  ]
49610
49701
  }
49611
49702
  ),
49612
- /* @__PURE__ */ jsxs("div", { style: { marginTop: "32px" }, children: [
49613
- /* @__PURE__ */ jsx(
49614
- "h2",
49615
- {
49616
- style: {
49617
- margin: "0 0 16px 0",
49618
- fontSize: theme2.fontSizes[3],
49619
- color: theme2.colors.text,
49620
- fontWeight: 600
49621
- },
49622
- children: "Prompt"
49623
- }
49624
- ),
49625
- /* @__PURE__ */ jsx(
49626
- "div",
49627
- {
49628
- style: {
49629
- padding: "16px",
49630
- background: theme2.colors.backgroundSecondary,
49631
- border: `1px solid ${theme2.colors.border}`,
49632
- borderRadius: theme2.radii[2],
49633
- color: theme2.colors.text
49634
- },
49635
- children: /* @__PURE__ */ jsx(SkillMarkdown, { content: subagent.prompt, theme: theme2 })
49636
- }
49637
- )
49638
- ] }),
49639
- fm.disallowedTools && /* @__PURE__ */ jsxs("div", { style: { marginTop: "24px" }, children: [
49640
- /* @__PURE__ */ jsx(
49641
- "h3",
49642
- {
49643
- style: {
49644
- margin: "0 0 12px 0",
49645
- fontSize: theme2.fontSizes[2],
49646
- color: theme2.colors.text,
49647
- fontWeight: 600
49648
- },
49649
- children: "Disallowed Tools"
49650
- }
49651
- ),
49652
- /* @__PURE__ */ jsx(
49653
- "div",
49654
- {
49655
- style: {
49656
- padding: "12px",
49657
- background: `${theme2.colors.error}10`,
49658
- border: `1px solid ${theme2.colors.error}40`,
49659
- borderRadius: theme2.radii[2],
49660
- color: theme2.colors.text,
49661
- fontFamily: theme2.fonts.monospace,
49662
- fontSize: theme2.fontSizes[1]
49663
- },
49664
- children: fm.disallowedTools
49665
- }
49666
- )
49667
- ] })
49703
+ /* @__PURE__ */ jsxs(
49704
+ "div",
49705
+ {
49706
+ style: {
49707
+ flex: 1,
49708
+ overflow: "auto",
49709
+ padding: "clamp(16px, 3vw, 24px)"
49710
+ },
49711
+ children: [
49712
+ /* @__PURE__ */ jsxs("div", { children: [
49713
+ /* @__PURE__ */ jsx(
49714
+ "h2",
49715
+ {
49716
+ style: {
49717
+ margin: "0 0 16px 0",
49718
+ fontSize: theme2.fontSizes[3],
49719
+ color: theme2.colors.text,
49720
+ fontWeight: 600
49721
+ },
49722
+ children: "Prompt"
49723
+ }
49724
+ ),
49725
+ /* @__PURE__ */ jsx(
49726
+ "div",
49727
+ {
49728
+ style: {
49729
+ padding: "16px",
49730
+ background: theme2.colors.backgroundSecondary,
49731
+ border: `1px solid ${theme2.colors.border}`,
49732
+ borderRadius: theme2.radii[2],
49733
+ color: theme2.colors.text
49734
+ },
49735
+ children: /* @__PURE__ */ jsx(DocumentView, { content: subagent.prompt, theme: theme2 })
49736
+ }
49737
+ )
49738
+ ] }),
49739
+ fm.disallowedTools && /* @__PURE__ */ jsxs("div", { style: { marginTop: "24px" }, children: [
49740
+ /* @__PURE__ */ jsx(
49741
+ "h3",
49742
+ {
49743
+ style: {
49744
+ margin: "0 0 12px 0",
49745
+ fontSize: theme2.fontSizes[2],
49746
+ color: theme2.colors.text,
49747
+ fontWeight: 600
49748
+ },
49749
+ children: "Disallowed Tools"
49750
+ }
49751
+ ),
49752
+ /* @__PURE__ */ jsx(
49753
+ "div",
49754
+ {
49755
+ style: {
49756
+ padding: "12px",
49757
+ background: `${theme2.colors.error}10`,
49758
+ border: `1px solid ${theme2.colors.error}40`,
49759
+ borderRadius: theme2.radii[2],
49760
+ color: theme2.colors.text,
49761
+ fontFamily: theme2.fonts.monospace,
49762
+ fontSize: theme2.fontSizes[1]
49763
+ },
49764
+ children: fm.disallowedTools
49765
+ }
49766
+ )
49767
+ ] })
49768
+ ]
49769
+ }
49770
+ )
49668
49771
  ]
49669
49772
  }
49670
49773
  );