Skip to content

Linger is An Open-Source Personal Agent That Runs Fully on Your PC. We aim to break Big Tech’s grip on AI by bringing powerful local AI to everyday computers through efficient model–harness co-design, so everyone can run their own.

688 B
Raw Blame
import type { WeeklyCollection } from "./types.js";

export interface ReportSourceReference {
  resource: string;
  sourceRef: string;
  title: string;
}

export function weeklySourceCatalog(
  collection: WeeklyCollection,
): ReportSourceReference[] {
  return collection.existingMemoryFiles.map((file) => {
    const date = file.path.split("/").at(-1)!.replace(/\.md$/u, "");
    const daily = file.path.includes("/timeline/daily/");
    return {
      sourceRef: `${daily ? "daily" : "previous_week"}_${date}`,
      resource: `memory://${daily ? "timeline/daily" : "timeline/weekly"}/${date}.md`,
      title: `${daily ? "Daily" : "Previous Weekly baseline"} ${date}`,
    };
  });
}