Composio powers 1000+ toolkits, tool search, context management, authentication, and a sandboxed workbench to help you build AI agents that turn intent into action.
Mirrored from https://github.com/Camo67/composio.git
Synced Nov 21, 06:00 UTC
| 1 | import { changelogEntries, formatDate, getOgImageUrl } from '@/lib/source'; |
| 2 | import type { Metadata } from 'next'; |
| 3 | |
| 4 | const description = 'Latest updates and announcements for Composio'; |
| 5 | |
| 6 | export const metadata: Metadata = { |
| 7 | title: 'Changelog | Composio', |
| 8 | description, |
| 9 | alternates: { canonical: '/reference/changelog' }, |
| 10 | openGraph: { |
| 11 | title: 'Changelog | Composio', |
| 12 | description, |
| 13 | images: [getOgImageUrl('reference', ['changelog'], 'Changelog', description)], |
| 14 | }, |
| 15 | twitter: { |
| 16 | card: 'summary_large_image', |
| 17 | title: 'Changelog | Composio', |
| 18 | description, |
| 19 | images: [getOgImageUrl('reference', ['changelog'], 'Changelog', description)], |
| 20 | }, |
| 21 | }; |
| 22 | import { getMDXComponents } from '@/mdx-components'; |
| 23 | import { |
| 24 | DocsBody, |
| 25 | DocsPage, |
| 26 | DocsTitle, |
| 27 | } from 'fumadocs-ui/layouts/docs/page'; |
| 28 | import { CopyLink } from '@/components/copy-link'; |
| 29 | import { PageActions } from '@/components/page-actions'; |
| 30 | import { EditOnGitHub } from '@/components/edit-on-github'; |
| 31 | |
| 32 | const mdxComponents = getMDXComponents(); |
| 33 | |
| 34 | function dateToChangelogAnchor(date: string) { |
| 35 | return `#${date}`; |
| 36 | } |
| 37 | |
| 38 | export default function ChangelogPage() { |
| 39 | const entries = [...changelogEntries].sort( |
| 40 | (a, b) => new Date(b.date).getTime() - new Date(a.date).getTime() |
| 41 | ); |
| 42 | const entriesByDate = new Map<string, typeof entries>(); |
| 43 | for (const entry of entries) { |
| 44 | const group = entriesByDate.get(entry.date) ?? []; |
| 45 | group.push(entry); |
| 46 | entriesByDate.set(entry.date, group); |
| 47 | } |
| 48 | const groupedEntries = [...entriesByDate.entries()]; |
| 49 | const toc = [ |
| 50 | { title: 'Changelog', url: '#changelog', depth: 2 }, |
| 51 | { title: 'Latest', url: '#latest', depth: 3 }, |
| 52 | ...groupedEntries.slice(0, 20).map(([date]) => ({ |
| 53 | title: formatDate(date), |
| 54 | url: dateToChangelogAnchor(date), |
| 55 | depth: 3, |
| 56 | })), |
| 57 | ]; |
| 58 | |
| 59 | return ( |
| 60 | <DocsPage toc={toc} footer={{ enabled: false }}> |
| 61 | <DocsTitle id="changelog">Changelog</DocsTitle> |
| 62 | <PageActions path="/reference/changelog" /> |
| 63 | <DocsBody> |
| 64 | <p className="text-fd-muted-foreground"> |
| 65 | Latest updates and announcements for Composio. Follow{' '} |
| 66 | <a |
| 67 | href="https://x.com/composiodevs" |
| 68 | target="_blank" |
| 69 | rel="noreferrer" |
| 70 | className="font-medium text-foreground underline underline-offset-4 hover:text-primary" |
| 71 | > |
| 72 | @composiodevs on X |
| 73 | </a>{' '} |
| 74 | for product news and announcements. |
| 75 | </p> |
| 76 | <h2 id="latest">Latest</h2> |
| 77 | <div className="relative"> |
| 78 | <div className="absolute left-0 top-2 bottom-0 w-px bg-border hidden md:block md:left-[7.5rem]" /> |
| 79 | |
| 80 | <div className="space-y-12"> |
| 81 | {groupedEntries.map(([date, dateEntries]) => ( |
| 82 | <article key={date} className="relative"> |
| 83 | <div className="mb-3 md:absolute md:left-0 md:w-28 md:text-right md:pr-6"> |
| 84 | <h3 id={date} className="m-0 scroll-mt-24 text-sm font-medium"> |
| 85 | <CopyLink |
| 86 | href={dateToChangelogAnchor(date)} |
| 87 | className="text-blue-500 hover:text-blue-600 transition-colors" |
| 88 | > |
| 89 | {formatDate(date)} |
| 90 | </CopyLink> |
| 91 | </h3> |
| 92 | </div> |
| 93 | |
| 94 | <div className="hidden md:block absolute left-[7.5rem] top-1.5 -translate-x-1/2"> |
| 95 | <div className="w-2.5 h-2.5 rounded-full bg-primary ring-4 ring-background" /> |
| 96 | </div> |
| 97 | |
| 98 | <div className="space-y-10 md:pl-36"> |
| 99 | {dateEntries.map((entry) => { |
| 100 | const Content = entry.body; |
| 101 | |
| 102 | return ( |
| 103 | <section key={`${entry.date}-${entry.title}`}> |
| 104 | <h2 className="text-2xl font-semibold mb-4">{entry.title}</h2> |
| 105 | <div className="prose prose-neutral dark:prose-invert max-w-none"> |
| 106 | <Content components={mdxComponents} /> |
| 107 | </div> |
| 108 | </section> |
| 109 | ); |
| 110 | })} |
| 111 | </div> |
| 112 | </article> |
| 113 | ))} |
| 114 | </div> |
| 115 | </div> |
| 116 | <EditOnGitHub path="docs/app/(home)/reference/(v31)/changelog/page.tsx" /> |
| 117 | </DocsBody> |
| 118 | </DocsPage> |
| 119 | ); |
| 120 | } |