/** * Emoji-injection pass for keyword captions. * * Submagic / CapCut have made the "💯 caption + 🔥 emoji" look the * default vibe of viral short-form. Rather than ship a static emoji * map, we ask the LLM (one call over ALL cues) for the single * most-fitting emoji per cue (or empty when nothing clearly fits). * * Pure-ish: takes the OpenAI-style chat client as a dependency so the * caller can swap in `fetch` directly OR mock it in tests. */ import type { AssCue } from "./ass.js"; export type EmojiDensity = "low" | "med" | "high"; export interface InjectEmojisOptions { density?: EmojiDensity; model?: string; apiKey?: string; signal?: AbortSignal; /** Override fetch — for tests. Defaults to global fetch. */ fetchImpl?: typeof fetch; } export interface InjectEmojisResult { cues: AssCue[]; /** Count of cues that received an emoji (excluding empty strings). */ injected: number; /** When set, the LLM call failed and cues were returned unchanged. */ error?: string; } /** * Inject emojis into a list of cues via one LLM call. On failure * (network down, malformed response, length mismatch) we return the * cues UNCHANGED + populate `error` so the caller can surface it. * * For density="high" the emoji is rendered on its own line ABOVE the * caption text (separated by ASS's `\\N` break) for the stacked CapCut * look. For low/med it's appended inline. */ export declare function injectEmojis(cues: AssCue[], opts?: InjectEmojisOptions): Promise; /** * Tolerant parser. Accepts either {emojis: [...]} or a bare array, pads * / truncates to `expected` length so length always lines up. Exported * for testing. */ export declare function parseEmojiResponse(content: string, expected: number): string[]; //# sourceMappingURL=emoji-captions.d.ts.map