@zhijiewang/openharness 0.7.8 → 0.8.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/README.md +67 -24
  2. package/package.json +1 -1
package/README.md CHANGED
@@ -51,7 +51,7 @@ Most AI coding agents are locked to one provider or cost $20+/month. OpenHarness
51
51
  | Free local models | Ollama native | No | Yes | Yes |
52
52
  | Tools | 18 with permission gates | 40+ | File-focused | 20+ |
53
53
  | Git integration | Auto-commit + /undo | Yes | Deep git | Basic |
54
- | Slash commands | 16 built-in | 80+ | Some | Some |
54
+ | Slash commands | 19 built-in | 80+ | Some | Some |
55
55
  | Headless/CI mode | `oh run --json` | Yes | Yes | Yes |
56
56
  | Terminal UI | Custom cell-level renderer + React/Ink | React + Ink | Basic | BubbleTea |
57
57
  | Language | TypeScript | TypeScript | Python | Go |
@@ -70,38 +70,55 @@ OpenHarness features a custom cell-level diffing renderer built for performance
70
70
  | `↑` / `↓` | Navigate input history |
71
71
  | `Ctrl+C` | Cancel current request / exit |
72
72
  | `Ctrl+A` / `Ctrl+E` | Jump to start / end of input |
73
+ | `Ctrl+F` | Search through conversation (Enter to cycle matches, Esc to close) |
74
+ | `Ctrl+O` | Toggle thinking block expansion |
75
+ | `Ctrl+K` | Toggle code block expansion in messages |
73
76
  | `Page Up` / `Page Down` | Scroll message history (10 rows) |
74
77
  | `Shift+↑` / `Shift+↓` | Scroll message history (3 rows) |
75
- | `Tab` | Cycle through tool call outputs (expand/collapse) |
76
- | `Ctrl+K` | Toggle code block expansion in messages |
78
+ | `Mouse scroll` | Scroll message history (3 rows per tick) |
79
+ | `Tab` | Autocomplete slash commands / cycle tool call outputs |
77
80
  | `/vim` | Toggle Vim mode (normal/insert) |
78
81
 
79
82
  ### Features
80
83
 
81
84
  - **Markdown rendering** — headings, code blocks, bold, italic, lists, tables, blockquotes, links
82
- - **Syntax highlighting** — keywords, strings, comments, numbers, types (JS/TS/Python/Rust/Go)
85
+ - **Syntax highlighting** — keywords, strings, comments, numbers, types (JS/TS/Python/Rust/Go and 20+ languages)
83
86
  - **Collapsible code blocks** — blocks over 8 lines auto-collapse; `Ctrl+K` to expand all
87
+ - **Collapsible thinking** — thinking blocks collapse to a one-line summary after completion; `Ctrl+O` to expand
84
88
  - **Shimmer spinner** — animated "Thinking" indicator with color transitions (magenta → yellow at 30s → red at 60s)
85
- - **Tool call display** — args preview, live streaming output, expand/collapse with `Tab`
86
- - **Permission prompts** — bordered box with risk coloring, `[D]iff` toggle for write/edit tools
87
- - **Inline diff view** — green/red diff in permission prompts for file changes
88
- - **Status line** — persistent model name, token count, and cost
89
+ - **Tool call display** — args preview, live streaming output, result summaries (line counts, elapsed time), expand/collapse with `Tab`
90
+ - **Permission prompts** — bordered box with risk coloring, bold colored **Y**es/**N**o/**D**iff keys, syntax-highlighted inline diffs
91
+ - **Search mode** — `Ctrl+F` to search conversation with live match count and navigation
92
+ - **Status line** — model name, token count, cost, context usage bar (customizable via config)
89
93
  - **Context warning** — yellow alert when context window exceeds 75%
90
- - **Scrollback** — Page Up/Down or Shift+arrows to scroll through history
94
+ - **Scroll indicator** — footer shows `↑ N more above` / `↓ N more below` when content overflows
95
+ - **Scrollback** — Page Up/Down, Shift+arrows, or mouse scroll wheel to navigate history
96
+ - **Mouse support** — scroll wheel for messages, auto-enabled via SGR mouse tracking
97
+ - **Autocomplete** — slash commands with descriptions shown in popup; Tab to cycle
91
98
  - **Session browser** — `/browse` to interactively browse and resume past sessions
92
- - **Companion mascot** — animated Cybergotchi in the footer
99
+ - **Alternate screen buffer** — preserves terminal scrollback; clean restore on exit
100
+ - **Companion mascot** — animated Cybergotchi in the footer (toggle with `/companion off|on`)
93
101
 
94
102
  ### Themes
95
103
 
96
104
  ```bash
97
105
  oh --light # light theme for bright terminals
106
+ /theme light # switch mid-session (saved automatically)
107
+ /theme dark # switch back
98
108
  ```
99
109
 
100
- Set permanently in `.oh/config.yaml`:
110
+ Theme preference is saved to `.oh/config.yaml` and persists across sessions.
111
+
112
+ ### Custom Status Line
113
+
114
+ Customize the status bar format in `.oh/config.yaml`:
115
+
101
116
  ```yaml
102
- theme: 'light'
117
+ statusLineFormat: '{model} │ {tokens} │ {cost} │ {ctx}'
103
118
  ```
104
119
 
120
+ Available variables: `{model}`, `{tokens}` (input↑ output↓), `{cost}` ($X.XXXX), `{ctx}` (context usage bar). Empty sections are automatically collapsed.
121
+
105
122
  ## Tools (18)
106
123
 
107
124
  | Tool | Risk | Description |
@@ -128,30 +145,56 @@ theme: 'light'
128
145
 
129
146
  Low-risk read-only tools auto-approve. Medium and high risk tools require confirmation in `ask` mode. Use `--trust` to skip all prompts.
130
147
 
131
- ## Slash Commands (18)
148
+ ## Slash Commands (19)
132
149
 
133
- Type these during a chat session:
150
+ Type these during a chat session. Aliases: `/q` exit, `/h` help, `/c` commit, `/m` model, `/s` status.
134
151
 
152
+ **Session:**
135
153
  | Command | Description |
136
154
  |---------|-------------|
137
- | `/help` | Show all available commands |
138
155
  | `/clear` | Clear conversation history |
139
- | `/cost` | Show session cost and token usage |
140
- | `/status` | Show model, mode, git branch, MCP servers |
156
+ | `/compact` | Compress conversation to free context |
157
+ | `/export` | Export conversation to markdown |
158
+ | `/history [n]` | List recent sessions; `/history search <term>` to search |
159
+ | `/browse` | Interactive session browser with preview |
160
+ | `/resume <id>` | Resume a saved session |
161
+ | `/fork` | Fork current session |
162
+
163
+ **Git:**
164
+ | Command | Description |
165
+ |---------|-------------|
141
166
  | `/diff` | Show uncommitted git changes |
142
167
  | `/undo` | Undo last AI commit |
143
168
  | `/commit [msg]` | Create a git commit |
144
169
  | `/log` | Show recent git commits |
145
- | `/history [n]` | List recent sessions; `/history search <term>` to search |
146
- | `/browse` | Interactive session browser with preview |
170
+
171
+ **Info:**
172
+ | Command | Description |
173
+ |---------|-------------|
174
+ | `/help` | Show all available commands (categorized) |
175
+ | `/cost` | Show session cost and token usage |
176
+ | `/status` | Show model, mode, git branch, MCP servers |
177
+ | `/config` | Show configuration |
147
178
  | `/files` | List files in context |
148
179
  | `/model <name>` | Switch model mid-session |
149
- | `/compact` | Compress conversation to free context (smart: truncates old tool results, drops oldest messages, removes orphaned tool results, targets 60% of model context window) |
150
- | `/export` | Export conversation to markdown |
151
- | `/plan` | Enter plan mode |
180
+ | `/memory` | View and search memories |
181
+
182
+ **Settings:**
183
+ | Command | Description |
184
+ |---------|-------------|
185
+ | `/theme dark\|light` | Switch theme (saved to config) |
186
+ | `/vim` | Toggle Vim mode |
187
+ | `/companion off\|on` | Toggle companion visibility |
188
+
189
+ **AI:**
190
+ | Command | Description |
191
+ |---------|-------------|
192
+ | `/plan <task>` | Enter plan mode |
152
193
  | `/review` | Review recent code changes |
153
- | `/config` | Show configuration |
154
- | `/memory` | View memories |
194
+
195
+ **Pet:**
196
+ | Command | Description |
197
+ |---------|-------------|
155
198
  | `/cybergotchi` | Feed, pet, rest, status, rename, or reset your companion |
156
199
 
157
200
  ## Permission Modes
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@zhijiewang/openharness",
3
- "version": "0.7.8",
3
+ "version": "0.8.0",
4
4
  "description": "Open-source terminal coding agent. Works with any LLM.",
5
5
  "type": "module",
6
6
  "bin": {