Keep journal openings from treating finished days as open plans.
A 400-character entry prefix plus plan regex could reopen a completed yesterday as if it were still pending. Openings now take plans only from yesterday's user dialogue, never from saved entries, and skip space recency in the first call. Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
1 parent
e42f751fdc
commit
ec0f8bad55
8 files changed
+108
-19
No files matched your search
@@ -190,8 +190,9 @@ def _space_recent_sources(profile_id: str, spec: dict[str, Any]) -> list[dict]:
|
||||
with get_db() as conn:
|
||||
conversations = conn.execute(
|
||||
f"""
|
||||
SELECT c.id, c.updated, c.journal_day_id
|
||||
SELECT c.id, c.updated, c.journal_day_id, d.calendar_date
|
||||
FROM conversations c
|
||||
LEFT JOIN journal_days d ON d.id = c.journal_day_id AND d.profile_id = c.profile_id
|
||||
WHERE c.profile_id = ? AND c.space_id = ? {extra}
|
||||
ORDER BY c.updated DESC, c.created DESC
|
||||
LIMIT ?
|
||||
@@ -217,6 +218,7 @@ def _space_recent_sources(profile_id: str, spec: dict[str, Any]) -> list[dict]:
|
||||
{
|
||||
"conversation_id": conv["id"],
|
||||
"journal_day_id": conv["journal_day_id"],
|
||||
"calendar_date": conv["calendar_date"],
|
||||
"excerpt": excerpt,
|
||||
}
|
||||
)
|
||||
|
||||
Reference in new issue
Block a user