Various minor fixes in preparation for new release.

This commit is contained in:
Storm Dragon
2025-10-17 21:26:13 -04:00
parent 5ef5faaebe
commit af4740d5ad
4 changed files with 33 additions and 24 deletions

View File

@@ -66,12 +66,18 @@ class command:
# Check if delta is too large (screen change) vs small incremental # Check if delta is too large (screen change) vs small incremental
# updates # updates
delta_length = len(self.env["screen"]["new_delta"]) delta_text = self.env["screen"]["new_delta"]
delta_length = len(delta_text)
if ( if (
delta_length > 200 delta_length > 200
): # Allow longer progress lines like Claude Code's status ): # Allow longer progress lines like Claude Code's status
return False return False
# If delta contains newlines and is substantial, let incoming handler
# deal with it to avoid interfering with multi-line text output
if '\n' in delta_text and delta_length > 50:
return False
# Check if current line looks like a prompt - progress unlikely during # Check if current line looks like a prompt - progress unlikely during
# prompts # prompts
if self.is_current_line_prompt(): if self.is_current_line_prompt():
@@ -270,7 +276,7 @@ class command:
self.env["commandBuffer"]["lastProgressTime"] = current_time self.env["commandBuffer"]["lastProgressTime"] = current_time
return return
# Pattern 5: Braille progress indicators # Pattern 5: Braille spinner indicators
braille_match = re.search(r'[⠋⠙⠹⠸⠼⠴⠦⠧⠇⠏⡿⣟⣯⣷⣾⣽⣻⢿]', text) braille_match = re.search(r'[⠋⠙⠹⠸⠼⠴⠦⠧⠇⠏⡿⣟⣯⣷⣾⣽⣻⢿]', text)
if braille_match: if braille_match:
if current_time - self.env["commandBuffer"]["lastProgressTime"] >= 1.0: if current_time - self.env["commandBuffer"]["lastProgressTime"] >= 1.0:
@@ -286,19 +292,12 @@ class command:
self.env["commandBuffer"]["lastProgressTime"] = current_time self.env["commandBuffer"]["lastProgressTime"] = current_time
return return
# Pattern 7: Moon phase progress indicators # Pattern 7: Moon phase spinner indicators
moon_match = re.search(r'[🌑🌒🌓🌔🌕🌖🌗🌘]', text) moon_match = re.search(r'[🌑🌒🌓🌔🌕🌖🌗🌘]', text)
if moon_match: if moon_match:
moon_phases = { if current_time - self.env["commandBuffer"]["lastProgressTime"] >= 1.0:
'🌑': 0, '🌒': 12.5, '🌓': 25, '🌔': 37.5, self.play_activity_beep()
'🌕': 50, '🌖': 62.5, '🌗': 75, '🌘': 87.5 self.env["commandBuffer"]["lastProgressTime"] = current_time
}
moon_char = moon_match.group(0)
if moon_char in moon_phases:
percentage = moon_phases[moon_char]
if percentage != self.env["commandBuffer"]["lastProgressValue"]:
self.play_progress_tone(percentage)
self.env["commandBuffer"]["lastProgressValue"] = percentage
return return
# Pattern 8: Thinking/processing with timing (🔄 Thinking... 23s) # Pattern 8: Thinking/processing with timing (🔄 Thinking... 23s)
@@ -320,6 +319,14 @@ class command:
self.env["commandBuffer"]["lastProgressTime"] = current_time self.env["commandBuffer"]["lastProgressTime"] = current_time
return return
# Pattern 9: Half-circle/circle progress indicators (◐ ◓ ◒ ◑)
circle_match = re.search(r'[◐◓◒◑]', text)
if circle_match:
if current_time - self.env["commandBuffer"]["lastProgressTime"] >= 1.0:
self.play_activity_beep()
self.env["commandBuffer"]["lastProgressTime"] = current_time
return
def play_progress_tone(self, percentage): def play_progress_tone(self, percentage):
# Map 0-100% to 400-1200Hz frequency range # Map 0-100% to 400-1200Hz frequency range
frequency = 400 + (percentage * 8) frequency = 400 + (percentage * 8)

View File

@@ -32,9 +32,10 @@ class command:
if (tab_state.get("lastProcessedDelta") == delta_text and if (tab_state.get("lastProcessedDelta") == delta_text and
tab_state.get("lastProcessedTime")): tab_state.get("lastProcessedTime")):
# Only suppress if processed within the last 100ms to avoid stale suppression # Only suppress if processed within the last 50ms to avoid stale suppression
# Reduced from 100ms to minimize false positives with rapid multi-line updates
time_since_processed = time.time() - tab_state["lastProcessedTime"] time_since_processed = time.time() - tab_state["lastProcessedTime"]
if time_since_processed <= 0.1: if time_since_processed <= 0.05:
return True return True
return False return False

View File

@@ -71,7 +71,7 @@ class OutputManager:
to_announce_capital = False to_announce_capital = False
self.last_echo = text self.last_echo = text
self.speak_text( self.speak_text(
text, interrupt, ignore_punctuation, to_announce_capital text, interrupt, ignore_punctuation, to_announce_capital, flush
) )
def get_last_echo(self): def get_last_echo(self):
@@ -104,6 +104,7 @@ class OutputManager:
interrupt=True, interrupt=True,
ignore_punctuation=False, ignore_punctuation=False,
announce_capital=False, announce_capital=False,
flush=True,
): ):
if not self.env["runtime"]["SettingsManager"].get_setting_as_bool( if not self.env["runtime"]["SettingsManager"].get_setting_as_bool(
"speech", "enabled" "speech", "enabled"
@@ -119,7 +120,7 @@ class OutputManager:
debug.DebugLevel.ERROR, debug.DebugLevel.ERROR,
) )
return return
if interrupt: if interrupt or flush:
self.interrupt_output() self.interrupt_output()
try: try:
self.env["runtime"]["SpeechDriver"].set_language( self.env["runtime"]["SpeechDriver"].set_language(

View File

@@ -4,5 +4,5 @@
# Fenrir TTY screen reader # Fenrir TTY screen reader
# By Chrys, Storm Dragon, and contributors. # By Chrys, Storm Dragon, and contributors.
version = "2025.09.26" version = "2025.10.17"
code_name = "master" code_name = "testing"