Repository navigation
Add opencode extension - #27515
Add opencode extension#27515mormubis wants to merge 11 commits into
Conversation
- fix: store compliance — subtitles, terminal preference, install check, title, README - fix: address all code review findings — injection fixes, dead code removal, perf improvements - docs: replace screenshots with mock data versions - docs: add third screenshot - docs: add README and CHANGELOG for store submission - fix: default search mode to content - feat: multi-word scored search — exact phrase, individual words, title + content - feat: combine title + content search like recover-opencode-conversation skill - fix: pass SQL via stdin to avoid shell escaping issues in content search - chore: use OpenCode brand icon (512x512) - fix: reveal hotkey window after selecting tab - fix: select tab at window level with select tab N for proper focus - fix: use iTerm2 app name and tab index iteration for focus - fix: focus iTerm tab by matching TTY from process list - feat: focus existing iTerm tab when session is already open - feat: add folder dropdown filter for project sessions - fix: use subtitle for folder name so fuzzy filtering works - feat: add folder name as keyword for filtering project sessions by directory - fix: use dedicated project sessions query instead of global limit - feat: group project sessions by directory basename - fix: exclude sub-agent sessions (parent_id IS NOT NULL) from all queries - feat: replace Open/Idle tags with Active/Open liveness detection via DB - fix: add Open/status tags to project sessions view - fix: guard openIds type before calling includes - fix: use array instead of Set for open session IDs (serialization) - feat: show Open badge on sessions currently running in a terminal - fix: disable client-side filtering in content search mode - feat: add content search mode to Search Sessions — searches message text as fallback - fix: make View Sessions the default action on projects - fix: use SQLite for cross-project session counts and listing - fix: use random port to avoid conflicts with existing servers - fix: ensure PATH includes homebrew for Raycast environment - fix: use createOpencode() instead of server discovery — solves auth issue - fix: lint — add description, remove unused var, format with prettier - feat: add hooks, Search Projects command, Search Sessions command with activity view - feat: add core modules — SDK, server discovery, client pool, iTerm2 integration - chore: initial raycast extension scaffold
|
Congratulations on your new Raycast extension! 🚀 We're currently experiencing a high volume of incoming requests. As a result, the initial review may take up to 10-15 business days. Once the PR is approved and merged, the extension will be available on our Store. |
Greptile SummaryThis PR adds a new Raycast extension for managing OpenCode projects and sessions. It exposes three commands (Search Projects, Search Sessions, New Session), reads data from the OpenCode SQLite database via
Confidence Score: 5/5The extension is safe to merge; all findings are non-blocking quality suggestions. The core data paths (SQLite queries, terminal launching, SDK client lifecycle) are correct and well-structured. The two flagged issues — unhandled hook errors producing a misleading empty state, and basename-only directory grouping — are UX polish items that do not affect correctness or data integrity. extensions/opencode/src/search-sessions.tsx and extensions/opencode/src/search-projects.tsx could benefit from surfacing hook errors and using full directory paths as grouping keys. Important Files Changed
Prompt To Fix All With AIFix the following 2 code review issues. Work through them one at a time, proposing concise fixes.
---
### Issue 1 of 2
extensions/opencode/src/search-sessions.tsx:1120-1123
**Unhandled hook errors produce a misleading empty state**
`useAllSessions`, `useContentSearch`, and `useOpenSessions` all expose an `error` property that is never destructured. When `executeSQL` throws — e.g., the database doesn't exist yet because OpenCode has never been run, or Full Disk Access is denied — `data` stays `[]` and the component renders the "No Sessions Found / Start OpenCode in a terminal" message, which misdirects the user. Destructure `error` from each hook and surface it (e.g., via `showToast` or a dedicated empty view description) so users know why they're seeing no results.
### Issue 2 of 2
extensions/opencode/src/search-projects.tsx:818-831
**Basename-only grouping key can merge unrelated sessions**
`groupByDirectory` uses `dirBasename(s.directory)` — just the final path component — as both the Map key and the section title. Two sessions whose `directory` ends in the same component (e.g., `/workspace/frontend/components` and `/workspace/backend/components`) will be collapsed into a single "components" section under the same project. The Dropdown filter would also map both to the same value, making one unfilterable. Using the full `s.directory` as the Map key while still displaying only the basename in section titles would avoid this.
Reviews (11): Last reviewed commit: "Update opencode extension" | Re-trigger Greptile |
…rt search on type
- feat: auto-detect terminal from running processes - feat: add Warp, Ghostty, and Kitty terminal support
- feat: rename Open in Terminal to New Session (cmd+n) in project list - feat: add New Session action to project sessions view (cmd+n)
- fix: escape shellQuote in AppleScript strings, make getOpenSessions async - docs: improve command descriptions for store listing - docs: update README and CHANGELOG with new session, terminal support
0xdhrv
left a comment
There was a problem hiding this comment.
Thanks for your contribution
We already have an extension in the Store that deals with this. Could we consider enhancing the existing extension below instead of creating another one?
- https://www.raycast.com/mike182uk/opencode-sessions by @mike182uk
If there are unique features or workflows you’re aiming to add, we’d love to hear them and see if they can be integrated into this to avoid duplication and improve discoverability.
This would help avoid duplication and keep related functionality consolidated in one place.
As mentioned in our extension guidelines here
|
I checked the existing extension before submitting. They solve different problems @0xdhrv.
The features are complementary. I'm open to contributing to the existing extension if that's the preferred path, but the scope and intent are pretty different. What do you think? |
Thanks for the clarification; I agree the implementations and feature sets differ, and I can see the additional work around terminal integration, liveness detection, and project navigation here. That said, I still think this falls into the same core extension domain as The Extensions Guidelines generally push us toward consolidating related functionality where possible, even when the implementations or UX approaches differ substantially. The concern is less “do these have identical features?” and more “would users reasonably expect these capabilities to live in one extension?”. In this case, I think the answer is probably yes:
Features like:
all feel like capabilities that could strengthen the existing extension rather than justify a parallel one in the Store. I understand that integrating this into the current extension may require significant restructuring or coordination with the maintainer, but that’s generally the direction we prefer when the primary problem space overlaps this closely. I’d recommend reaching out to |
Description
I use OpenCode across multiple projects daily and end up with hundreds of sessions. Finding a past conversation or switching to the right session means digging through terminal tabs or remembering which project it was in. I wanted something faster — a way to jump to any session from anywhere without leaving what I'm doing.
Raycast extension for managing OpenCode projects and sessions. OpenCode is an open source AI coding agent for the terminal.
Commands:
Features:
How it works:
Uses the OpenCode SDK to start a lightweight server for API access (projects, todos, messages). Falls back to SQLite for cross-project session listing and content search. Session liveness is detected by scanning running processes and checking recent database activity.
Checklist
npm run buildand tested this distribution build in Raycastassetsfolder are used by the extension itselfREADMEare placed outside of themetadatafolder