@industry-theme/agent-panels 0.2.3 → 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.
- package/dist/mocks/panelContext.d.ts +3 -1
- package/dist/mocks/panelContext.d.ts.map +1 -1
- package/dist/panels/AgentDetailPanel.d.ts.map +1 -1
- package/dist/panels/agents/hooks/useAgentsData.d.ts.map +1 -1
- package/dist/panels/agents/hooks/useSubagentsData.d.ts.map +1 -1
- package/dist/panels/skills/hooks/useSkillsData.d.ts.map +1 -1
- package/dist/panels.bundle.js +183 -74
- package/dist/panels.bundle.js.map +1 -1
- package/package.json +1 -1
|
@@ -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;
|
|
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,
|
|
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":"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,EAAE,MAAM,CAAC;IACb,IAAI,EAAE,MAAM,CAAC;IACb,OAAO,EAAE,MAAM,CAAC;IAChB,MAAM,EAAE,WAAW,CAAC;IACpB,QAAQ,EAAE,CAAC,GAAG,CAAC,GAAG,CAAC,CAAC;IAEpB,QAAQ,CAAC,EAAE;QACT,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;
|
|
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,EAAE,MAAM,CAAC;IACb,IAAI,EAAE,MAAM,CAAC;IACb,OAAO,EAAE,MAAM,CAAC;IAChB,MAAM,EAAE,WAAW,CAAC;IACpB,QAAQ,EAAE,CAAC,GAAG,CAAC,GAAG,CAAC,CAAC;IAEpB,QAAQ,CAAC,EAAE;QACT,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;
|
|
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,WAA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
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(() => {
|
|
@@ -47528,6 +47541,57 @@ var Ut;
|
|
|
47528
47541
|
}
|
|
47529
47542
|
return Ut || (Ut = createContext(void 0)), Ut;
|
|
47530
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
|
+
};
|
|
47531
47595
|
var formatRelativeTime = (dateString) => {
|
|
47532
47596
|
try {
|
|
47533
47597
|
const date = new Date(dateString);
|
|
@@ -48079,6 +48143,7 @@ const SkillDetailPanel = ({
|
|
|
48079
48143
|
}
|
|
48080
48144
|
);
|
|
48081
48145
|
};
|
|
48146
|
+
const EMPTY_AGENTS_ARRAY = [];
|
|
48082
48147
|
const determineAgentSource = (path2) => {
|
|
48083
48148
|
if (path2 === "AGENTS.md") {
|
|
48084
48149
|
return { source: "project-root", priority: 1 };
|
|
@@ -48146,7 +48211,7 @@ const useAgentsData = ({
|
|
|
48146
48211
|
context
|
|
48147
48212
|
}) => {
|
|
48148
48213
|
var _a, _b, _c;
|
|
48149
|
-
const [agents, setAgents] = useState(
|
|
48214
|
+
const [agents, setAgents] = useState(EMPTY_AGENTS_ARRAY);
|
|
48150
48215
|
const [isLoading, setIsLoading] = useState(true);
|
|
48151
48216
|
const [error, setError] = useState(null);
|
|
48152
48217
|
const fileTreeSlice = context.getSlice("fileTree");
|
|
@@ -48156,13 +48221,21 @@ const useAgentsData = ({
|
|
|
48156
48221
|
const globalAgents = useMemo(
|
|
48157
48222
|
() => {
|
|
48158
48223
|
var _a2;
|
|
48159
|
-
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;
|
|
48160
48225
|
},
|
|
48161
48226
|
[(_a = globalAgentsSlice == null ? void 0 : globalAgentsSlice.data) == null ? void 0 : _a.agents]
|
|
48162
48227
|
);
|
|
48228
|
+
const globalAgentsCount = globalAgents.length;
|
|
48163
48229
|
const repoPath = (_b = context.currentScope.repository) == null ? void 0 : _b.path;
|
|
48164
48230
|
const fileSystem = (_c = context.adapters) == null ? void 0 : _c.fileSystem;
|
|
48231
|
+
const lastLoadedSha = useRef(void 0);
|
|
48232
|
+
const lastGlobalAgentsCount = useRef(0);
|
|
48165
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);
|
|
48166
48239
|
setIsLoading(true);
|
|
48167
48240
|
setError(null);
|
|
48168
48241
|
try {
|
|
@@ -48189,6 +48262,8 @@ const useAgentsData = ({
|
|
|
48189
48262
|
const allAgents = [...localAgents, ...globalAgents];
|
|
48190
48263
|
console.log("[useAgentsData] Total agents:", allAgents.length);
|
|
48191
48264
|
setAgents(allAgents);
|
|
48265
|
+
lastLoadedSha.current = fileTreeSha;
|
|
48266
|
+
lastGlobalAgentsCount.current = globalAgentsCount;
|
|
48192
48267
|
} catch (err) {
|
|
48193
48268
|
const errorMessage = err instanceof Error ? err.message : "Failed to load agents";
|
|
48194
48269
|
setError(errorMessage);
|
|
@@ -48196,8 +48271,10 @@ const useAgentsData = ({
|
|
|
48196
48271
|
} finally {
|
|
48197
48272
|
setIsLoading(false);
|
|
48198
48273
|
}
|
|
48199
|
-
}, [fileTree, fileTreeSha, globalAgents, repoPath, fileSystem]);
|
|
48274
|
+
}, [fileTree, fileTreeSha, globalAgents, globalAgentsCount, repoPath, fileSystem]);
|
|
48200
48275
|
const refreshAgents = useCallback(async () => {
|
|
48276
|
+
lastLoadedSha.current = void 0;
|
|
48277
|
+
lastGlobalAgentsCount.current = -1;
|
|
48201
48278
|
await loadAgents();
|
|
48202
48279
|
}, [loadAgents]);
|
|
48203
48280
|
useEffect(() => {
|
|
@@ -48210,6 +48287,7 @@ const useAgentsData = ({
|
|
|
48210
48287
|
refreshAgents
|
|
48211
48288
|
};
|
|
48212
48289
|
};
|
|
48290
|
+
const EMPTY_SUBAGENTS_ARRAY = [];
|
|
48213
48291
|
const determineSubagentSource = (path2) => {
|
|
48214
48292
|
if (path2.includes(".claude/agents/")) {
|
|
48215
48293
|
return { source: "project-claude", priority: 1 };
|
|
@@ -48284,7 +48362,7 @@ const useSubagentsData = ({
|
|
|
48284
48362
|
context
|
|
48285
48363
|
}) => {
|
|
48286
48364
|
var _a, _b, _c;
|
|
48287
|
-
const [subagents, setSubagents] = useState(
|
|
48365
|
+
const [subagents, setSubagents] = useState(EMPTY_SUBAGENTS_ARRAY);
|
|
48288
48366
|
const [isLoading, setIsLoading] = useState(true);
|
|
48289
48367
|
const [error, setError] = useState(null);
|
|
48290
48368
|
const fileTreeSlice = context.getSlice("fileTree");
|
|
@@ -48294,13 +48372,21 @@ const useSubagentsData = ({
|
|
|
48294
48372
|
const globalSubagents = useMemo(
|
|
48295
48373
|
() => {
|
|
48296
48374
|
var _a2;
|
|
48297
|
-
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;
|
|
48298
48376
|
},
|
|
48299
48377
|
[(_a = globalSubagentsSlice == null ? void 0 : globalSubagentsSlice.data) == null ? void 0 : _a.subagents]
|
|
48300
48378
|
);
|
|
48379
|
+
const globalSubagentsCount = globalSubagents.length;
|
|
48301
48380
|
const repoPath = (_b = context.currentScope.repository) == null ? void 0 : _b.path;
|
|
48302
48381
|
const fileSystem = (_c = context.adapters) == null ? void 0 : _c.fileSystem;
|
|
48382
|
+
const lastLoadedSha = useRef(void 0);
|
|
48383
|
+
const lastGlobalSubagentsCount = useRef(0);
|
|
48303
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);
|
|
48304
48390
|
setIsLoading(true);
|
|
48305
48391
|
setError(null);
|
|
48306
48392
|
try {
|
|
@@ -48327,6 +48413,8 @@ const useSubagentsData = ({
|
|
|
48327
48413
|
const allSubagents = [...localSubagents, ...globalSubagents];
|
|
48328
48414
|
console.log("[useSubagentsData] Total subagents:", allSubagents.length);
|
|
48329
48415
|
setSubagents(allSubagents);
|
|
48416
|
+
lastLoadedSha.current = fileTreeSha;
|
|
48417
|
+
lastGlobalSubagentsCount.current = globalSubagentsCount;
|
|
48330
48418
|
} catch (err) {
|
|
48331
48419
|
const errorMessage = err instanceof Error ? err.message : "Failed to load subagents";
|
|
48332
48420
|
setError(errorMessage);
|
|
@@ -48334,8 +48422,10 @@ const useSubagentsData = ({
|
|
|
48334
48422
|
} finally {
|
|
48335
48423
|
setIsLoading(false);
|
|
48336
48424
|
}
|
|
48337
|
-
}, [fileTree, fileTreeSha, globalSubagents, repoPath, fileSystem]);
|
|
48425
|
+
}, [fileTree, fileTreeSha, globalSubagents, globalSubagentsCount, repoPath, fileSystem]);
|
|
48338
48426
|
const refreshSubagents = useCallback(async () => {
|
|
48427
|
+
lastLoadedSha.current = void 0;
|
|
48428
|
+
lastGlobalSubagentsCount.current = -1;
|
|
48339
48429
|
await loadSubagents();
|
|
48340
48430
|
}, [loadSubagents]);
|
|
48341
48431
|
useEffect(() => {
|
|
@@ -49300,9 +49390,9 @@ const AgentDetailPanel = ({
|
|
|
49300
49390
|
tabIndex: -1,
|
|
49301
49391
|
style: {
|
|
49302
49392
|
height: "100%",
|
|
49303
|
-
|
|
49393
|
+
display: "flex",
|
|
49394
|
+
flexDirection: "column",
|
|
49304
49395
|
backgroundColor: theme2.colors.background,
|
|
49305
|
-
padding: "clamp(16px, 3vw, 24px)",
|
|
49306
49396
|
fontFamily: theme2.fonts.body,
|
|
49307
49397
|
outline: "none"
|
|
49308
49398
|
},
|
|
@@ -49311,9 +49401,11 @@ const AgentDetailPanel = ({
|
|
|
49311
49401
|
"div",
|
|
49312
49402
|
{
|
|
49313
49403
|
style: {
|
|
49314
|
-
|
|
49404
|
+
flexShrink: 0,
|
|
49405
|
+
padding: "clamp(16px, 3vw, 24px)",
|
|
49315
49406
|
paddingBottom: "16px",
|
|
49316
|
-
borderBottom: `1px solid ${theme2.colors.border}
|
|
49407
|
+
borderBottom: `1px solid ${theme2.colors.border}`,
|
|
49408
|
+
backgroundColor: theme2.colors.background
|
|
49317
49409
|
},
|
|
49318
49410
|
children: [
|
|
49319
49411
|
/* @__PURE__ */ jsxs("div", { style: { display: "flex", alignItems: "center", gap: "12px", marginBottom: "8px" }, children: [
|
|
@@ -49349,9 +49441,12 @@ const AgentDetailPanel = ({
|
|
|
49349
49441
|
"div",
|
|
49350
49442
|
{
|
|
49351
49443
|
style: {
|
|
49444
|
+
flex: 1,
|
|
49445
|
+
overflow: "auto",
|
|
49446
|
+
padding: "clamp(16px, 3vw, 24px)",
|
|
49352
49447
|
color: theme2.colors.text
|
|
49353
49448
|
},
|
|
49354
|
-
children: /* @__PURE__ */ jsx(
|
|
49449
|
+
children: /* @__PURE__ */ jsx(DocumentView, { content: agent.content, theme: theme2 })
|
|
49355
49450
|
}
|
|
49356
49451
|
)
|
|
49357
49452
|
]
|
|
@@ -49368,9 +49463,9 @@ const AgentDetailPanel = ({
|
|
|
49368
49463
|
tabIndex: -1,
|
|
49369
49464
|
style: {
|
|
49370
49465
|
height: "100%",
|
|
49371
|
-
|
|
49466
|
+
display: "flex",
|
|
49467
|
+
flexDirection: "column",
|
|
49372
49468
|
backgroundColor: theme2.colors.background,
|
|
49373
|
-
padding: "clamp(16px, 3vw, 24px)",
|
|
49374
49469
|
fontFamily: theme2.fonts.body,
|
|
49375
49470
|
outline: "none"
|
|
49376
49471
|
},
|
|
@@ -49379,9 +49474,11 @@ const AgentDetailPanel = ({
|
|
|
49379
49474
|
"div",
|
|
49380
49475
|
{
|
|
49381
49476
|
style: {
|
|
49382
|
-
|
|
49477
|
+
flexShrink: 0,
|
|
49478
|
+
padding: "clamp(16px, 3vw, 24px)",
|
|
49383
49479
|
paddingBottom: "16px",
|
|
49384
|
-
borderBottom: `1px solid ${theme2.colors.border}
|
|
49480
|
+
borderBottom: `1px solid ${theme2.colors.border}`,
|
|
49481
|
+
backgroundColor: theme2.colors.background
|
|
49385
49482
|
},
|
|
49386
49483
|
children: [
|
|
49387
49484
|
/* @__PURE__ */ jsxs("div", { style: { display: "flex", alignItems: "center", gap: "12px", marginBottom: "8px" }, children: [
|
|
@@ -49603,62 +49700,74 @@ const AgentDetailPanel = ({
|
|
|
49603
49700
|
]
|
|
49604
49701
|
}
|
|
49605
49702
|
),
|
|
49606
|
-
/* @__PURE__ */ jsxs(
|
|
49607
|
-
|
|
49608
|
-
|
|
49609
|
-
{
|
|
49610
|
-
|
|
49611
|
-
|
|
49612
|
-
|
|
49613
|
-
|
|
49614
|
-
|
|
49615
|
-
|
|
49616
|
-
|
|
49617
|
-
|
|
49618
|
-
|
|
49619
|
-
|
|
49620
|
-
|
|
49621
|
-
|
|
49622
|
-
|
|
49623
|
-
|
|
49624
|
-
|
|
49625
|
-
|
|
49626
|
-
|
|
49627
|
-
|
|
49628
|
-
|
|
49629
|
-
|
|
49630
|
-
|
|
49631
|
-
|
|
49632
|
-
|
|
49633
|
-
|
|
49634
|
-
|
|
49635
|
-
|
|
49636
|
-
|
|
49637
|
-
|
|
49638
|
-
|
|
49639
|
-
|
|
49640
|
-
|
|
49641
|
-
|
|
49642
|
-
},
|
|
49643
|
-
|
|
49644
|
-
|
|
49645
|
-
|
|
49646
|
-
|
|
49647
|
-
|
|
49648
|
-
|
|
49649
|
-
|
|
49650
|
-
|
|
49651
|
-
|
|
49652
|
-
|
|
49653
|
-
|
|
49654
|
-
|
|
49655
|
-
|
|
49656
|
-
|
|
49657
|
-
|
|
49658
|
-
|
|
49659
|
-
|
|
49660
|
-
|
|
49661
|
-
|
|
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
|
+
)
|
|
49662
49771
|
]
|
|
49663
49772
|
}
|
|
49664
49773
|
);
|