feat(ai): add GitHub Copilot as memory provider#14
feat(ai): add GitHub Copilot as memory provider#14akinard 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
|
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? |
just change this to your local path { example: |
|
i already have this working for a week now. should i make PR? I wasnt sure if this was a grey-zone. |
it's up to you bro, cause im not actively using opencode again |
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