fix: hide internal cron prompts from webui

This commit is contained in:
chengyongru
2026-06-12 18:17:28 +08:00
parent a50b3ac0f2
commit 32d8a1dd7b
6 changed files with 97 additions and 0 deletions
+3
View File
@@ -22,6 +22,7 @@ from nanobot.bus.runtime_events import (
TurnCompleted,
TurnRunStatusChanged,
)
from nanobot.cron.session_turns import CRON_HISTORY_META
from nanobot.providers.base import LLMProvider
from nanobot.session.goal_state import goal_state_ws_blob
from nanobot.session.manager import Session, SessionManager
@@ -68,6 +69,8 @@ def _title_inputs(session: Session) -> tuple[str, str]:
for message in session.messages:
if message.get("_command") is True:
continue
if message.get(CRON_HISTORY_META) is True:
continue
role = message.get("role")
content = message.get("content")
if not isinstance(content, str) or not content.strip():