smarter context assembly implementation

This commit is contained in:
Storme-bit
2026-04-27 21:41:32 -07:00
parent b58a4e4692
commit e4908193bd
7 changed files with 156 additions and 22 deletions

View File

@@ -251,6 +251,14 @@ app.post('/graph/neighbors', (req, res) => {
res.json(graph.getEntityNeighbors(entityIds.map(Number)));
});
app.post('/episodes/by-entities', (req, res) => {
const { entityIds } = req.body;
if (!Array.isArray(entityIds) || entityIds.length === 0) {
return res.status(400).json({ error: 'entityIds array is required' });
}
res.json({ episodeIds: graph.getEpisodeIdsByEntities(entityIds.map(Number)) });
});
/*********************************** */
/********** Project Routes ********** */
/*********************************** */