Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
90 changes: 90 additions & 0 deletions .agent-context
Original file line number Diff line number Diff line change
@@ -0,0 +1,90 @@
# Agent Context - IPC All Actions

## Feature
IPC All Actions - Expose all terminal actions via IPC + JSON screen output

## Current State
Starting implementation. Need to expand IPC to expose all ~50 terminal actions.

## Key Files
- `frontends/rioterm/src/ipc.rs` - Core IPC server and commands (MAIN FILE)
- `frontends/rioterm/src/bindings/mod.rs` - Action enum (lines 368-597) - reference for all actions
- `frontends/rioterm/src/application.rs` - handle_ipc_command implementation
- `frontends/rioterm/src/cli.rs` - CLI argument parsing

## Implementation Tasks

### 1. Expand ListActions to return ALL actions
Currently returns hardcoded 5 actions. Need to return all ~50 from bindings/mod.rs:
- Simple actions: paste, quit, copy, searchforward, searchbackward, clearhistory, resetfontsize, etc.
- Parametrized actions: selecttab(N), gotobookmark(N), connectssh(N), insertsnippet(N), jumptodirectory(N), run(cmd), scroll(N)

### 2. Expand TriggerAction to handle ALL actions
Current handle_ipc_command in application.rs only handles 5 actions.
Parse action string using `Action::from(String)` in bindings/mod.rs (line 211-366).
Then execute via route.window.screen.execute_action() or similar.

### 3. Add JSON screen output format
Add new command: `DumpScreenJson` or flag on `DumpScreen`
Return structured cell data:
```rust
ScreenDumpJson {
lines: Vec<ScreenLine>,
cursor: CursorPosition,
dimensions: (usize, usize),
}

struct ScreenLine {
text: String,
cells: Vec<CellInfo>,
}

struct CellInfo {
char: char,
fg: String, // hex color
bg: String,
flags: Vec<String>, // bold, italic, underline, etc.
}
```

### 4. Add line selection for DumpScreen
Add parameters: `DumpScreen { start_line: Option<usize>, end_line: Option<usize> }`
CLI: `midterm --dump-screen --lines 0-10` or `--dump-screen --line 5`

### 5. Add ListTabs command
Return info about all tabs:
```rust
IpcCommand::ListTabs

IpcResponse::Tabs {
tabs: Vec<TabInfo>,
current: usize,
}

struct TabInfo {
index: usize,
title: String,
splits: usize,
working_directory: Option<String>,
}
```

## Testing
```bash
# After each change, test with:
midterm --list-actions # Should show all ~50 actions
midterm --action selecttab(1)
midterm --action splitright
midterm --dump-screen --json
midterm --list-tabs
```

## Blockers
None

## Next Actions
1. Update ListActions in application.rs to return all actions
2. Update TriggerAction to parse and execute all actions
3. Add JSON screen dump format
4. Add line selection for screen dump
5. Add ListTabs command
10 changes: 10 additions & 0 deletions .agent-progress
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
# Agent Progress - ipc-actions
# Format: KEY=VALUE, one per line. Agents append, last value wins.
# Created: 2025-12-30T05:48:22Z

feature=ipc-actions
name=IPC All Actions
status=pending
step=0
step_name=Not started
created=2025-12-30T05:48:22Z
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -26,3 +26,4 @@ misc/72/

