Skip to content

feat(app): add configurable protocol prompt via file#16

Merged
pasrom merged 1 commit intomainfrom
feat/configurable-prompt
Mar 14, 2026
Merged

feat(app): add configurable protocol prompt via file#16
pasrom merged 1 commit intomainfrom
feat/configurable-prompt

Conversation

@pasrom
Copy link
Copy Markdown
Owner

@pasrom pasrom commented Mar 14, 2026

Summary

  • Users can now customize the protocol generation prompt via a file at ~/Library/Application Support/MeetingTranscriber/protocol_prompt.md
  • Built-in default prompt is used as fallback when no custom file exists or file is empty
  • Settings UI provides Edit Prompt (opens in editor), Import Prompt (file picker), and Reset to Default buttons

Changes

  • AppPaths: customPromptFile path constant
  • ProtocolGenerator: loadPrompt() reads custom file with fallback to built-in default; used by both Claude CLI and OpenAI-compatible generators
  • SettingsView: Three action buttons + status indicator (custom/default)
  • Tests: 4 new tests for loadPrompt() with withCustomPromptFile helper

Test plan

  • swift test — 468 tests pass
  • Open Settings → verify Edit/Import/Reset buttons visible
  • Edit Prompt → file opens in editor, status shows "Custom prompt active"
  • Reset to Default → confirmation dialog, status reverts to "Using default prompt"
  • Import Prompt → file picker, selected file becomes custom prompt
  • Delete file manually → verify fallback to default

Users can customize the protocol generation prompt by editing a file
in Application Support, with the built-in default as fallback.

What: File-based prompt override at ~/Library/Application Support/
MeetingTranscriber/protocol_prompt.md with Edit/Import/Reset buttons
in Settings.

Reasoning:
- Problem: Prompt was hardcoded — users couldn't change output language,
  structure, or detail level without modifying source code
- Decision: File-based override with automatic fallback to built-in
  default if the file is missing or empty

Changes:
- AppPaths: add customPromptFile path constant
- ProtocolGenerator: add loadPrompt() with file fallback; used by both
  Claude CLI and OpenAI-compatible generators
- SettingsView: Edit Prompt (opens in editor), Import Prompt (file
  picker), Reset to Default (with confirmation) buttons
- Tests: 4 new tests for loadPrompt() with withCustomPromptFile helper
@github-actions github-actions bot added the enhancement New feature or request label Mar 14, 2026
@pasrom pasrom merged commit 967ffab into main Mar 14, 2026
8 checks passed
@pasrom pasrom deleted the feat/configurable-prompt branch March 14, 2026 20:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant