-
-
Notifications
You must be signed in to change notification settings - Fork 84
Open
Labels
enhancementNew feature or requestNew feature or request
Description
Summary
The LLM-based text formatting pipeline currently uses a hardcoded system prompt and application-type-specific rules defined in formatter-prompt.ts. Users have no way to add their own instructions to influence how the LLM formats transcribed text.
Current Behavior
- The system prompt (
"You are a professional text formatter...") and application-type-specific rules (email, chat, notes, etc.) are hardcoded inapps/desktop/src/pipeline/providers/formatting/formatter-prompt.ts FormatterConfigonly exposesenabled,modelId, andfallbackModelId- The Settings UI only allows toggling formatting on/off and selecting a model
Proposed Change
Allow users to define a custom system prompt that is appended to the existing built-in system prompt when sent to the LLM. The built-in prompt and application-type rules remain unchanged and always apply — the custom prompt provides additional user-specific instructions on top of them.
Example use cases
- “Always use polite language when writing.”
- “Leave technical terms in English.”
- “Use bullet points frequently.”
- Domain-specific instructions (medical, legal, etc.)
Implementation scope
- Type/Schema: Add an optional
customSystemPromptfield toFormatterConfigintypes/formatter.ts - Database: Update
AppSettingsDataindb/schema.tsto persist the custom prompt - Prompt construction: Update
constructFormatterPrompt()informatter-prompt.tsto append the user-defined prompt after the built-in prompt when present - tRPC router: Update
setFormatterConfigmutation intrpc/routers/settings.tsto accept the new field - Settings UI: Add a textarea to
FormattingSettings.tsxfor editing the custom system prompt, with a clear/reset option
Behavior
- Custom prompt empty (default): Existing behavior — only the built-in system prompt is sent
- Custom prompt set: Built-in system prompt + custom prompt are concatenated and sent together to the LLM
- The built-in prompt is never replaced or overridden by the custom prompt
Happy to contribute a PR if this is something you'd accept.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
enhancementNew feature or requestNew feature or request