@ian2018cs/agenthub 0.1.100 → 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 CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ian2018cs/agenthub",
3
- "version": "0.1.100",
3
+ "version": "0.2.0",
4
4
  "description": "A web-based UI for AI Agents",
5
5
  "type": "module",
6
6
  "main": "server/index.js",
@@ -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
- const projectPath = entry.originalPath || projectKey.replace(/-/g, '/');
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 = '';