feat: add coffee chat template and ensure new defaults are loaded (#10)
This commit is contained in:
@@ -184,15 +184,16 @@ class LocalStorageManager {
|
|||||||
print("❌ Failed to read templates directory: \(error)")
|
print("❌ Failed to read templates directory: \(error)")
|
||||||
}
|
}
|
||||||
|
|
||||||
// If no templates exist (user may have deleted the Templates folder),
|
// Always ensure all default templates are available
|
||||||
// automatically regenerate the built-in default templates. We keep
|
let defaultTemplates = NoteTemplate.defaultTemplates()
|
||||||
// writing the flag so previous versions that still rely on it remain
|
let existingTitles = Set(templates.map { $0.title })
|
||||||
// functional, but we no longer gate the regeneration behind it.
|
|
||||||
if templates.isEmpty {
|
// Add any missing default templates
|
||||||
let defaultTemplates = NoteTemplate.defaultTemplates()
|
for defaultTemplate in defaultTemplates {
|
||||||
for template in defaultTemplates {
|
if !existingTitles.contains(defaultTemplate.title) {
|
||||||
_ = saveTemplate(template)
|
_ = saveTemplate(defaultTemplate)
|
||||||
templates.append(template)
|
templates.append(defaultTemplate)
|
||||||
|
print("✅ Added missing default template: \(defaultTemplate.title)")
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -136,6 +136,22 @@ struct NoteTemplate: Codable, Identifiable, Hashable {
|
|||||||
TemplateSection(title: "Action Items and Accountability for the Week Ahead", description: "Record the action items assigned for the upcoming week, including who is responsible for each task and any deadlines or accountability measures that were agreed upon.")
|
TemplateSection(title: "Action Items and Accountability for the Week Ahead", description: "Record the action items assigned for the upcoming week, including who is responsible for each task and any deadlines or accountability measures that were agreed upon.")
|
||||||
],
|
],
|
||||||
isDefault: true
|
isDefault: true
|
||||||
|
),
|
||||||
|
|
||||||
|
// Coffee Chat / Intro
|
||||||
|
NoteTemplate(
|
||||||
|
id: UUID(),
|
||||||
|
title: "Coffee Chat / Intro",
|
||||||
|
context: "I had a casual meeting or introductory conversation with someone new. This could be a coffee chat, networking meeting, or informal introduction. The goal is to capture key information about the person and our conversation for future reference and potential collaboration.",
|
||||||
|
sections: [
|
||||||
|
TemplateSection(title: "About them", description: "Basic background information about the person - their role, company, experience, and anything notable about their professional journey."),
|
||||||
|
TemplateSection(title: "Common ground", description: "Shared interests, connections, experiences, or topics we discussed that created a connection. This helps remember what we bonded over."),
|
||||||
|
TemplateSection(title: "Their current focus", description: "What they're currently working on, excited about, or focused on in their professional or personal life."),
|
||||||
|
TemplateSection(title: "Interesting insights", description: "Any interesting perspectives, stories, or insights they shared during our conversation that stood out."),
|
||||||
|
TemplateSection(title: "Potential opportunities", description: "Ways we might be able to help each other, collaborate, or connect in the future. Include any specific ideas or possibilities that came up."),
|
||||||
|
TemplateSection(title: "Follow-up", description: "Any agreed-upon next steps, promises to connect them with others, resources to share, or ways to stay in touch.")
|
||||||
|
],
|
||||||
|
isDefault: true
|
||||||
)
|
)
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
|
|||||||
+1
-1
@@ -35,7 +35,7 @@ git commit -m "$COMMIT_MSG"
|
|||||||
git push -u origin "$BRANCH_NAME"
|
git push -u origin "$BRANCH_NAME"
|
||||||
|
|
||||||
# Step 4: Create PR
|
# Step 4: Create PR
|
||||||
gh pr create --title "$COMMIT_MSG" --body "$COMMIT_MSG" --base main --head "$BRANCH_NAME"
|
gh pr create --title "$COMMIT_MSG" --base main --head "$BRANCH_NAME"
|
||||||
|
|
||||||
# Step 5: Merge PR
|
# Step 5: Merge PR
|
||||||
gh pr merge "$BRANCH_NAME" --squash --delete-branch
|
gh pr merge "$BRANCH_NAME" --squash --delete-branch
|
||||||
|
|||||||
Reference in New Issue
Block a user