Skip to content

feat: add OpenCode as a supported app#3

Open
nxxxsooo wants to merge 3 commits intoDargonLee:mainfrom
nxxxsooo:feat/opencode-support
Open

feat: add OpenCode as a supported app#3
nxxxsooo wants to merge 3 commits intoDargonLee:mainfrom
nxxxsooo:feat/opencode-support

Conversation

@nxxxsooo
Copy link
Copy Markdown

Summary

  • Add OpenCode as a supported AI CLI app alongside Claude Code, Codex CLI, and Cursor
  • OpenCode skills are discovered at ~/.config/opencode/skills/

Changes

Rust backend (src-tauri/src/store.rs):

  • Add SUPPORTED_APP_IDS constant to replace 3 hardcoded ["claude", "codex", "cursor"] arrays
  • Add "opencode" => Some(&[".config/opencode"]) to app_cli_dir_aliases

Rust backend (src-tauri/src/registry.rs):

  • Add "opencode" => home.join(".config").join("opencode").join("skills") to get_app_skills_dir

React frontend (src/context/AppContext.tsx):

  • Add OpenCode entry to APP_LIST with official icon and #22c55e accent color

Asset:

  • Add official OpenCode favicon as src/assets/cli-icons/opencode.png

Testing

Built and tested on macOS 26.3.1 (aarch64). OpenCode appears in sidebar with correct icon, path label, and skill discovery works.

OpenCode in sidebar

Add OpenCode (opencode.ai) to the list of supported AI CLI apps.

Backend:
- Add 'opencode' to app_cli_dir_aliases with path .config/opencode
- Add 'opencode' to get_app_skills_dir in registry
- Extract SUPPORTED_APP_IDS constant to replace hardcoded app arrays

Frontend:
- Add OpenCode entry to APP_LIST with official icon and green accent
- Skills discovered at ~/.config/opencode/skills/
parse_skill_metadata used byte slicing (&desc[..197]) to truncate
long descriptions. This panics when byte 197 falls inside a
multi-byte UTF-8 character (e.g. CJK text).

Switch to chars().take(197) for safe, character-based truncation.

Fixes DargonLee#1
~/.config/opencode/skills/ is a symlink to ~/.agents/skills/.
The canonical location is ~/.agents/skills/, so use that as the
preferred path with ~/.config/opencode/ as fallback.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant