Skip to content

feat(tui): add provider disconnect command#23965

Open
kzekiue wants to merge 1 commit intoanomalyco:devfrom
kzekiue:issue-23923-cli-disconnect
Open

feat(tui): add provider disconnect command#23965
kzekiue wants to merge 1 commit intoanomalyco:devfrom
kzekiue:issue-23923-cli-disconnect

Conversation

@kzekiue
Copy link
Copy Markdown

@kzekiue kzekiue commented Apr 23, 2026

Issue for this PR

Closes #23923

Type of change

  • Bug fix
  • New feature
  • Refactor / code improvement
  • Documentation

What does this PR do?

Adds a /disconnect command to the tui so you can drop a connected provider without leaving opencode.

When you run it, it shows a picker with all currently connected providers. Api key ones just have their stored auth removed. Env, config, or custom providers get pushed into disabled_providers so they don’t instantly reconnect on refresh. Console-managed providers show up as managed and disabled since they’re meant to be handled from the console anyway.

It also covers the annoying edge cases like empty state, selecting the same provider twice while it’s disconnecting, and sdk or refresh failures with proper toasts.

How did you verify your code works?

Ran from packages/opencode:

  • bun test test/cli/tui/provider-disconnect.test.ts
  • bun typecheck

The push hook also ran bun turbo typecheck successfully.

Screenshots / recordings

Not included.

Checklist

  • I have tested my changes locally
  • I have not included unrelated changes in this PR

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[FEATURE]:allow /disconnect from cli

1 participant