smarter context assembly implementation
This commit is contained in:
@@ -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,
|
||||
}
|
||||
Reference in New Issue
Block a user