handle background tsak (#70)

Co-authored-by: Kartik Sarangmath <kartiksarangmath@Kartiks-MacBook-Air.local>
This commit is contained in:
ksarangmath
2025-08-11 16:07:17 -07:00
committed by GitHub
parent 6c5e86ccc5
commit e294a0f29c
2 changed files with 7 additions and 3 deletions

View File

@@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"
[project]
name = "omnara"
version = "1.4.6"
version = "1.4.7"
description = "Omnara Agent Dashboard - MCP Server and Python SDK"
readme = "README.md"
requires-python = ">=3.10"

View File

@@ -770,7 +770,7 @@ class ClaudeWrapperV3:
"""Check if Claude is idle (hasn't shown 'esc to interrupt' for 0.5+ seconds)"""
if self.last_esc_interrupt_seen:
time_since_esc = time.time() - self.last_esc_interrupt_seen
return time_since_esc >= 0.5
return time_since_esc >= 0.75
return True
def cancel_pending_input_request(self):
@@ -1161,7 +1161,11 @@ class ClaudeWrapperV3:
import re
clean_text = re.sub(r"\x1b\[[0-9;]*m", "", text)
if "esc to interrupt)" in clean_text:
# Check for both "esc to interrupt" and "ctrl+b to run in background"
if (
"esc to interrupt)" in clean_text
or "ctrl+b to run in background" in clean_text
):
self.last_esc_interrupt_seen = time.time()
except Exception: