fix: Correct context-generator import path in SearchRoutes

The /api/context/inject endpoint was using an incorrect relative import
path for context-generator.cjs. Since SearchRoutes is in
src/services/worker/http/routes/, the correct path to reach
src/services/context-generator.ts is ../../../context-generator.js

This fixes the session start context injection issue where the hook
would print correctly but no context would load in the session.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-authored-by: Alex Newman <thedotmack@users.noreply.github.com>
This commit is contained in:
claude[bot]
2025-12-06 22:25:58 +00:00
parent bbed39c71b
commit 2e67821445
@@ -324,8 +324,7 @@ export class SearchRoutes {
}
// Import context generator (runs in worker, has access to database)
// Note: After bundling, context-generator.cjs is in the same directory as worker-service.cjs
const { generateContext } = await import('./context-generator.cjs');
const { generateContext } = await import('../../../context-generator.js');
// Use project name as CWD (generateContext uses path.basename to get project)
const cwd = `/context/${projectName}`;