1export default async function(interval: Interval) {
2 fsdfs;
3}
1export default async function(interval: Interval) {
2 fs;
3}
1export default async function(interval: Interval) {
2 fsfsfssfs;
3}
1export default async function(interval: Interval) {
2 fsfsfssfs;
3}
1export default async function(req: Request): Promise<Response> {
2 return Response.json({ ok: true });
3}
1export default async function(interval: Interval) {
2}
20const dbID = process.env.NOTION_DATABASE_ID!;
21
22export default async function main() {
23 const [header, ...rows]: string[][] = parse(csv);
24 const items = rows.map(row =>
114}
115
116async function existsByGUID(guid: string) {
117 const res = await notion.databases.query(
118 {
4import { DateTime } from "https://esm.sh/luxon@3.4.4";
5
6export async function testDailyBrief() {
7 try {
8 const testChatId = Deno.env.get("TEST_TELEGRAM_CHAT_ID");
2// Run this script manually to create the database table
3
4export default async function setupTelegramChatDb() {
5 try {
6 // Import SQLite module
13} from "../memoryUtils.ts";
14
15async function generateBriefingContent(anthropic, memories, today, isSunday) {
16 try {
17 const weekdaysHelp = generateWeekDays(today);
96}
97
98export async function sendDailyBriefing(chatId?: string, today?: DateTime) {
99 // Get API keys from environment
100 const apiKey = Deno.env.get("ANTHROPIC_API_KEY");
135 const lastSunday = today.startOf("week").minus({ days: 1 });
136
137 // Fetch relevant memories using the utility function
138 const memories = await getRelevantMemories();
139
216}
217
218function generateWeekDays(today) {
219 let output = [];
220
239// console.log(weekDays);
240
241// Export a function that calls sendDailyBriefing with no parameters
242// This maintains backward compatibility with existing cron jobs
243export default async function (overrideToday?: DateTime) {
244 return await sendDailyBriefing(undefined, overrideToday);
245}