import { Fragment } from "react"; import { Badge } from "@/components/ui/badge"; import { Separator } from "@/components/ui/separator"; import { CHANGELOG } from "@/lib/changelog"; // Changelog entries are plain strings with occasional **bold** and `code` // spans — never full markdown (lists, links, headings) — so a tiny inline // parser is enough and keeps this off the react-markdown dependency used for // full AI chat output elsewhere. function InlineMarkdown({ text }: { text: string }) { const parts = text.split(/(\*\*[^*]+\*\*|`[^`]+`)/g).filter(Boolean); return ( <> {parts.map((part, i) => { if (part.startsWith("**") && part.endsWith("**")) { return {part.slice(2, -2)}; } if (part.startsWith("`") && part.endsWith("`")) { return {part.slice(1, -1)}; } return {part}; })} ); } export function ChangelogList() { return (
{CHANGELOG.map((entry, i) => (
v{entry.version} {entry.date}
{entry.notes &&

{entry.notes}

} {entry.added && entry.added.length > 0 && (

Added

    {entry.added.map((line, j) =>
  • )}
)} {entry.fixed && entry.fixed.length > 0 && (

Fixed

    {entry.fixed.map((line, j) =>
  • )}
)} {entry.security && entry.security.length > 0 && (

Security

    {entry.security.map((line, j) =>
  • )}
)} {i < CHANGELOG.length - 1 && }
))}
); }