db/report/server/UI updates
This commit is contained in:
@@ -332,6 +332,18 @@ def run(name, window_words=3000):
|
||||
db.replace_topics(name, topics)
|
||||
|
||||
|
||||
def retitle(name):
|
||||
"""Regenerate the meeting title from the saved topics (LLM overview pass); drops the manual title. Render is done by the caller."""
|
||||
p = db.out_dir(name) / "report.json"
|
||||
rep = json.loads(p.read_text(encoding="utf-8"))
|
||||
ov = chat(SYS_B, json.dumps([{"title": t["title"], "summary": [x["text"] for x in t["summary"]], "shown": t["shown"], "decisions": t["decisions"], "actions": t["actions"]} for t in rep["topics"]], ensure_ascii=False), 800, think=True) or {}
|
||||
t = str(ov.get("title") or "").strip()
|
||||
if not t: raise RuntimeError("title: nessun titolo generato")
|
||||
db.set_meta(name, title="")
|
||||
rep["meeting_title"] = t
|
||||
p.write_text(json.dumps(rep, ensure_ascii=False, indent=1), encoding="utf-8")
|
||||
|
||||
|
||||
def _head(i, t): return f"{i}. {t['title']} ({mmss(t['start_s'])}–{mmss(t['end_s'])})"
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user