diff --git a/README.md b/README.md index 1febe33..b9739dd 100644 --- a/README.md +++ b/README.md @@ -6,14 +6,15 @@ Every past session, subagent, and workflow — searchable in natural language. - - - [![stars](https://img.shields.io/github/stars/tommy0103/obelisk?style=flat-square)](https://github.com/tommy0103/obelisk/stargazers) [![version](https://img.shields.io/github/v/tag/tommy0103/obelisk?label=version&style=flat-square)](https://github.com/tommy0103/obelisk/releases) [![license](https://img.shields.io/badge/license-MIT-blue.svg?style=flat-square)](LICENSE) + + + +
diff --git a/scripts/runtime.mjs b/scripts/runtime.mjs index 92fba22..a826b1b 100644 --- a/scripts/runtime.mjs +++ b/scripts/runtime.mjs @@ -135,7 +135,15 @@ function indexJsonl(db, fi) { idx: db.prepare('INSERT OR REPLACE INTO index_state (jsonl_path,mtime,lines_processed) VALUES (?,?,?)'), }; - const sm = { started_at: null, ended_at: null, git_branch: null, version: null, title: null, n: 0 }; + const existing = !fi.isSubagent ? db.prepare('SELECT * FROM sessions WHERE id = ?').get(fi.sessionId) : null; + const sm = { + started_at: existing?.started_at || null, + ended_at: existing?.ended_at || null, + git_branch: existing?.git_branch || null, + version: existing?.version || null, + title: existing?.title || null, + n: existing?.message_count || 0, + }; for (let i = skip; i < lines.length; i++) { let obj;