mirror of
https://github.com/chriswritescode-dev/opencode-manager.git
synced 2026-12-06 12:54:20 +01:00
feat(ocm-cli): workspace repo sync and manager token targeting (#233)
This commit is contained in:
1 parent
e12f319592
commit
a86e4b1238
69 files changed
+4858
-161
No files matched your search
@@ -0,0 +1,115 @@
|
||||
import { useState } from 'react'
|
||||
import { useManagerToken } from '@/hooks/useManagerToken'
|
||||
import { Button } from '@/components/ui/button'
|
||||
import { Input } from '@/components/ui/input'
|
||||
import { Alert, AlertDescription } from '@/components/ui/alert'
|
||||
import { AlertTriangle, Check, ChevronDown, Copy, Eye, EyeOff, RefreshCw } from 'lucide-react'
|
||||
|
||||
interface ManagerTokenSettingsProps {
|
||||
isOpen?: boolean
|
||||
onToggle?: () => void
|
||||
}
|
||||
|
||||
export function ManagerTokenSettings({ isOpen: controlledOpen, onToggle }: ManagerTokenSettingsProps = {}) {
|
||||
const { token, isLoading, rotate } = useManagerToken()
|
||||
const [showToken, setShowToken] = useState(false)
|
||||
const [copied, setCopied] = useState(false)
|
||||
const [confirmRotate, setConfirmRotate] = useState(false)
|
||||
const [uncontrolledOpen, setUncontrolledOpen] = useState(true)
|
||||
const isOpen = controlledOpen ?? uncontrolledOpen
|
||||
const handleToggle = onToggle ?? (() => setUncontrolledOpen((open) => !open))
|
||||
|
||||
const handleCopy = async () => {
|
||||
if (!token) return
|
||||
try {
|
||||
await navigator.clipboard.writeText(token)
|
||||
setCopied(true)
|
||||
setTimeout(() => setCopied(false), 2000)
|
||||
} catch {
|
||||
// clipboard may be unavailable; user can copy manually from the input
|
||||
}
|
||||
}
|
||||
|
||||
const handleRotate = () => {
|
||||
if (!confirmRotate) {
|
||||
setConfirmRotate(true)
|
||||
setTimeout(() => setConfirmRotate(false), 4000)
|
||||
return
|
||||
}
|
||||
rotate.mutate()
|
||||
setConfirmRotate(false)
|
||||
}
|
||||
|
||||
return (
|
||||
<div className="rounded-lg border bg-card overflow-hidden">
|
||||
<button
|
||||
type="button"
|
||||
onClick={handleToggle}
|
||||
className="w-full px-4 py-3 flex items-center justify-between hover:bg-muted/50 transition-colors"
|
||||
>
|
||||
<div className="flex items-center gap-3 min-w-0">
|
||||
<h3 className="text-sm font-semibold truncate">Manager Internal Token</h3>
|
||||
<span className="text-xs text-muted-foreground truncate hidden sm:inline">
|
||||
Bearer token for workspace plugin and API clients
|
||||
</span>
|
||||
</div>
|
||||
<ChevronDown className={`h-4 w-4 transition-transform flex-shrink-0 ${isOpen ? 'rotate-90' : ''}`} />
|
||||
</button>
|
||||
|
||||
{isOpen && (
|
||||
<div className="px-4 pb-4 pt-1 border-t border-border">
|
||||
<div className="space-y-4">
|
||||
<div className="flex gap-2 items-center pt-2">
|
||||
<div className="relative flex-1">
|
||||
<Input
|
||||
id="manager-token"
|
||||
type={showToken ? 'text' : 'password'}
|
||||
value={isLoading ? 'Loading...' : token ?? ''}
|
||||
readOnly
|
||||
className="flex-1 font-mono text-xs pr-9"
|
||||
autoComplete="new-password"
|
||||
name="manager-token-input"
|
||||
/>
|
||||
<button
|
||||
type="button"
|
||||
onClick={() => setShowToken(!showToken)}
|
||||
disabled={!token}
|
||||
className="absolute right-2 top-1/2 -translate-y-1/2 text-muted-foreground hover:text-foreground"
|
||||
>
|
||||
{showToken ? <EyeOff className="h-4 w-4" /> : <Eye className="h-4 w-4" />}
|
||||
</button>
|
||||
</div>
|
||||
<Button
|
||||
variant="outline"
|
||||
size="icon"
|
||||
type="button"
|
||||
onClick={handleCopy}
|
||||
disabled={!token}
|
||||
>
|
||||
{copied ? <Check className="h-4 w-4 text-green-500" /> : <Copy className="h-4 w-4" />}
|
||||
</Button>
|
||||
<Button
|
||||
variant={confirmRotate ? 'destructive' : 'outline'}
|
||||
size="icon"
|
||||
type="button"
|
||||
onClick={handleRotate}
|
||||
disabled={rotate.isPending || isLoading}
|
||||
>
|
||||
<RefreshCw className={`h-4 w-4 ${rotate.isPending ? 'animate-spin' : ''}`} />
|
||||
</Button>
|
||||
</div>
|
||||
|
||||
{confirmRotate && (
|
||||
<Alert variant="destructive">
|
||||
<AlertTriangle className="h-4 w-4" />
|
||||
<AlertDescription>
|
||||
Rotating will invalidate the existing token. Any plugin or client using it must be updated. Click Rotate again to confirm.
|
||||
</AlertDescription>
|
||||
</Alert>
|
||||
)}
|
||||
</div>
|
||||
</div>
|
||||
)}
|
||||
</div>
|
||||
)
|
||||
}
|
||||
@@ -52,7 +52,11 @@ interface Agent {
|
||||
[key: string]: unknown
|
||||
}
|
||||
|
||||
export function OpenCodeConfigManager() {
|
||||
interface OpenCodeConfigManagerProps {
|
||||
hideHealthStatus?: boolean
|
||||
}
|
||||
|
||||
export function OpenCodeConfigManager({ hideHealthStatus = false }: OpenCodeConfigManagerProps) {
|
||||
const queryClient = useQueryClient()
|
||||
const { data: health } = useServerHealth()
|
||||
const [configs, setConfigs] = useState<OpenCodeConfig[]>([])
|
||||
@@ -407,7 +411,7 @@ export function OpenCodeConfigManager() {
|
||||
|
||||
return (
|
||||
<div className="space-y-6 overflow-y-auto">
|
||||
{health && (
|
||||
{!hideHealthStatus && health && (
|
||||
<Card className={cn('bg-transparent border-transparent', isUnhealthy && 'border-destructive')}>
|
||||
<CardContent className="p-3">
|
||||
<div className="flex flex-col sm:flex-row sm:items-center items-center justify-center gap-3">
|
||||
|
||||
@@ -2,14 +2,21 @@ import { useState } from 'react'
|
||||
import { useOpenCodeServerAuth } from '@/hooks/useOpenCodeServerAuth'
|
||||
import { Button } from '@/components/ui/button'
|
||||
import { Input } from '@/components/ui/input'
|
||||
import { Label } from '@/components/ui/label'
|
||||
import { Alert, AlertDescription } from '@/components/ui/alert'
|
||||
import { AlertTriangle, CheckCircle2, Eye, EyeOff, XCircle } from 'lucide-react'
|
||||
import { AlertTriangle, CheckCircle2, ChevronDown, Eye, EyeOff, XCircle } from 'lucide-react'
|
||||
|
||||
export function OpenCodeServerAuthSettings() {
|
||||
interface OpenCodeServerAuthSettingsProps {
|
||||
isOpen?: boolean
|
||||
onToggle?: () => void
|
||||
}
|
||||
|
||||
export function OpenCodeServerAuthSettings({ isOpen: controlledOpen, onToggle }: OpenCodeServerAuthSettingsProps = {}) {
|
||||
const { status, setPassword, clearPassword } = useOpenCodeServerAuth()
|
||||
const [password, setPasswordValue] = useState('')
|
||||
const [showPassword, setShowPassword] = useState(false)
|
||||
const [uncontrolledOpen, setUncontrolledOpen] = useState(true)
|
||||
const isOpen = controlledOpen ?? uncontrolledOpen
|
||||
const handleToggle = onToggle ?? (() => setUncontrolledOpen((open) => !open))
|
||||
|
||||
const handleSave = () => {
|
||||
if (password.length >= 8) {
|
||||
@@ -34,68 +41,76 @@ export function OpenCodeServerAuthSettings() {
|
||||
}
|
||||
|
||||
return (
|
||||
<div className="space-y-4 mb-6">
|
||||
<div className="rounded-lg border bg-card p-6">
|
||||
<h3 className="text-lg font-semibold mb-4">OpenCode Server Authentication</h3>
|
||||
|
||||
<div className="space-y-4">
|
||||
<div className="flex items-center gap-2 text-sm">
|
||||
<span className="text-muted-foreground">Status:</span>
|
||||
<span className="flex items-center gap-2 font-medium">
|
||||
{getStatusIcon()}
|
||||
{getStatusText()}
|
||||
</span>
|
||||
</div>
|
||||
<div className="rounded-lg border bg-card overflow-hidden">
|
||||
<button
|
||||
type="button"
|
||||
onClick={handleToggle}
|
||||
className="w-full px-4 py-3 flex items-center justify-between hover:bg-muted/50 transition-colors"
|
||||
>
|
||||
<div className="flex items-center gap-2">
|
||||
<h3 className="text-sm font-semibold">OpenCode Server Authentication</h3>
|
||||
<span className="text-xs text-muted-foreground flex items-center gap-1">
|
||||
{getStatusIcon()}
|
||||
{getStatusText()}
|
||||
</span>
|
||||
</div>
|
||||
<ChevronDown className={`h-4 w-4 transition-transform ${isOpen ? 'rotate-90' : ''}`} />
|
||||
</button>
|
||||
|
||||
{status?.source === 'none' && (
|
||||
<Alert variant="destructive">
|
||||
<AlertTriangle className="h-4 w-4" />
|
||||
<AlertDescription>
|
||||
If you set OPENCODE_HOST=0.0.0.0 in Docker without a password, the server will refuse to start.
|
||||
</AlertDescription>
|
||||
</Alert>
|
||||
)}
|
||||
{isOpen && (
|
||||
<div className="px-4 pb-4 pt-1 border-t border-border">
|
||||
<div className="space-y-4">
|
||||
{status?.source === 'none' && (
|
||||
<Alert variant="destructive">
|
||||
<AlertTriangle className="h-4 w-4" />
|
||||
<AlertDescription>
|
||||
If you set OPENCODE_HOST=0.0.0.0 in Docker without a password, the server will refuse to start.
|
||||
</AlertDescription>
|
||||
</Alert>
|
||||
)}
|
||||
|
||||
<div className="space-y-2">
|
||||
<Label htmlFor="password">Password (min 8 characters)</Label>
|
||||
<div className="flex gap-2">
|
||||
<Input
|
||||
id="password"
|
||||
type={showPassword ? 'text' : 'password'}
|
||||
value={password}
|
||||
onChange={(e) => setPasswordValue(e.target.value)}
|
||||
placeholder="Enter new password"
|
||||
className="flex-1"
|
||||
/>
|
||||
<Button
|
||||
variant="outline"
|
||||
size="icon"
|
||||
type="button"
|
||||
onClick={() => setShowPassword(!showPassword)}
|
||||
>
|
||||
{showPassword ? <EyeOff className="h-4 w-4" /> : <Eye className="h-4 w-4" />}
|
||||
</Button>
|
||||
</div>
|
||||
<div className="flex gap-2">
|
||||
<div className="flex gap-2 items-center pt-2">
|
||||
<div className="relative flex-1">
|
||||
<Input
|
||||
id="password"
|
||||
type={showPassword ? 'text' : 'password'}
|
||||
value={password}
|
||||
onChange={(e) => setPasswordValue(e.target.value)}
|
||||
placeholder="Enter new password"
|
||||
className="pr-9"
|
||||
autoComplete="new-password"
|
||||
name="opencode-server-password"
|
||||
/>
|
||||
<button
|
||||
type="button"
|
||||
onClick={() => setShowPassword(!showPassword)}
|
||||
className="absolute right-2 top-1/2 -translate-y-1/2 text-muted-foreground hover:text-foreground"
|
||||
>
|
||||
{showPassword ? <EyeOff className="h-4 w-4" /> : <Eye className="h-4 w-4" />}
|
||||
</button>
|
||||
</div>
|
||||
<Button
|
||||
onClick={handleSave}
|
||||
disabled={password.length < 8 || setPassword.isPending}
|
||||
>
|
||||
{setPassword.isPending ? 'Saving...' : 'Save'}
|
||||
</Button>
|
||||
{status?.source === 'db' && (
|
||||
<Button
|
||||
variant="outline"
|
||||
onClick={() => clearPassword.mutate()}
|
||||
disabled={clearPassword.isPending}
|
||||
>
|
||||
{clearPassword.isPending ? 'Clearing...' : 'Clear stored password'}
|
||||
</Button>
|
||||
)}
|
||||
</div>
|
||||
{password.length > 0 && password.length < 8 && (
|
||||
<p className="text-xs text-destructive">Password must be at least 8 characters</p>
|
||||
)}
|
||||
{status?.source === 'db' && (
|
||||
<Button
|
||||
variant="outline"
|
||||
onClick={() => clearPassword.mutate()}
|
||||
disabled={clearPassword.isPending}
|
||||
>
|
||||
{clearPassword.isPending ? 'Clearing...' : 'Clear stored password'}
|
||||
</Button>
|
||||
)}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
)}
|
||||
</div>
|
||||
)
|
||||
}
|
||||
@@ -0,0 +1,178 @@
|
||||
import { cn } from '@/lib/utils'
|
||||
import { Button } from '@/components/ui/button'
|
||||
import { Card, CardContent } from '@/components/ui/card'
|
||||
import { Loader2, ArrowUpCircle, RotateCcw, History, Plus } from 'lucide-react'
|
||||
import { useServerHealth } from '@/hooks/useServerHealth'
|
||||
import { useMutation, useQueryClient } from '@tanstack/react-query'
|
||||
import { settingsApi } from '@/api/settings'
|
||||
import { showToast } from '@/lib/toast'
|
||||
import { invalidateConfigCaches } from '@/lib/queryInvalidation'
|
||||
|
||||
interface ServerHealthStatusProps {
|
||||
onCreateConfig?: () => void
|
||||
onOpenVersionDialog?: () => void
|
||||
}
|
||||
|
||||
export function ServerHealthStatus({ onCreateConfig, onOpenVersionDialog }: ServerHealthStatusProps) {
|
||||
const queryClient = useQueryClient()
|
||||
const { data: health } = useServerHealth()
|
||||
|
||||
const restartServerMutation = useMutation({
|
||||
mutationFn: async () => settingsApi.restartOpenCodeServer(),
|
||||
onSuccess: () => {
|
||||
invalidateConfigCaches(queryClient)
|
||||
},
|
||||
})
|
||||
|
||||
const upgradeOpenCodeMutation = useMutation({
|
||||
mutationFn: async () => settingsApi.upgradeOpenCode(),
|
||||
onSuccess: (data) => {
|
||||
if (data.upgraded && data.newVersion) {
|
||||
queryClient.setQueryData(['health'], (old: Record<string, unknown> | undefined) => {
|
||||
if (!old) return old
|
||||
return { ...old, opencodeVersion: data.newVersion }
|
||||
})
|
||||
}
|
||||
invalidateConfigCaches(queryClient)
|
||||
if (data.upgraded) {
|
||||
showToast.success(`Upgraded to v${data.newVersion} and server restarted`, { id: 'upgrade-opencode' })
|
||||
} else {
|
||||
showToast.success('OpenCode is already up to date', { id: 'upgrade-opencode' })
|
||||
}
|
||||
},
|
||||
onError: (error) => {
|
||||
const defaultMessage = 'Failed to upgrade OpenCode'
|
||||
|
||||
if (error && typeof error === 'object' && 'response' in error) {
|
||||
const response = (error as { response?: { data?: { recovered?: boolean; recoveryMessage?: string; newVersion?: string } } }).response
|
||||
const data = response?.data
|
||||
|
||||
if (data?.recovered && data.newVersion) {
|
||||
queryClient.setQueryData(['health'], (old: Record<string, unknown> | undefined) => {
|
||||
if (!old) return old
|
||||
return { ...old, opencodeVersion: data.newVersion }
|
||||
})
|
||||
showToast.success(`Upgrade failed but server recovered at v${data.newVersion}`, { id: 'upgrade-opencode' })
|
||||
} else {
|
||||
showToast.error(data?.recoveryMessage || defaultMessage, { id: 'upgrade-opencode' })
|
||||
}
|
||||
} else {
|
||||
showToast.error(defaultMessage, { id: 'upgrade-opencode' })
|
||||
}
|
||||
invalidateConfigCaches(queryClient)
|
||||
},
|
||||
})
|
||||
|
||||
if (!health) {
|
||||
return (
|
||||
<Card className="bg-transparent border-transparent">
|
||||
<CardContent className="p-3">
|
||||
<div className="flex items-center justify-center gap-2">
|
||||
<Loader2 className="h-4 w-4 animate-spin text-muted-foreground" />
|
||||
<span className="text-sm text-muted-foreground">Loading server status...</span>
|
||||
</div>
|
||||
</CardContent>
|
||||
</Card>
|
||||
)
|
||||
}
|
||||
|
||||
const isUnhealthy = health.opencode !== 'healthy'
|
||||
|
||||
return (
|
||||
<Card className={cn('bg-transparent border-transparent', isUnhealthy && 'border-destructive')}>
|
||||
<CardContent className="p-3">
|
||||
<div className="flex flex-col sm:flex-row sm:items-center items-center justify-center gap-3">
|
||||
<div className="flex items-center gap-2 flex-wrap justify-center ">
|
||||
<div className={`h-3 w-3 rounded-full ${isUnhealthy ? 'bg-destructive animate-pulse' : 'bg-green-500'}`} />
|
||||
<p className="font-medium text-sm sm:text-base">
|
||||
Server Status: {isUnhealthy ? 'Unhealthy' : 'Healthy'}
|
||||
</p>
|
||||
{health.error && (
|
||||
<p className="text-xs text-destructive">
|
||||
{health.error}
|
||||
</p>
|
||||
)}
|
||||
{health.opencodeVersion && (
|
||||
<p className="text-xs text-muted-foreground">
|
||||
OpenCode v{health.opencodeVersion}
|
||||
</p>
|
||||
)}
|
||||
{health.opencodeManagerVersion && (
|
||||
<p className="text-xs text-muted-foreground">
|
||||
Manager v{health.opencodeManagerVersion}
|
||||
</p>
|
||||
)}
|
||||
</div>
|
||||
<div className="flex flex-wrap gap-2 justify-center sm:justify-end">
|
||||
<Button
|
||||
variant="outline"
|
||||
size="sm"
|
||||
onClick={async () => {
|
||||
showToast.loading('Upgrading OpenCode...', { id: 'upgrade-opencode' })
|
||||
try {
|
||||
await upgradeOpenCodeMutation.mutateAsync()
|
||||
} catch (error) {
|
||||
const errorMessage = error && typeof error === 'object' && 'response' in error
|
||||
? ((error as { response?: { data?: { details?: string; error?: string } } }).response?.data?.details
|
||||
|| (error as { response?: { data?: { details?: string; error?: string } } }).response?.data?.error
|
||||
|| 'Failed to upgrade OpenCode')
|
||||
: 'Failed to upgrade OpenCode'
|
||||
showToast.error(errorMessage, { id: 'upgrade-opencode' })
|
||||
}
|
||||
}}
|
||||
disabled={upgradeOpenCodeMutation.isPending}
|
||||
>
|
||||
{upgradeOpenCodeMutation.isPending ? (
|
||||
<Loader2 className="h-3 w-3 sm:h-4 sm:w-4 mr-1 animate-spin" />
|
||||
) : (
|
||||
<ArrowUpCircle className="h-3 w-3 sm:h-4 sm:w-4 mr-1" />
|
||||
)}
|
||||
<span className="text-xs sm:text-sm">Update</span>
|
||||
</Button>
|
||||
<Button
|
||||
variant="outline"
|
||||
size="sm"
|
||||
onClick={async () => {
|
||||
showToast.loading('Restarting OpenCode server...', { id: 'manual-restart' })
|
||||
try {
|
||||
await restartServerMutation.mutateAsync()
|
||||
showToast.success('Server restarted successfully', { id: 'manual-restart' })
|
||||
} catch (error) {
|
||||
const errorMessage = error && typeof error === 'object' && 'response' in error
|
||||
? ((error as { response?: { data?: { details?: string; error?: string } } }).response?.data?.details
|
||||
|| (error as { response?: { data?: { details?: string; error?: string } } }).response?.data?.error
|
||||
|| 'Failed to restart OpenCode server')
|
||||
: 'Failed to restart OpenCode server'
|
||||
showToast.error(errorMessage, { id: 'manual-restart' })
|
||||
}
|
||||
}}
|
||||
disabled={restartServerMutation.isPending}
|
||||
>
|
||||
{restartServerMutation.isPending ? (
|
||||
<Loader2 className="h-3 w-3 sm:h-4 sm:w-4 mr-1 animate-spin" />
|
||||
) : (
|
||||
<RotateCcw className="h-3 w-3 sm:h-4 sm:w-4 mr-1" />
|
||||
)}
|
||||
<span className="text-xs sm:text-sm">Restart</span>
|
||||
</Button>
|
||||
<Button
|
||||
variant="outline"
|
||||
size="sm"
|
||||
onClick={onOpenVersionDialog}
|
||||
>
|
||||
<History className="h-3 w-3 sm:h-4 sm:w-4 mr-1" />
|
||||
<span className="text-xs sm:text-sm">Versions</span>
|
||||
</Button>
|
||||
<Button
|
||||
size="sm"
|
||||
onClick={onCreateConfig}
|
||||
>
|
||||
<Plus className="h-3 w-3 sm:h-4 sm:w-4 mr-1" />
|
||||
<span className="text-xs sm:text-sm">New Config</span>
|
||||
</Button>
|
||||
</div>
|
||||
</div>
|
||||
</CardContent>
|
||||
</Card>
|
||||
)
|
||||
}
|
||||
@@ -4,6 +4,8 @@ import { GitSettings } from '@/components/settings/GitSettings'
|
||||
import { KeyboardShortcuts } from '@/components/settings/KeyboardShortcuts'
|
||||
import { OpenCodeConfigManager } from '@/components/settings/OpenCodeConfigManager'
|
||||
import { OpenCodeServerAuthSettings } from '@/components/settings/OpenCodeServerAuthSettings'
|
||||
import { ManagerTokenSettings } from '@/components/settings/ManagerTokenSettings'
|
||||
import { ServerHealthStatus } from '@/components/settings/ServerHealthStatus'
|
||||
import { ProviderSettings } from '@/components/settings/ProviderSettings'
|
||||
import { AccountSettings } from '@/components/settings/AccountSettings'
|
||||
import { VoiceSettings } from '@/components/settings/VoiceSettings'
|
||||
@@ -20,6 +22,8 @@ export function SettingsDialog() {
|
||||
const { isOpen, close, activeTab, setActiveTab } = useSettingsDialog()
|
||||
const [mobileView, setMobileView] = useState<SettingsView>('menu')
|
||||
const [sectionHistory, setSectionHistory] = useState<SettingsView[]>([])
|
||||
const [authSectionsOpen, setAuthSectionsOpen] = useState(true)
|
||||
const toggleAuthSections = useCallback(() => setAuthSectionsOpen((open) => !open), [])
|
||||
|
||||
const pushSectionHistory = useCallback((view: SettingsView) => {
|
||||
if (view === 'menu') return
|
||||
@@ -154,8 +158,12 @@ export function SettingsDialog() {
|
||||
<TabsContent key="shortcuts" value="shortcuts" className="mt-0"><KeyboardShortcuts /></TabsContent>
|
||||
<TabsContent key="opencode" value="opencode" className="mt-0">
|
||||
<div className="space-y-6">
|
||||
<OpenCodeServerAuthSettings />
|
||||
<OpenCodeConfigManager />
|
||||
<ServerHealthStatus />
|
||||
<div className="grid grid-cols-1 md:grid-cols-2 gap-4">
|
||||
<OpenCodeServerAuthSettings isOpen={authSectionsOpen} onToggle={toggleAuthSections} />
|
||||
<ManagerTokenSettings isOpen={authSectionsOpen} onToggle={toggleAuthSections} />
|
||||
</div>
|
||||
<OpenCodeConfigManager hideHealthStatus />
|
||||
</div>
|
||||
</TabsContent>
|
||||
<TabsContent key="providers" value="providers" className="mt-0"><ProviderSettings /></TabsContent>
|
||||
@@ -220,12 +228,14 @@ export function SettingsDialog() {
|
||||
{mobileView === 'voice' && <div key="voice"><VoiceSettings /></div>}
|
||||
{mobileView === 'git' && <div key="git"><GitSettings /></div>}
|
||||
{mobileView === 'shortcuts' && <div key="shortcuts"><KeyboardShortcuts /></div>}
|
||||
{mobileView === 'opencode' && (
|
||||
<div key="opencode" className="space-y-6">
|
||||
<OpenCodeServerAuthSettings />
|
||||
<OpenCodeConfigManager />
|
||||
</div>
|
||||
)}
|
||||
{mobileView === 'opencode' && (
|
||||
<div key="opencode" className="space-y-6">
|
||||
<ServerHealthStatus />
|
||||
<OpenCodeServerAuthSettings />
|
||||
<ManagerTokenSettings />
|
||||
<OpenCodeConfigManager hideHealthStatus />
|
||||
</div>
|
||||
)}
|
||||
{mobileView === 'providers' && <div key="providers"><ProviderSettings /></div>}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
Reference in new issue
Block a user