mirror of
https://github.com/chriswritescode-dev/opencode-manager.git
synced 2026-12-06 12:54:20 +01:00
refactor: consolidate environment config and API handling
- Update database paths and port configuration - Remove backend config.ts and sessions route - Add mobile file preview and files API - Clean up shared constants and provider hooks
This commit is contained in:
1 parent
0db354048d
commit
8a56bc208d
32 files changed
+301
-512
No files matched your search
@@ -9,7 +9,7 @@ import { Loader2, Key, Check, X, Plus } from 'lucide-react'
|
||||
import { providerCredentialsApi } from '@/api/providers'
|
||||
import { useMutation, useQuery, useQueryClient } from '@tanstack/react-query'
|
||||
import { AddProviderDialog } from './AddProviderDialog'
|
||||
import { useProviders } from '@/hooks/useProviders'
|
||||
import { getProviders } from '@/api/providers'
|
||||
|
||||
export function ProviderSettings() {
|
||||
const [selectedProvider, setSelectedProvider] = useState<string | null>(null)
|
||||
@@ -18,7 +18,11 @@ export function ProviderSettings() {
|
||||
const [addDialogOpen, setAddDialogOpen] = useState(false)
|
||||
const queryClient = useQueryClient()
|
||||
|
||||
const { data: providers, isLoading: providersLoading } = useProviders()
|
||||
const { data: providers, isLoading: providersLoading } = useQuery({
|
||||
queryKey: ['providers'],
|
||||
queryFn: () => getProviders(),
|
||||
staleTime: 300000,
|
||||
})
|
||||
|
||||
const { data: credentialsList, isLoading: credentialsLoading } = useQuery({
|
||||
queryKey: ['provider-credentials'],
|
||||
|
||||
Reference in new issue
Block a user