Skip to content

Commit 165fe3e

Browse files
committed
Design home view with OpenCode data
1 parent 1ca6030 commit 165fe3e

File tree

6 files changed

+375
-23
lines changed

6 files changed

+375
-23
lines changed

.gitignore

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,3 @@ public/assets/material-icons/
3131

3232
# Nix
3333
result
34-
35-
# Project memory (agent context)
36-
.memory/

.memory/SUMMARY.md

Lines changed: 52 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,52 @@
1+
# OpenCode Monitor — Project Memory
2+
3+
## Project Identity
4+
5+
**OpenCode Monitor** is a macOS desktop app for monitoring and interacting with OpenCode agents across multiple workspaces. It's a fork of [CodexMonitor](https://github.com/Dimillian/CodexMonitor), adapted to use OpenCode's protocol instead of Codex.
6+
7+
## Tech Stack
8+
9+
- **Frontend**: React 19 + Vite + TypeScript
10+
- **Backend**: Tauri 2 (Rust)
11+
- **Protocol**: Migrating from ACP (JSON-RPC over stdio) to REST API (`opencode serve`)
12+
13+
## Architecture Invariants
14+
15+
1. Frontend receives events in **same shape as original CodexMonitor** — all protocol translation happens in Rust
16+
2. Put shared/domain logic in `src-tauri/src/shared/*` first
17+
3. Keep app and daemon as thin adapters around shared cores
18+
4. Protocol translation is isolated to 3 Rust files for clean upstream merges
19+
20+
## Key Files
21+
22+
| Area | Primary Files |
23+
|------|--------------|
24+
| Protocol translation | `event_translator.rs`, `codex_core.rs`, `app_server.rs` |
25+
| Frontend composition | `src/App.tsx`, `src/services/tauri.ts`, `src/services/events.ts` |
26+
| Thread state | `useThreadsReducer.ts`, `threadReducer/*` |
27+
| Shared cores | `src-tauri/src/shared/*` |
28+
29+
## Current Focus
30+
31+
- REST API migration (from `opencode acp` to `opencode serve`)
32+
- Thread lifecycle and event handling polish
33+
- Token usage tracking and session management
34+
35+
## Active Patterns
36+
37+
- Event-driven architecture with single-listener fanout
38+
- Reducer composition for thread state
39+
- Workspace-scoped sessions
40+
- Import aliases: `@/*`, `@app/*`, `@threads/*`, `@services/*`, `@utils/*`
41+
42+
## Recent Work (from git log)
43+
44+
- Phantom session prevention and recency ordering
45+
- Token usage context window population
46+
- Question tool UI with submit/dismiss actions
47+
- Agent/model selection from REST API
48+
- Incremental SSE streaming
49+
50+
---
51+
52+
*Last updated: Session initialization*

src-tauri/Cargo.lock

Lines changed: 68 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src-tauri/Cargo.toml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,7 @@ chrono = { version = "0.4", features = ["clock"] }
4545
shell-words = "1.1"
4646
similar = "2.6"
4747
toml = "0.8"
48+
rusqlite = { version = "0.32", features = ["bundled"] }
4849

4950
[target."cfg(not(any(target_os = \"android\", target_os = \"ios\")))".dependencies]
5051
tauri-plugin-updater = "2"

0 commit comments

Comments
 (0)