@ian2018cs/agenthub 0.1.99 → 0.2.0
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/package.json +1 -1
- package/server/projects.js +10 -0
- package/server/routes/agents.js +14 -2
package/package.json
CHANGED
package/server/projects.js
CHANGED
|
@@ -960,6 +960,16 @@ async function deleteProject(projectName, userUuid, options = {}) {
|
|
|
960
960
|
// Remove from project config
|
|
961
961
|
const config = await loadProjectConfig(userUuid);
|
|
962
962
|
delete config[projectName];
|
|
963
|
+
// Also remove any config entry matching by originalPath.
|
|
964
|
+
// This handles encoding differences: Claude CLI replaces '_' with '-' in folder names,
|
|
965
|
+
// but addProjectManually only replaces '/' with '-', so keys may differ.
|
|
966
|
+
if (resolvedProjectDir) {
|
|
967
|
+
for (const [key, entry] of Object.entries(config)) {
|
|
968
|
+
if (entry.originalPath === resolvedProjectDir) {
|
|
969
|
+
delete config[key];
|
|
970
|
+
}
|
|
971
|
+
}
|
|
972
|
+
}
|
|
963
973
|
await saveProjectConfig(config, userUuid);
|
|
964
974
|
|
|
965
975
|
// Clean up project-scoped MCP servers from .claude.json
|
package/server/routes/agents.js
CHANGED
|
@@ -1268,9 +1268,21 @@ router.post('/generate-description', async (req, res) => {
|
|
|
1268
1268
|
|
|
1269
1269
|
const config = await loadProjectConfig(userUuid);
|
|
1270
1270
|
const entry = config[projectKey];
|
|
1271
|
-
if (!entry) return res.status(404).json({ error: 'Project not found' });
|
|
1272
1271
|
|
|
1273
|
-
|
|
1272
|
+
let projectPath;
|
|
1273
|
+
if (entry?.originalPath) {
|
|
1274
|
+
projectPath = entry.originalPath;
|
|
1275
|
+
} else if (entry) {
|
|
1276
|
+
projectPath = projectKey.replace(/-/g, '/');
|
|
1277
|
+
} else {
|
|
1278
|
+
// Project may be a CLI-scanned project with different key encoding (e.g. _ → -) not in manual config
|
|
1279
|
+
try {
|
|
1280
|
+
projectPath = await extractProjectDirectory(projectKey, userUuid);
|
|
1281
|
+
if (!projectPath) return res.status(404).json({ error: 'Project not found' });
|
|
1282
|
+
} catch {
|
|
1283
|
+
return res.status(404).json({ error: 'Project not found' });
|
|
1284
|
+
}
|
|
1285
|
+
}
|
|
1274
1286
|
|
|
1275
1287
|
// Read CLAUDE.md if available
|
|
1276
1288
|
let claudeMdContent = '';
|