# goreleaser
dist/
.worktrees/
5 changes: 5 additions & 0 deletions .harness/config.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
{
"base_branch": "main",
"max_parallel": 3,
"worktree_parent": ".worktrees"
}
128 changes: 128 additions & 0 deletions .harness/state.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,128 @@
{
"project": "midterm",
"version": "2.0.0",
"created": "2025-12-30T00:33:00Z",
"updated": "2025-12-30T04:30:00Z",
"features": [
{
"id": "command-palette",
"name": "Command Palette",
"description": "Add Cmd+Shift+P command palette with fuzzy search",
"status": "completed",
"priority": 1,
"branch": null,
"pr": null,
"depends_on": [],
"started": "2025-12-30T02:00:00Z",
"completed": "2025-12-30T03:00:00Z"
},
{
"id": "tab-reorder",
"name": "Tab Reordering",
"description": "Add Cmd+Shift+Left/Right to reorder tabs",
"status": "completed",
"priority": 2,
"branch": null,
"pr": null,
"depends_on": [],
"started": "2025-12-30T01:00:00Z",
"completed": "2025-12-30T01:30:00Z"
},
{
"id": "transparency",
"name": "Transparent Background",
"description": "Add liquid glass transparent background with blur",
"status": "completed",
"priority": 3,
"branch": null,
"pr": null,
"depends_on": [],
"started": "2025-12-30T01:30:00Z",
"completed": "2025-12-30T02:00:00Z"
},
{
"id": "url-detection",
"name": "URL Detection",
"description": "Click URLs to open in browser",
"status": "completed",
"priority": 4,
"branch": null,
"pr": null,
"depends_on": [],
"started": "2025-12-30T02:00:00Z",
"completed": "2025-12-30T02:30:00Z"
},
{
"id": "bookmarks",
"name": "Directory Bookmarks",
"description": "Quick directory bookmarks with Cmd+B/Cmd+Shift+B",
"status": "completed",
"priority": 5,
"branch": null,
"pr": null,
"depends_on": [],
"started": "2025-12-30T02:30:00Z",
"completed": "2025-12-30T03:00:00Z"
},
{
"id": "shell-integration",
"name": "Shell Integration",
"description": "OSC 133 shell integration for command tracking",
"status": "completed",
"priority": 6,
"branch": null,
"pr": null,
"depends_on": [],
"started": "2025-12-30T03:00:00Z",
"completed": "2025-12-30T03:30:00Z"
},
{
"id": "command-notifications",
"name": "Command Notifications",
"description": "Notify when long-running commands complete",
"status": "completed",
"priority": 7,
"branch": null,
"pr": null,
"depends_on": ["shell-integration"],
"started": "2025-12-30T03:30:00Z",
"completed": "2025-12-30T04:00:00Z"
},
{
"id": "session-management",
"name": "Session Save/Restore",
"description": "Save and restore terminal sessions with Cmd+Shift+S/O",
"status": "completed",
"priority": 8,
"branch": null,
"pr": null,
"depends_on": [],
"started": "2025-12-30T04:00:00Z",
"completed": "2025-12-30T04:15:00Z"
},
{
"id": "ssh-profiles",
"name": "SSH Profile Manager",
"description": "Manage SSH profiles with Cmd+G/Cmd+Shift+G",
"status": "completed",
"priority": 9,
"branch": null,
"pr": null,
"depends_on": [],
"started": "2025-12-30T04:15:00Z",
"completed": "2025-12-30T04:25:00Z"
},
{
"id": "snippets",
"name": "Snippets System",
"description": "Text snippets with Cmd+/ and Cmd+Shift+N",
"status": "completed",
"priority": 10,
"branch": null,
"pr": null,
"depends_on": [],
"started": "2025-12-30T04:25:00Z",
"completed": "2025-12-30T04:30:00Z"
}
]
}
1 change: 1 addition & 0 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

7 changes: 4 additions & 3 deletions frontends/rioterm/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "rioterm"
description = "Rio terminal is a hardware-accelerated GPU terminal emulator, focusing to run in desktops and browsers."
description = "midterm is a hardware-accelerated GPU terminal emulator, focusing to run in desktops and browsers."
version.workspace = true
authors.workspace = true
edition.workspace = true
Expand All @@ -13,7 +13,7 @@ documentation.workspace = true
readme.workspace = true

[[bin]]
name = "rio"
name = "midterm"
path = "src/main.rs"

[dependencies]
Expand All @@ -34,6 +34,7 @@ regex = { workspace = true }
raw-window-handle = { workspace = true }
clap = { version = "4.5.42", features = ["derive"] }
dirs = "6.0.0"
serde_json = "1.0"
notify = "8.2.0"
rustc-hash = { workspace = true }
image_rs = { workspace = true }
Expand Down Expand Up @@ -103,7 +104,7 @@ assets = [
["../../LICENSE", "usr/share/doc/rio/", "664"]
]
extended-description = """\
Rio terminal is a hardware-accelerated GPU terminal emulator, focusing to run in desktops and browsers.
midterm is a hardware-accelerated GPU terminal emulator, focusing to run in desktops and browsers.
The supported platforms currently consist of BSD, Linux, MacOS and Windows."""

[[bench]]
Expand Down
Loading
Loading