OpenCode integration with real-time streaming (#13)

* Fix missions staying Active after completion with OpenCode backend

- Add TerminalReason::Completed variant for successful task completion
- Set terminal_reason in OpenCodeAgent on success to trigger auto-complete
- Update control.rs to explicitly handle Completed terminal reason
- Update CLAUDE.md with OpenCode backend documentation

* Improve iOS dashboard UI polish

- Remove harsh input field border, use ultraThinMaterial background with subtle focus glow
- Clean up model selector pills: remove ugly truncated mission IDs, increase padding
- Remove agent working indicator border for cleaner look
- Increase input area bottom padding for better thumb reach

* Add real-time event streaming for OpenCode backend

- Add SSE streaming support to OpenCodeClient via /event endpoint
- Parse and forward OpenCode events (thinking, tool_call, tool_result)
- Update OpenCodeAgent to consume stream and forward to control channel
- Add fallback to blocking mode if SSE connection fails

This enables live UI updates in the dashboard when using OpenCode backend.

* Fix running mission tracking to use actual executing mission ID

Track the mission ID that the main `running` task is actually working on
separately from `current_mission`, which can change when the user creates
a new mission. This ensures ListRunning and GracefulShutdown correctly
identify which mission is being executed.
This commit is contained in:
Thomas Marchand
2026-01-02 08:20:02 +00:00
committed by GitHub
parent 6acab1da5c
commit 3164febd57

Diff Content Not Available