Add in Pino logging and make UI consistent across the app.
This commit is contained in:
parent
727746030c
commit
300040bd58
19 changed files with 590 additions and 235 deletions
|
@ -113,16 +113,13 @@ export async function generateAndStoreMantisSummary()
|
|||
if (tickets.length === 0)
|
||||
{
|
||||
summaryText = 'No Mantis tickets updated recently.';
|
||||
console.log('No recent Mantis tickets found.');
|
||||
}
|
||||
else
|
||||
{
|
||||
console.log(`Found ${tickets.length} recent Mantis tickets. Generating summary...`);
|
||||
let prompt = promptTemplate.replaceAll('$DATE', new Date().toISOString().split('T')[0]);
|
||||
prompt = prompt.replaceAll('$MANTIS_TICKETS', JSON.stringify(tickets, null, 2));
|
||||
|
||||
summaryText = await askGemini(prompt);
|
||||
console.log('Mantis summary generated successfully by AI.');
|
||||
}
|
||||
|
||||
// Store the summary in the database using Prisma upsert
|
||||
|
@ -139,7 +136,6 @@ export async function generateAndStoreMantisSummary()
|
|||
summaryText: summaryText,
|
||||
},
|
||||
});
|
||||
console.log(`Mantis summary for ${today.toISOString().split('T')[0]} stored/updated in the database.`);
|
||||
|
||||
}
|
||||
catch (error)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue