It didn't occur to me for some reason that reviewing messages would also add those messages to history lol. Hopefully fixed now.

This commit is contained in:
Storm Dragon
2025-09-23 17:37:51 -04:00
parent aed7ba523d
commit c257128948
3 changed files with 64 additions and 22 deletions

View File

@@ -406,3 +406,33 @@ class SpeechHistoryService:
int: Number of messages in history
"""
return len(self.history)
def is_at_first(self):
"""Check if currently at the first (oldest) message in history.
Returns:
bool: True if at the first message
"""
if not self.history:
return False
return self.current_index == 0
def is_at_last(self):
"""Check if currently at the last (newest) message in history.
Returns:
bool: True if at the last message or viewing most recent
"""
if not self.history:
return False
return self.current_index == -1 or self.current_index == len(self.history) - 1
def get_most_recent(self):
"""Get the most recent message (what F2 should always say).
Returns:
str or None: Most recent message text, or None if no history
"""
if not self.history:
return None
return self.history[-1]['text']