Configurable recap templates (categories per meeting type, in Settings)
Takeaways categories are no longer hardcoded — they're editable templates. A
template = the always-on TLDR + an ordered list of sections, each with a title, a
type (attributed items / bulleted list / paragraph), and an instruction (the prompt
text for that category). The analyzer assembles the LLM prompt FROM the template
and parses generically, so adding/removing/renaming a category needs zero code and
the output always renders.
- RecapTemplate / TemplateSection / SectionKind + TopicGranularity; built-in
defaults (Internal Meeting, 1:1, Company/Sales Call), all editable.
- Generic extras: RecapExtras{tldr, primarySpeakers, sections:[RenderedSection]} +
RecapItem{text,who,when,note} replaces the fixed MeetingExtras. Analyzer builds
per-section sec_N fields + parses by kind; renderer + remap are generic.
- Topic granularity (coarse/auto/fine) answers 'should chunking be configurable' —
it scales the target topic count; raw window sizes stay as tuned defaults.
- AppSettings persists templates + defaultTemplateId (seeded once). Settings gets a
default-template picker + 'Manage…' → TemplatesView (CRUD, edit sections/
instructions, set default, **Preview prompt** for full transparency).
- Recap editor gains a template picker; Regenerate uses the chosen template. Auto
recap uses the default template.
54/54 XCTest (template prompt build, generic parse/remap/render updated).
This commit is contained in:
@@ -30,3 +30,29 @@ final class EditorWindow {
|
||||
w.makeKeyAndOrderFront(nil)
|
||||
}
|
||||
}
|
||||
|
||||
/// Hosts the recap-templates manager in its own resizable window.
|
||||
@MainActor
|
||||
final class TemplatesWindow {
|
||||
static let shared = TemplatesWindow()
|
||||
private var window: NSWindow?
|
||||
|
||||
func show(settings: AppSettings) {
|
||||
if let window {
|
||||
NSApp.activate(ignoringOtherApps: true)
|
||||
window.makeKeyAndOrderFront(nil)
|
||||
return
|
||||
}
|
||||
let w = NSWindow(
|
||||
contentRect: NSRect(x: 0, y: 0, width: 760, height: 560),
|
||||
styleMask: [.titled, .closable, .resizable, .miniaturizable],
|
||||
backing: .buffered, defer: false)
|
||||
w.title = "Recap Templates"
|
||||
w.isReleasedWhenClosed = false
|
||||
w.center()
|
||||
w.contentViewController = NSHostingController(rootView: TemplatesView(settings: settings))
|
||||
window = w
|
||||
NSApp.activate(ignoringOtherApps: true)
|
||||
w.makeKeyAndOrderFront(nil)
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user