Files
SuperCharged-Claude-Code-Up…/server.js
uroma 9b603e5f75 feat: add smart project suggestions endpoint
Added GET /api/projects/suggestions endpoint that provides intelligent
project suggestions based on session context. The endpoint:

- Takes sessionId as a required query parameter
- Retrieves session from in-memory or historical sessions
- Calculates scores for each project using multiple criteria:
  * Directory match (90 points): session workingDir === project path
  * Subdirectory match (50 points): session workingDir starts with project path
  * Used today (20 points): project lastActivity < 1 day ago
  * Used this week (10 points): project lastActivity < 7 days ago
  * Name similarity (15 points): overlap between session dir name and project name

- Returns top 3 scored suggestions with reasons
- Also returns all projects sorted alphabetically
- Filters out projects with zero scores from suggestions
- Handles missing sessions with appropriate error responses

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
2026-01-19 16:58:56 +00:00

51 KiB