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
@@ -206,6 +206,16 @@ async function searchEpisodes(query, { limit = 10, sessionIds = null } = {}) {
return res.json();
}
async function getEpisodesByEntities(entityIds) {
const res = await fetch(`${BASE_URL}/episodes/by-entities`, {
method: 'POST',
headers: { 'Content-Type': 'application/json' },
body: JSON.stringify({ entityIds }),
});
if (!res.ok) throw new Error(`Episodes-by-entities error: ${res.status}`);
return res.json(); // { episodeIds: [...] }
}
module.exports = {
getSessionByExternalId,
createSession,
@@ -231,4 +241,5 @@ module.exports = {
generateProjectSummary,
getProjectOverviewSummary,
searchEpisodes,
getEpisodesByEntities,
}