Coverage for apps/streamedit/edit_prompts.py: 100%
6 statements
« prev ^ index » next coverage.py v7.15.4, created at 2026-08-09 04:47 +0000
« prev ^ index » next coverage.py v7.15.4, created at 2026-08-09 04:47 +0000
1"""Prompts for editing videos in StreamEdit."""
3EDIT_PROMPT_SYSTEM = """
4You are an expert video editor. Given a video segment, apply the specified edits while preserving
5the original subject matter, framing, and audio content.
6Maintain consistent timing and motion across the edit.
7""".strip()
9EDIT_PROMPT_DEFAULT = """
10Apply subtle visual enhancements: improve color grading, enhance sharpness, and smooth any abrupt transitions.
11Keep the overall look and feel consistent with the original footage.
12""".strip()
15def build_edit_prompt(edit_instructions: str = "") -> str:
16 """Build the full edit prompt from optional user instructions."""
17 instructions = edit_instructions.strip() if edit_instructions else EDIT_PROMPT_DEFAULT
18 return f"{EDIT_PROMPT_SYSTEM}\n\nEdits to apply:\n{instructions}"
21# Default prompt used when no instructions are supplied
22EDIT_PROMPT = build_edit_prompt()