mirror of
https://github.com/wu736139669/hapi.git
synced 2026-08-08 07:17:39 +00:00
feat: support opencode
This commit is contained in:
@@ -62,7 +62,7 @@ export function useSessionActions(
|
||||
if (!api || !sessionId) {
|
||||
throw new Error('Session unavailable')
|
||||
}
|
||||
const isKnownFlavor = agentFlavor === 'claude' || agentFlavor === 'codex' || agentFlavor === 'gemini'
|
||||
const isKnownFlavor = agentFlavor === 'claude' || agentFlavor === 'codex' || agentFlavor === 'gemini' || agentFlavor === 'opencode'
|
||||
if (isKnownFlavor && !isPermissionModeAllowedForFlavor(mode, agentFlavor)) {
|
||||
throw new Error('Invalid permission mode for session flavor')
|
||||
}
|
||||
|
||||
@@ -6,7 +6,7 @@ import { queryKeys } from '@/lib/query-keys'
|
||||
type SpawnInput = {
|
||||
machineId: string
|
||||
directory: string
|
||||
agent?: 'claude' | 'codex' | 'gemini'
|
||||
agent?: 'claude' | 'codex' | 'gemini' | 'opencode'
|
||||
model?: string
|
||||
yolo?: boolean
|
||||
sessionType?: 'simple' | 'worktree'
|
||||
|
||||
Reference in New Issue
Block a user