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
@@ -1146,7 +1146,6 @@ describe('EventProvider permissions and forms', () => {
|
||||
|
||||
await waitFor(() => {
|
||||
for (const queryKey of [
|
||||
['provider-credentials'],
|
||||
['provider-auth-methods'],
|
||||
['provider-integrations'],
|
||||
['opencode', 'providers'],
|
||||
@@ -1182,7 +1181,7 @@ describe('EventProvider permissions and forms', () => {
|
||||
await waitFor(() => {
|
||||
expect(invalidateQueries).toHaveBeenCalledWith({ queryKey: ['opencode', 'providers'] })
|
||||
})
|
||||
expect(invalidateQueries).toHaveBeenCalledTimes(4)
|
||||
expect(invalidateQueries).toHaveBeenCalledTimes(3)
|
||||
})
|
||||
|
||||
it.each<[string, string[]]>([
|
||||
|
||||
@@ -183,7 +183,7 @@ describe('QueryCachePersistenceProvider', () => {
|
||||
client.setQueryData(['opencode', 'sessions', '/work/repo'], [{ id: 'ses_1' }])
|
||||
client.setQueryData(['settings', 'user-1'], { opencodeServerAuth: 'secret' })
|
||||
client.setQueryData(['opencode', 'transcript', 'ses_1'], [{ text: 'streamed' }])
|
||||
client.setQueryData(['provider-credentials'], [{ apiKey: 'secret' }])
|
||||
client.setQueryData(['provider-integrations'], [{ apiKey: 'secret' }])
|
||||
})
|
||||
await settle()
|
||||
|
||||
|
||||
Reference in new issue
Block a user