fixed timer
This commit is contained in:
@@ -12,6 +12,7 @@ from app.config import get_settings
|
||||
from app.db.base import SessionLocal
|
||||
from app.character.service import CharacterService
|
||||
from app.chat.history import sanitize_openai_messages, strip_historical_reasoning
|
||||
from app.chat.notice_inbox import DISPLAY_ONLY_ROLES
|
||||
from app.chat.notices import (
|
||||
POMODORO_TOOL_NAMES,
|
||||
format_pomodoro_context,
|
||||
@@ -112,7 +113,7 @@ class ChatService:
|
||||
|
||||
def _build_messages(self, session: ChatSession) -> list[dict[str, Any]]:
|
||||
system_prompt = self._build_system_prompt(session.id)
|
||||
all_chat = [m for m in session.messages if m.role != "notice"]
|
||||
all_chat = [m for m in session.messages if m.role not in DISPLAY_ONLY_ROLES]
|
||||
last_user = next((m.content for m in reversed(all_chat) if m.role == "user"), "")
|
||||
if last_user:
|
||||
memory_snapshot = get_memory_snapshot(self.db, session.id)
|
||||
|
||||
Reference in New Issue
Block a user