diff --git a/src/components/Changes.svelte b/src/components/Changes.svelte index c37c673e6..585f9faff 100644 --- a/src/components/Changes.svelte +++ b/src/components/Changes.svelte @@ -25,6 +25,7 @@ getDiffText, } from "@app/lib/invoke"; import { anchorOf, commentCountsByPath } from "@app/lib/pierreComments"; + import { isCommitListDescription } from "@app/lib/revisionDescription"; import { useShortcuts } from "@app/lib/shortcuts.svelte"; import { pluralize } from "@app/lib/utils"; @@ -329,16 +330,6 @@ } }); - function isCommitListDescription(description: string, commits: Commit[]) { - if (commits.length === 0) return false; - const chunks = description - .split("\n") - .map(l => l.trim()) - .filter(l => l.length > 0); - if (chunks.length !== commits.length) return false; - const summaries = new Set(commits.map(c => c.summary.trim())); - return chunks.every(line => summaries.has(line)); - } const revisionDescription = $derived( revision.description.slice(-1)[0]?.body?.trim() ?? "", ); diff --git a/src/components/PatchActivityItem.svelte b/src/components/PatchActivityItem.svelte index b21e6098d..df86d8780 100644 --- a/src/components/PatchActivityItem.svelte +++ b/src/components/PatchActivityItem.svelte @@ -4,22 +4,6 @@ import type { FlattenedPatchOperation } from "@app/lib/patchTimeline"; export type { FlattenedPatchOperation }; - - export function splitDescription(text: string): { - subject?: string; - body?: string; - } { - const trimmed = text.trim(); - if (!trimmed) return {}; - const idx = trimmed.indexOf("\n"); - if (idx === -1) return { subject: trimmed }; - const subject = trimmed.slice(0, idx).trim(); - const body = trimmed.slice(idx + 1).trim(); - return { - subject: subject || undefined, - body: body || undefined, - }; - }