Dodaios is an open-source agent OS for your desktop: it runs your coding agents, browser and apps by voice or chat, on your own machine. Formerly Personal Jarvis.
Python agent-orchestrationai-agentai-coding-assistantclaude-codecoding-agentcomputer-usedesktop-applocal-firstmcppersonal-jarvisvoice-assistantvoice-coding
fix(agentic-ide): tell "cannot be read" apart from "not written yet"
rubenluetke10-beep3292ca1b7935
diff --git a/jarvis/ui/web/agentic_ide_routes.py b/jarvis/ui/web/agentic_ide_routes.pyindex 7673c9c890..f5dc5d46e8 100644--- a/jarvis/ui/web/agentic_ide_routes.py+++ b/jarvis/ui/web/agentic_ide_routes.py@@ -2309,18 +2309,33 @@ async def terminal_conversation(name: str) -> dict:resume itself has none of those problems — roles are declared and tool callscarry their arguments (see :mod:`jarvis.agentic_ide.agent_transcript`).- ``available: false`` is a normal answer, not an error: a CLI that keeps no- readable record, or a pane whose conversation has not been written yet.- The surface shows the live pane in that case, which is never wrong and never- empty.+ Two different "no", deliberately kept apart:++ * ``readable: false`` — this CLI keeps no record anyone can read. A settled+ fact about the product, so the surface can switch to the live pane and+ stay there.+ * ``readable: true, available: false`` — it does, but not yet: the file+ appears when the conversation starts, and one CLI only reveals its session+ id after the fact. Transient, so the surface WAITS rather than giving up.++ Collapsing the two is a real bug: a pane whose id has not been discovered+ yet would be treated as a CLI that can never be read, and a conversation+ that was seconds away would never be shown."""found = get_registry().find_terminal(name)if found is None:raise HTTPException(status_code=404, detail=f"No terminal called {name}")_session, term = found+ readable = agent_transcript.can_read(term.agent)handle = term.resume- if handle is None or not agent_transcript.can_read(term.agent):- return {"terminal": term.name, "agent": term.agent, "available": False, "turns": []}+ if handle is None or not readable:+ return {+ "terminal": term.name,+ "agent": term.agent,+ "readable": readable,+ "available": False,+ "turns": [],+ }# Off the event loop: this opens a file that can be megabytes, and the loop# it would otherwise block is the one carrying every pane's output.turns = await asyncio.to_thread(@@ -2333,10 +2348,19 @@ async def terminal_conversation(name: str) -> dict:home=account_home(term.agent, term.account),)if turns is None:- return {"terminal": term.name, "agent": term.agent, "available": False, "turns": []}+ # The reader exists and the pane has an id; the file simply is not there+ # yet. Still transient — `readable` stays true and the surface waits.+ return {+ "terminal": term.name,+ "agent": term.agent,+ "readable": True,+ "available": False,+ "turns": [],+ }return {"terminal": term.name,"agent": term.agent,+ "readable": True,"available": True,"turns": [t.to_dict() for t in turns],}diff --git a/jarvis/ui/web/frontend/src/components/chat/ChatStream.tsx b/jarvis/ui/web/frontend/src/components/chat/ChatStream.tsxindex 3e385f21b4..6b957ae935 100644--- a/jarvis/ui/web/frontend/src/components/chat/ChatStream.tsx+++ b/jarvis/ui/web/frontend/src/components/chat/ChatStream.tsx@@ -80,11 +80,15 @@ export function ChatStream({ terminal, active = true, onUnavailable }: ChatStreatry {const body = await fetchConversation(terminal);if (!alive) return;- if (!body.available) {+ // Settled "this CLI keeps no readable record" — hand over to the pane.+ // NOT the same as "no conversation yet": one CLI only reveals its+ // session id after its first turn, and giving up on that would mean a+ // conversation seconds away was never shown.+ if (!body.readable) {notifyUnavailable();return;}- setTurns(body.turns);+ setTurns(body.available ? body.turns : []);setError(null);} catch {if (!alive) return;diff --git a/jarvis/ui/web/frontend/src/lib/agentConversationApi.ts b/jarvis/ui/web/frontend/src/lib/agentConversationApi.tsindex eb732b2cc2..e4f2fac661 100644--- a/jarvis/ui/web/frontend/src/lib/agentConversationApi.ts+++ b/jarvis/ui/web/frontend/src/lib/agentConversationApi.ts@@ -7,10 +7,12 @@* resume itself. Roles are declared there, tool calls carry their arguments,* and prose is prose, so nothing downstream has to guess what a line was.*- * `available: false` is a normal answer and the caller must handle it: a CLI- * that keeps no readable record, or a pane whose conversation has not been- * written yet. Watching the live pane is the honest fallback — never an error- * message, because nothing is wrong.+ * Two different "no", and the caller must tell them apart. `readable: false`+ * is settled — this CLI keeps no record anyone can read, so switch to the live+ * pane and stay there. `available: false` with `readable: true` is transient —+ * the file appears when the conversation starts, and one CLI only reveals its+ * session id afterwards — so WAIT. Treating the second as the first is how a+ * conversation that was seconds away never gets shown.*//** One thing the agent did between two things it said. */@@ -32,6 +34,9 @@ export interface AgentTurn {export interface AgentConversation {terminal: string;agent: string;+ /** Does this CLI keep a record that can be read at all? Settled, not timing. */+ readable: boolean;+ /** Is there a conversation to show right now? False may simply mean "not yet". */available: boolean;turns: AgentTurn[];}