feat(ai): add GitHub Copilot as memory provider#14
Open
akinard wants to merge 1 commit intotickernelz:mainfrom
Open
feat(ai): add GitHub Copilot as memory provider#14akinard wants to merge 1 commit intotickernelz:mainfrom
akinard wants to merge 1 commit intotickernelz:mainfrom
Conversation
Add support for using GitHub Copilot as the AI provider for auto-capture and memory analysis. Uses opencode's stored OAuth tokens for authentication, eliminating the need for separate API key configuration. New files: - github-copilot-auth.ts: Token retrieval from opencode auth storage - github-copilot.ts: GitHubCopilotProvider implementing BaseAIProvider Changes: - Register github-copilot in AIProviderType and factory - Add github-copilot option to config types and template - Document available models (claude-haiku-4.5 recommended for auto-capture) Supported models: claude-opus-4.5, claude-sonnet-4.5, claude-haiku-4.5, gemini-3-pro, gemini-3-flash, gpt-4o, gpt-4o-mini
Owner
|
works fine on your local? and pls remove the GITHUB_COPILOT_PLAN.md |
|
I want to test it in my machine, but I swear to god I can't find a way to load the plugin manually. Any guide for it other than the vague opencode wiki? |
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
This PR adds GitHub Copilot as a new memory provider for opencode-mem, enabling auto-capture and user profile analysis using GitHub Copilot's API without requiring separate API keys.
Changes
New Files
src/services/ai/providers/github-copilot-auth.ts- Reads OAuth tokens from opencode's auth storage (~/.local/share/opencode/auth.json)src/services/ai/providers/github-copilot.ts-GitHubCopilotProviderclass using OpenAI-compatible Chat Completions APIModified Files
src/services/ai/session/session-types.ts- Added"github-copilot"toAIProviderTypesrc/services/ai/ai-provider-factory.ts- Registered the new providersrc/config.ts- Added"github-copilot"to provider type definitions and config templateUsage
No API key needed - the provider automatically reads GitHub Copilot OAuth tokens from opencode's auth storage.
Testing
add,list)Notes
Openai-Intent: conversation-edits,x-initiator: agent