mirror of
https://github.com/chriswritescode-dev/opencode-manager.git
synced 2026-12-06 12:54:20 +01:00
fix(frontend): load provider integrations through the typed OpenCode client
Fetch integrations with callOpenCode instead of a dedicated backend route, drop the unused provider credentials list query, label an existing key as "Edit API key", and keep the loaded provider list when a background refetch fails.
This commit is contained in:
1 parent
b179267376
commit
99713e15b4
13 files changed
+44
-84
No files matched your search
@@ -304,13 +304,6 @@ describe('providerCredentialsApi', () => {
|
||||
vi.clearAllMocks()
|
||||
})
|
||||
|
||||
it('lists provider ids with credentials from the Manager response', async () => {
|
||||
mockFetchWrapper.mockResolvedValue({ providers: ['anthropic', 'openai'] })
|
||||
|
||||
await expect(providerCredentialsApi.list()).resolves.toEqual(['anthropic', 'openai'])
|
||||
expect(mockFetchWrapper).toHaveBeenCalledWith(`${API_BASE_URL}/api/providers/credentials`)
|
||||
})
|
||||
|
||||
it('reports credential status from the Manager response', async () => {
|
||||
mockFetchWrapper.mockResolvedValue({ hasCredentials: true })
|
||||
|
||||
|
||||
Reference in new issue
Block a user