From 84b53cfd0ce03c54efb5dcaea2fac1696b531a50 Mon Sep 17 00:00:00 2001 From: Dejvino Date: Sun, 28 Jun 2026 16:21:21 +0200 Subject: [PATCH] Clean log and prompt pollution --- tools/engine.py | 10 +--------- tools/run.py | 3 --- 2 files changed, 1 insertion(+), 12 deletions(-) diff --git a/tools/engine.py b/tools/engine.py index e732803..df475b4 100644 --- a/tools/engine.py +++ b/tools/engine.py @@ -913,15 +913,7 @@ class GameEngine: @staticmethod def _auto_prompt(book_log: str) -> str: - """Extract a player prompt from the narrative. Uses the last sentence.""" - lines = book_log.strip().splitlines() - sentences = [] - for line in reversed(lines): - line = line.strip() - if not line: - continue - # Take last substantive line as the prompt - return f"**What do you do?**\n\n{line}" + """Fallback player prompt.""" return "**What do you do?**" # ── Response Parsing ──────────────────────────────────────────────── diff --git a/tools/run.py b/tools/run.py index 491c0d1..024d70b 100755 --- a/tools/run.py +++ b/tools/run.py @@ -925,9 +925,6 @@ class ChaosTUI(App): # Log only after successful finalize — failed turns produce no side effects from datetime import datetime ts = datetime.now().strftime("%H:%M") - if player_action: - time_of_day = self._guess_time_of_day() - self.engine.append_log(f"- **{time_of_day}** — {player_action}") if result.log_entry: self.engine.append_log(f"- **{ts}** — {result.log_entry}") elif result.book_log: