server.go: the stream read handler truncated each chunk to the client's
requested Count and advanced waitBase, silently dropping bytes beyond
the buffer (e.g. a chat block larger than 64KB). It now caches each
stream chunk per-fid (readCache + streamBase) and pages within it by
absolute offset, fetching the next chunk only once the current one is
fully drained, preserving 9P offset semantics.
o tui: read the state file for the initial status bar and apply the same
color styling and status text the event loop uses, so the bar is correct
immediately on attach; the event stream drives subsequent updates.
Two fixes for the rendered text views (chat stream, log snapshot):
1. Lost wakeup: blocking stream readers captured the signal channel
after their data check, so a write landing in that window signaled a
now-stale channel and the reader blocked until the next event (the
TUI's last message appeared only after the next prompt). Stream and
BlockOnce now capture the signal channel before reading; chat.go
swaps the channel under chatMu via signalChatLocked and RawLogStream
captures it while holding the lock.
2. No streaming in TUI: textLog only received finalized blocks, so the
chat text stream showed nothing until a block completed. SetPartial
now appends the assistant partial's new suffix to textLog
incrementally (tracking textPartialLen); AppendBlock appends only the
trailing separator on finalization to avoid duplicating the body.
Add Phase 41 (live chat.raw stream vs log.raw snapshot) and Phase 42
(tool call / output / bypass rendering in log and chat) to evolution.md,
with the phase chart. Clarify the log/chat row descriptions in
architecture-9p.md and the chat.go role in architecture-core.md.
The filtered text views (log, chat) hid call and tool blocks entirely
and had no visibility into bypass requests, which were only published as
events. RenderBlock now renders tool calls (name + args), tool output,
and bypass request/resolution notices; reasoning and context stay
hidden. SetBypassPending/ResolveBypass append bypass and bypass-resolved
blocks to the requesting agent so clients without an event stream (TUI,
o script) see pending approvals and outcomes.
Streaming partials were appended to log.raw per chunk, each carrying the
full cumulative content, so one response left dozens of partial lines
persisted. GUI clients parsing the snapshot re-rendered the growing block
once per partial (O(N^2)) and replayed all historical partials on every
reconnect, causing intermittent rendering loops.
Partials are no longer persisted: AppendBlock writes only finalized
blocks to log.raw; SetPartial broadcasts the in-flight block without
storing it. New chat.raw StreamRaw file is the authoritative live JSONL
source (finalized history replay, then live deltas); log.raw is a
finalized-only one-shot snapshot. GUI streams chat.raw, never polls
log.raw.
A Stream handler on log.raw blocks the GUI's synchronous startup read
forever, so the window never renders. Live updates come from the
separate chat and event streams.
- NextBlockID now uses sha256(sessionID:agentID:counter)[:8] for deterministic,
collision-resistant block IDs across sessions and agents
- Remove blockCounter reset on Clear() to maintain ID stability
- Add unit tests for NextBlockID and ChatSearchByID in chat_test.go
- Add unit tests for ParseBlockHeader, BlockDelim, FormatEvent in format_test.go
- Add e2e test script using o CLI to verify block ID search
- Document chat log files in AGENTS.md: chat/chat.raw are blocking streams,
use log for non-blocking reads, chat.search for block lookup
- Add onClear callback to Agent, wired via support.go
- Publish session.{sid}.agent.{aid}.clear event
- GUI listens for agentCleared signal and refreshes chat view
- Works for both GUI clear button and CLI /clear command
- Clear button sends /clear command
- /clear now resets history, chat log, and block counter
- Completely fresh start without creating a new session
- Button disabled while agent is running
- Add blockCounter to Agent, generating sequential hex IDs
- Include #blockId in all block headers: [[[role:name#id]]]
- GUI parses server-provided IDs from headers
- Falls back to client-generated IDs for legacy blocks without server IDs
- Block IDs are now deterministic based on chat history order
- Add blockId field to ChatBlock (12-char MD5 hash of counter+name)
- Bookmarks now use blockId instead of volatile list index
- Plumb URLs use blockId: ollie://session/agent#abc123def456
- Add indexForBlockId() to look up current index from stable ID
- Action buttons always visible (no hover flicker)
- All ToolButtons now use theme.fontSize-based sizing
- Height, width, margins, and spacing scale with font
- Removed all hardcoded pixel values from bookmark UI
- Add ollie:// URL scheme for plumb messages
Format: ollie://session/agent#block
- Plumber listens on 'ollie' port for navigation messages
- Bookmarks show 📋 button to copy ollie:// link
- Add data/plumbing with rules to route ollie:// URLs
- On plumb message: switch session/agent, scroll to block, raise window
- Add bookmark button (📌) on chat block hover
- Bookmarks section in left panel (SessionTree) with grouped view
- Non-persistent GUI-only state using ListModel
- Click bookmark to scroll to that block in chat
- Bookmark format: sessionName/agentName with block content preview
- Add activeSessionName/activeAgentName C++ getters for display
- Document colon separator for session:agent
- Document agent-level bypass/approve/deny filtering
- Document !a !d !b shortcuts in prompt REPL
- Update tmux session naming to include agent
- Add Procs and Peers buttons to KDE GUI features
!a or !approve - approve first pending bypass for this agent
!d or !deny - deny first pending bypass for this agent
!b or !bypass - list pending bypass requests for this agent
o session/agent bypass - shows only that agent's requests
o session/agent approve - approves first request from that agent
o session/agent deny - denies first request from that agent
o session bypass - shows all requests (unchanged)
Agent names may contain colons (e.g., src:ollie), so slash must
be the primary separator. Colon separator is only for the rare
case where session names contain slashes.
default/src:ollie now correctly parses as:
session = default
agent = src:ollie
- Sanitize tmux session name (replace / and : with -)
- Include agent name in tmux session for uniqueness
- Quote context arg in spawned o commands
- Use colon separator for robustness
- session:agent works as alternative to session/agent
- Colon takes precedence (allows slashes in session names)
- Quoted arguments with spaces now work: o "my session:agent" prompt
- Removed set -- $* which broke quoted arguments
- Updated help with examples
Canvas-based graph visualization of agents in current session:
- Nodes represent agents, colored by state
- Edges represent peer connections
- Drag nodes to reposition
- Click two nodes to toggle connection
- Double-click to start connecting
- Right-click for context menu
- Pan with middle mouse, zoom with scroll wheel
- Auto-layout arranges nodes in circle
9P API methods: listPeers, addPeer, removePeer, listAgentsInSession
Remove complex DiffWidget detection and context menu injection.
Add 'Review Staged Changes' and 'Review Unstaged Changes' to editor
context menu when in a git repo. Uses git diff directly.
-119 lines of code removed.