feat: bundle AnthropicAuthPlugin and remove IDE integration#284
Merged
shuv1337 merged 5 commits intointegrationfrom Jan 9, 2026
Merged
feat: bundle AnthropicAuthPlugin and remove IDE integration#284shuv1337 merged 5 commits intointegrationfrom
shuv1337 merged 5 commits intointegrationfrom
Conversation
- Add builtin/anthropic-auth.ts with full OAuth plugin implementation - Load AnthropicAuthPlugin directly from code instead of npm - Remove opencode-anthropic-auth@0.0.5 from BUILTIN list - Keeps plugin bundling while removing external dependency
Additional Comments (1)
Prompt To Fix With AIThis is a comment left during a code review.
Path: packages/opencode/src/cli/cmd/tui/component/prompt/autocomplete.tsx
Line: 440:443
Comment:
The `/ide` command entry should be removed as IDE integration was removed in this PR. This will cause the command to trigger `ide.list` which no longer exists, resulting in a runtime error when users try to use this command.
```suggestion
```
How can I resolve this? If you propose a fix, please make it concise. |
The IDE integration was removed but the /ide slash command remained, which would cause a runtime error when triggered.
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 bundles the AnthropicAuthPlugin directly in the codebase and removes the IDE integration feature from the TUI.
Changes
Features
Refactoring
Code Removed
packages/opencode/src/ide/- IDE connection and integration modulepackages/opencode/src/cli/cmd/tui/component/dialog-ide.tsx- IDE dialog componentpackages/opencode/test/ide/ide.test.ts- IDE integration testsBreaking Changes
Testing
Existing tests cover changes. IDE-specific tests were removed as the feature is no longer present.
Greptile Overview
Greptile Overview
Greptile Summary
Bundles the AnthropicAuthPlugin directly in the codebase instead of loading it externally from npm, and removes the IDE integration feature from the TUI. The plugin bundling change moves the Anthropic authentication logic (OAuth flows, token refresh, API key creation) into a local module loaded at startup. The IDE integration removal eliminates connection handling, selection syncing, status displays, and related UI components across the TUI.
Confidence Score: 1/5
/idecommand entry (lines 440-443) that references the removed IDE integration. When users type/ide, it will triggeride.listwhich no longer exists since all IDE-related code was deleted. This will cause a runtime error and break user workflows.Important Files Changed
File Analysis
Sequence Diagram
sequenceDiagram participant User participant TUI participant PluginLoader participant AnthropicAuthPlugin participant AnthropicAPI Note over PluginLoader,AnthropicAuthPlugin: Plugin Bundling (NEW) User->>TUI: Start Application TUI->>PluginLoader: Initialize plugins PluginLoader->>AnthropicAuthPlugin: Load bundled plugin directly AnthropicAuthPlugin-->>PluginLoader: Return auth hooks Note over User,AnthropicAPI: OAuth Authentication Flow User->>TUI: Select "Claude Pro/Max" TUI->>AnthropicAuthPlugin: authorize("max") AnthropicAuthPlugin->>AnthropicAPI: Generate PKCE challenge AnthropicAuthPlugin-->>User: Display authorization URL User->>AnthropicAPI: Authorize via browser User->>TUI: Paste authorization code TUI->>AnthropicAuthPlugin: exchange(code, verifier) AnthropicAuthPlugin->>AnthropicAPI: POST /v1/oauth/token AnthropicAPI-->>AnthropicAuthPlugin: Return tokens AnthropicAuthPlugin-->>TUI: Return credentials Note over TUI,AnthropicAPI: API Requests with Token Refresh TUI->>AnthropicAuthPlugin: fetch(request) AnthropicAuthPlugin->>AnthropicAuthPlugin: Check token expiry alt Token expired AnthropicAuthPlugin->>AnthropicAPI: Refresh token AnthropicAPI-->>AnthropicAuthPlugin: New access token end AnthropicAuthPlugin->>AnthropicAPI: API request with Bearer token AnthropicAPI-->>AnthropicAuthPlugin: Response AnthropicAuthPlugin-->>TUI: Transformed responseImportant Files Changed
File Analysis
Sequence Diagram
sequenceDiagram participant User participant TUI participant PluginLoader participant AnthropicAuthPlugin participant AnthropicAPI Note over PluginLoader,AnthropicAuthPlugin: Plugin Bundling (NEW) User->>TUI: Start Application TUI->>PluginLoader: Initialize plugins PluginLoader->>AnthropicAuthPlugin: Load bundled plugin directly AnthropicAuthPlugin-->>PluginLoader: Return auth hooks Note over User,AnthropicAPI: OAuth Authentication Flow User->>TUI: Select "Claude Pro/Max" TUI->>AnthropicAuthPlugin: authorize("max") AnthropicAuthPlugin->>AnthropicAPI: Generate PKCE challenge AnthropicAuthPlugin-->>User: Display authorization URL User->>AnthropicAPI: Authorize via browser User->>TUI: Paste authorization code TUI->>AnthropicAuthPlugin: exchange(code, verifier) AnthropicAuthPlugin->>AnthropicAPI: POST /v1/oauth/token AnthropicAPI-->>AnthropicAuthPlugin: Return tokens AnthropicAuthPlugin-->>TUI: Return credentials Note over TUI,AnthropicAPI: API Requests with Token Refresh TUI->>AnthropicAuthPlugin: fetch(request) AnthropicAuthPlugin->>AnthropicAuthPlugin: Check token expiry alt Token expired AnthropicAuthPlugin->>AnthropicAPI: Refresh token AnthropicAPI-->>AnthropicAuthPlugin: New access token end AnthropicAuthPlugin->>AnthropicAPI: API request with Bearer token AnthropicAPI-->>AnthropicAuthPlugin: Response AnthropicAuthPlugin-->>TUI: Transformed response