Add OpenCode provider support#8
Closed
biyiklioglu wants to merge 1 commit into
Closed
Conversation
Introduce OpenCode as a first-class provider across discovery, parsing, indexing, search, settings, dashboard stats, and history rendering. Add a SQLite-backed OpenCode adapter that reads session data from , normalizes it through the existing provider pipeline, and preserves generic tool/edit payloads so diff rendering, tool-call indexing, and AI code activity stats work without provider-specific branches. Extend materialized-source handling so providers can use stable logical source keys while still tracking a real backing path for change detection. Add OpenCode change expansion, changed-db session cleanup, provider metadata/default roots, and provider-count/search plumbing so OpenCode participates in refresh, filtering, exports, and aggregate stats alongside the existing providers. Surface OpenCode in the desktop app through provider styling, settings labels, dashboard/provider displays, and raw edit rendering. Heal legacy saved indexing state so older default provider selections automatically enable OpenCode on startup without overriding intentional custom subsets, and cover the new behavior with discovery, parser, indexing, app-state, settings, dashboard, search, and app shell tests.
Owner
|
@copilot resolve the merge conflicts in this pull request |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Adds OpenCode as a provider in Code Trail.
This change brings OpenCode into the same indexing and desktop UX flow as the existing providers, covering discovery, parsing, indexing, search, provider filters, settings, edit rendering, and exports.
What Changed
opencodeto the canonical provider surface and provider-driven contractsopencodeRootdiscovery config and default platform pathsopencode.dbWhy
OpenCode stores session history differently from the file-backed providers already supported in Code Trail. Without provider-aware materialized discovery and backing-path handling, the app could not reliably treat individual OpenCode sessions as indexable sources.
The app-state migration is included because older installs persisted the pre-OpenCode default enabled-provider list. That left OpenCode supported in code but still disabled in practice until users manually changed settings.
Impact
Users can now index and explore OpenCode sessions in the same way they already use Claude, Codex, Gemini, Cursor, and Copilot history.
That includes:
Test Coverage
opencode, while preserving intentional custom provider selections.OpenCode data rootpath.filePath,content,oldString, andnewStringnormalize into the shared tool/edit parsing flow.opencodeprovider in provider-based UI preferences.opencode.dband changed-path expansion from the database file to logical session sources.user,assistant,thinking,tool_use,tool_edit, andtool_result, including timestamps and tool payload preservation.Validation
Focused OpenCode coverage passed across discovery, parsing, indexing, search, app state, settings, and app shell, and the desktop build completed successfully.
Screenshots