agentgui 1.0.447 → 1.0.448
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/lib/ws-handlers-session.js +17 -0
- package/package.json +1 -1
|
@@ -110,6 +110,23 @@ export function register(router, deps) {
|
|
|
110
110
|
|
|
111
111
|
router.handle('agent.subagents', async (p) => {
|
|
112
112
|
const agent = discoveredAgents.find(x => x.id === p.id);
|
|
113
|
+
if (p.id === 'claude-code') {
|
|
114
|
+
const skillsDir = path.join(os.homedir(), '.claude', 'skills');
|
|
115
|
+
try {
|
|
116
|
+
const entries = fs.readdirSync(skillsDir, { withFileTypes: true });
|
|
117
|
+
const skills = entries.filter(e => e.isDirectory()).map(e => {
|
|
118
|
+
const md = path.join(skillsDir, e.name, 'SKILL.md');
|
|
119
|
+
let name = e.name;
|
|
120
|
+
try {
|
|
121
|
+
const content = fs.readFileSync(md, 'utf-8');
|
|
122
|
+
const m = content.match(/^name:\s*(.+)$/m);
|
|
123
|
+
if (m) name = m[1].trim();
|
|
124
|
+
} catch (_) {}
|
|
125
|
+
return { id: e.name, name };
|
|
126
|
+
});
|
|
127
|
+
return { subAgents: skills };
|
|
128
|
+
} catch (_) { return { subAgents: [] }; }
|
|
129
|
+
}
|
|
113
130
|
if (!agent || agent.protocol !== 'acp') return { subAgents: [] };
|
|
114
131
|
const port = await ensureRunning(p.id);
|
|
115
132
|
if (!port) return { subAgents: [] };
|