project summaries addition

This commit is contained in:
Storme-bit
2026-04-26 18:57:25 -07:00
parent 2429fedb2c
commit 4c6bd1df2d
5 changed files with 178 additions and 7 deletions
@@ -181,7 +181,20 @@ async function getSummariesByProject(projectId) {
if (!res.ok) throw new Error(`Failed to fetch summaries: ${res.status}`);
return res.json();
}
// add to module.exports too
async function generateProjectSummary(projectId) {
const res = await fetch(`${BASE_URL}/projects/${projectId}/summarize`, {
method: 'POST',
});
if (!res.ok) throw new Error(`Failed to generate project summary: ${res.status}`);
return res.json();
}
async function getProjectOverviewSummary(projectId) {
const res = await fetch(`${BASE_URL}/projects/${projectId}/overview`);
if (!res.ok) throw new Error(`Failed to fetch project overview: ${res.status}`);
return res.json(); // null if none exists yet
}
module.exports = {
getSessionByExternalId,
@@ -205,4 +218,6 @@ module.exports = {
createSummary,
updateSummary,
getSummariesByProject,
generateProjectSummary,
getProjectOverviewSummary,
}