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:
LarsandCursor committed 2026-09-07 08:25:00 +02:00
1 parent e42f751fdc
commit ec0f8bad55
8 files changed
+108 -19

No files matched your search

+2 -1
View File
@@ -70,6 +70,7 @@ def build_internal_context(
space_id: str | None = None,
journal_day_id: str | None = None,
purpose: str = "dialogue_turn",
include_space_recency: bool = True,
include_existing: bool = False,
conversation_ids: list[str] | None = None,
existing_text: str = "",
@@ -118,7 +119,7 @@ def build_internal_context(
day_messages = read("conversation_messages", profile_id=profile_id, context={"conversation_id": conversation_id})
items.append({"type": "day_messages", "messages": day_messages})
if purpose == "dialogue_turn" and space_id:
if purpose == "dialogue_turn" and space_id and include_space_recency:
prior = retrieve(
profile_id,
{