Give every window a verb, and answer what the terminal asks

The socket carried a bare word and said nothing back, so a script could press
the buttons but never learn what was said. A request is JSON now, it can ask to
be answered when the run ends rather than when it starts, and the reply carries
the transcript, the agent's answer, or why nothing happened. The verbs that do
not need the microphone run in the caller's own process, which is what makes
transcribing a file or reading a setting work over ssh.
This commit is contained in:
yusufipk
2026-08-01 18:58:57 +07:00
parent da3dc3c908
commit bb3b0bcb94
7 changed files with 1364 additions and 71 deletions
+10
View File
@@ -154,6 +154,16 @@ def clear_session():
pass
def stored_provider():
"""Whose conversation is on disk, whatever the setting says now."""
try:
with open(SESSION_FILE, encoding="utf-8") as fh:
row = json.load(fh)
except (OSError, json.JSONDecodeError, ValueError):
return ""
return str(row.get("provider", "")) if isinstance(row, dict) else ""
def session_age():
"""Seconds since the stored conversation was last used, or None."""
try: