OpenCode storage uses 'tool' type for tool calls, but the hasContent
check only recognized 'tool_use' (Anthropic API format). This caused
messages with tool calls to be incorrectly identified as empty.
Previously, findEmptyContentMessageFromStorage only detected messages
with parts.length > 0 that had no content. This missed the case where
a message has zero parts entirely, causing infinite recovery loops.
- Add diagnosticsStore to capture Push model notifications
- Handle textDocument/publishDiagnostics notifications in processBuffer
- Fix workspace/configuration response for JSON LSP validation
- Add missing language mappings (json, html, css, sh, fish, md, tf)
- diagnostics() now tries Pull first, falls back to Push store
- Replace API-based recovery with direct JSON file editing for empty content messages
- Add cross-platform storage path support via xdg-basedir (Linux/macOS/Windows)
- Inject '(interrupted)' text part to fix messages with only thinking/meta blocks
- Update README docs with detailed session recovery scenarios
- Check file size >10KB to filter out placeholder files
- Check cached binary first
- Then npm package paths with validation
- Homebrew paths as last resort
- Fixes SIGTRAP/ENOEXEC from invalid binaries
- Remove hardcoded homebrew paths
- Remove npm package path resolution (prone to placeholder issues)
- Only check cached binary (~/.cache/oh-my-opencode/bin/sg)
- If not found, cli.ts will auto-download from GitHub releases
The download logic in cli.ts handles all cases properly.
- Add isValidBinary() check: file must be >10KB (placeholder files are ~100 bytes)
- Check homebrew paths first on macOS (most reliable)
- Check cached binary second
- npm package paths last (prone to placeholder issues)
Fixes ENOEXEC error when @ast-grep/cli has placeholder instead of real binary
- Show hints when Python class/function patterns return empty results
- Detect patterns ending with ':' that need body (class :, def ():)
- Removed validation that could cause false positives
- Hints only appear on empty results, not on successful matches
- Add automatic CLI binary path detection and resolution
- Implement lazy binary download with caching
- Add environment check utilities for CLI and NAPI availability
- Improve error handling and fallback mechanisms
- Export new utilities from index.ts
* fix(publish): make git operations idempotent
- Check for staged changes before commit
- Check if tag exists before creating
- Check if release exists before creating
* fix(session-recovery): handle empty content from interrupted reasoning
- Add THINKING_TYPES set including 'reasoning' type (OpenCode's thinking)
- Add hasNonEmptyOutput() to detect messages with only thinking/meta parts
- Add findEmptyContentMessage() to scan all messages for empty content
- Handle step-start/step-finish meta parts in empty content detection
- Patch interrupted messages with '(interrupted)' text before falling back to revert
* fix(publish): make git operations idempotent
- Check for staged changes before commit
- Check if tag exists before creating
- Check if release exists before creating
* fix(ast-grep): add validation for incomplete function declaration patterns
- Add validatePatternForCli function to detect incomplete patterns like
'export async function $METHOD' (missing params and body)
- Only validates JS/TS languages (javascript, typescript, tsx)
- Provides helpful error message with correct pattern examples
- Update tool description to clarify complete AST nodes required
This fixes the issue where incomplete patterns would fail silently
with no results instead of providing actionable feedback.
- Remove tree-sitter-wasms and web-tree-sitter dependencies
- Delete detector.ts (320 lines of WASM implementation)
- Add downloader.ts for lazy binary download from GitHub Releases
- Simplify index.ts to CLI-only mode
- Cache binary at ~/.cache/oh-my-opencode/bin/
- Fall back to 'Comment checking disabled' when binary unavailable
- Move TL;DR section before Installation for quick overview
- Wrap 'For LLM Agents' section in collapsible details tag
- Simplify Configuration section (remove verbose schema explanations)
- Move model override example to Features > Agents section
- Add context7 MCP to Korean README
- Add step-by-step guide for LLM agents to setup oh-my-opencode
- Include OpenCode installation check with link to official docs
- Include oh-my-opencode plugin configuration script
- Update Table of Contents for both EN/KO README files
- Add cli.ts for native binary resolution and spawning
- Update index.ts to use CLI when available, WASM as fallback
- Add Edit/MultiEdit support to types.ts for proper CLI input