feat: add endpoint to fetch indexed session metadata and implement corresponding service method

This commit is contained in:
Haileyesus
2026-04-08 16:51:23 +03:00
parent db39eda18a
commit 150642097a
3 changed files with 65 additions and 0 deletions

View File

@@ -492,6 +492,18 @@ router.get(
}),
);
/**
* Returns one DB-indexed session metadata row.
*/
router.get(
'/sessions/:sessionId',
asyncHandler(async (req: Request, res: Response) => {
const sessionId = readPathParam(req.params.sessionId, 'sessionId');
const session = llmSessionsService.getIndexedSession(sessionId);
res.json(createApiSuccessResponse({ session }));
}),
);
/**
* Triggers provider disk scans and refreshes the shared sessions table.
*/