vOOice/VoiceInk/Models/PromptTemplates.swift

258 lines
9.7 KiB
Swift
Raw Blame History

This file contains invisible Unicode characters

This file contains invisible Unicode characters that are indistinguishable to humans but may be processed differently by a computer. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

import Foundation
struct TemplatePrompt: Identifiable {
let id: UUID
let title: String
let promptText: String
let icon: PromptIcon
let description: String
func toCustomPrompt() -> CustomPrompt {
CustomPrompt(
id: UUID(), // Generate new UUID for custom prompt
title: title,
promptText: promptText,
icon: icon,
description: description,
isPredefined: false
)
}
}
enum PromptTemplates {
static var all: [TemplatePrompt] {
createTemplatePrompts()
}
static func createTemplatePrompts() -> [TemplatePrompt] {
[
TemplatePrompt(
id: UUID(),
title: "Email",
promptText: """
Primary Rules:
1. Preserve the speaker's original tone and personality
2. Maintain professional tone while keeping personal speaking style
3. Structure content into clear paragraphs
4. Fix grammar and punctuation while preserving key points
5. Remove filler words and redundancies
6. Keep important details and context
7. Format lists and bullet points properly
8. Preserve any specific requests or action items
9. Always include a professional sign-off
10. Use appropriate greeting based on context
Examples:
Input: "hey just wanted to follow up on yesterday's meeting about the timeline we need to finish by next month can you send the docs when ready thanks"
Output: "Hi,
I wanted to follow up on yesterday's meeting about the timeline. We need to finish by next month.
Could you send the docs when ready?
Thanks,
[Your Name]"
Input: "quick update on the project we're at 60% complete but facing some testing issues that might delay things we're working on solutions"
Output: "We're at 60% complete but facing some testing issues that might delay things. We're working on solutions.
Can you please push the recent changes that we have made to GitHub?
I'll keep you updated.
Regards,
[Your Name]"
Input: "hi sarah checking in about the design feedback from last week can we proceed to the next phase"
Output: "Hi Sarah,
I'm checking in about the design feedback from last week. Can we proceed to the next phase?
Thanks,
[Your Name]"
""",
icon: .emailFill,
description: "Template for converting casual messages into professional email format"
),
TemplatePrompt(
id: UUID(),
title: "Meeting Notes",
promptText: """
Primary Rules:
1. Preserve speaker's original tone and communication style
2. Organize content into clear sections
3. Structure key points and action items
4. Maintain chronological flow
5. Preserve important details and decisions
6. Format lists and bullet points clearly
7. Remove unnecessary repetition
8. Keep names and specific references
9. Highlight action items and deadlines
Examples:
Input: "meeting with design team today we talked about UI changes Sarah will update colors by next week John will work on accessibility and we'll launch next month"
Output: "Design Team Meeting:
Discussion:
UI changes
Color updates
Accessibility improvements
Action Items:
Sarah: Update colors by next week
John: Work on accessibility
Decision:
Launch next month"
Input: "backend sync meeting we need to optimize database queries Mark will do this week Lisa will help with caching done by Friday then testing"
Output: "Backend Sync Meeting:
Focus: Database optimization
Tasks:
Mark: Optimize database queries this week
Lisa: Help with caching
Timeline:
Complete by Friday
Begin testing after"
""",
icon: .meetingFill,
description: "Template for structuring meeting notes and action items"
),
TemplatePrompt(
id: UUID(),
title: "Tweet",
promptText: """
Primary Rules:
1. Keep it casual and conversational
2. Use natural, informal language
3. Include relevant emojis while maintaining authenticity
4. For replies, acknowledge the person (@username)
5. Break longer thoughts into multiple lines
6. Keep the original personality and style
7. Use hashtags when relevant
8. Maintain the context of the conversation
Examples:
Input: "tried ios 17 today and the standby mode is amazing turns your phone into a smart display while charging"
Output: "Tried iOS 17 today and the standby mode is amazing! 🤯
Turns your phone into a smart display while charging #iOS17"
Input: "just switched from membrane to mechanical keyboard with brown switches and my typing feels so much better"
Output: "Just switched from membrane to mechanical keyboard with brown switches and my typing feels so much better! 🎹
That tactile feedback is perfect 🤌 #MechKeys"
Input: "found a nice coffee shop downtown with great lavender latte and cozy spots with plants perfect for working"
Output: "Found a nice coffee shop downtown!
Great lavender latte and cozy spots with plants - perfect for working 🪴 #CoffeeVibes"
Input: "for cold brew coffee medium roast guatemalan beans steeped for 18 hours makes the smoothest flavor"
Output: "For cold brew coffee: medium roast Guatemalan beans steeped for 18 hours makes the smoothest flavor!
Absolute liquid gold #ColdBrew"
""",
icon: .chatFill,
description: "Template for crafting engaging tweets and replies with personality"
),
TemplatePrompt(
id: UUID(),
title: "Daily Journal",
promptText: """
Primary Rules:
1. Preserve personal voice and emotional expression
2. Keep personal tone and natural language
3. Structure into morning, afternoon, evening sections
4. Preserve emotions and reflections
5. Highlight important moments
6. Maintain chronological flow
7. Keep authentic reactions and feelings
Output Format:
### Morning
Morning section
### Afternoon
Afternoon section
### Evening
Evening section
Summary:: Key events, mood, highlights, learnings(Add it here)
""",
icon: .bookFill,
description: "Template for converting voice notes into structured daily journal entries"
),
TemplatePrompt(
id: UUID(),
title: "Task List",
promptText: """
Primary Rules:
1. Preserve speaker's task organization style
2. Convert into markdown checklist format
3. Start each task with "- [ ]"
4. Group related tasks together as subtasks
5. Add priorities if mentioned
6. Keep deadlines if specified
7. Maintain original task descriptions
Output Format:
- [ ] Main task 1
- [ ] Subtask 1.1
- [ ] Subtask 1.2
- [ ] Task 2 (Deadline: date)
- [ ] Task 3
- [ ] Subtask 3.1
- [ ] Follow-up item 1
- [ ] Follow-up item 2
""",
icon: .pencilFill,
description: "Template for converting voice notes into markdown task lists"
),
TemplatePrompt(
id: UUID(),
title: "Quick Notes",
promptText: """
Primary Rules:
1. Preserve speaker's thought process and emphasis
2. Keep it brief and clear
3. Use bullet points for key information
4. Preserve important details
5. Remove filler words while keeping style
6. Maintain core message and intent
7. Keep original terminology and phrasing
Output Format:
## Main Topic
• Main point 1
- Supporting detail
- Additional info
• Main point 2
- Related informations
""",
icon: .micFill,
description: "Template for converting voice notes into quick, organized notes"
)
]
}
}