@@ -11,36 +11,38 @@ import {
1111 saveRevisions ,
1212} from './revisions.ts'
1313
14- const TEASER_PROMPT = `\
15- You are generating a preview teaser for a blog post. The teaser appears as \
16- the Open Graph description in link previews on social media, messaging apps, \
14+ const TEASER_PROMPT = `
15+ You are generating a preview teaser for a blog post. The teaser appears as
16+ the Open Graph description in link previews on social media, messaging apps,
1717and search results.
1818
19- Your task: extract the opening lines of this article and lightly edit them \
20- to read naturally as a standalone preview. This is NOT a summary — it should \
21- read like the first few lines of the article, adapted to make sense without \
19+ Your task: extract the opening lines of this article and lightly edit them
20+ to read naturally as a standalone preview. This is NOT a summary — it should
21+ read like the first few lines of the article, adapted to make sense without
2222the surrounding context.
2323
2424Guidelines:
2525- Plain text only. No markdown, HTML, or formatting.
26- - Always use curly quotes (\u201C\u201D \u2018\u2019), em-dashes (\u2014), and \
27- ellipses (\u2026). Never straight quotes or hyphens as dashes.
26+ - Always use curly quotes (“” ‘’), em-dashes (—), and
27+ ellipses (…). Never straight quotes or hyphens as dashes. Em-dashes must
28+ have spaces on both sides (\` — \`).
2829- Target ~200 characters. Never exceed 250.
29- - Skip blockquotes. Bridge the text before and after naturally, including \
30- only essential context from the quote if needed for surrounding text to \
30+ - Skip blockquotes. Bridge the text before and after naturally, including
31+ only essential context from the quote if needed for surrounding text to
3132make sense.
32- - Preserve voice transitions naturally (e.g., third-person attribution \
33+ - Preserve voice transitions naturally (e.g., third-person attribution
3334transitioning to first-person commentary is fine for link posts).
34- - Fix awkward transitions. For example, if the text reads \u201Cenergy use:\u201D \
35- followed by a blockquote, change the colon to a period since the blockquote \
36- won\u2019t be present.
37- - If the teaser ends mid-thought, end with an ellipsis (\u2026 )
38- - If the opening naturally fits within the limit, don\u2019t add an ellipsis.
35+ - Fix awkward transitions. For example, if the text reads “energy use:”
36+ followed by a blockquote, change the colon to a period since the blockquote
37+ won’t be present.
38+ - If the teaser ends mid-thought, end with an ellipsis (… )
39+ - If the opening naturally fits within the limit, don’t add an ellipsis.
3940- Output only the teaser text. No explanation, no quotes around it.
4041
4142Examples of correct output:
42- - Maybe you\u2019ve heard of the \u201Csocial contract.\u201D It\u2019s a concept in philosophy popularized during the Enlightenment\u2026
43- - I\u2019ve reimplemented everything to target WebAssembly using SIMD instructions\u2014a language I\u2019ve wanted to learn\u2026`
43+ - Maybe you’ve heard of the \u201Csocial contract.” It’s a concept in philosophy popularized during the Enlightenment…
44+ - I’ve reimplemented everything to target WebAssembly using SIMD instructions\u2014a language I’ve wanted to learn…
45+ ` . trim ( )
4446
4547export interface TeaserDecision {
4648 action : 'skip' | 'generate' | 'regenerate'
0 commit comments