fix(tui): clear onboarding after provider connect (#34819)

Co-authored-by: Aiden Cline <aidenpcline@gmail.com>
This commit is contained in:
opencode-agent[bot] 2026-07-01 21:10:24 -05:00 committed by GitHub
commit 02f012f5d1
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
4 changed files with 25 additions and 12 deletions

View file

@ -0,0 +1,14 @@
import { describe, expect, test } from "bun:test"
import { hasConnectedProvider } from "../../src/util/connected-provider"
describe("hasConnectedProvider", () => {
test("is false without integration credentials", () => {
expect(hasConnectedProvider([])).toBe(false)
expect(hasConnectedProvider([{ connections: [] }])).toBe(false)
})
test("is true after any provider integration is connected", () => {
expect(hasConnectedProvider([{ connections: [{ type: "credential", id: "cred_1", label: "Work" }] }])).toBe(true)
expect(hasConnectedProvider([{ connections: [{ type: "env", name: "OPENAI_API_KEY" }] }])).toBe(true)
})
})