mirror of
https://github.com/wu736139669/hapi.git
synced 2026-08-05 06:24:37 +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'
|
||||
|
||||
@@ -50,6 +50,7 @@ const BUILTIN_COMMANDS: Record<string, SlashCommand[]> = {
|
||||
{ name: 'compress', description: 'Compress the context by replacing it with a summary', source: 'builtin' },
|
||||
{ name: 'stats', description: 'Check session stats', source: 'builtin' },
|
||||
],
|
||||
opencode: [],
|
||||
}
|
||||
|
||||
export function useSlashCommands(
|
||||
|
||||
Reference in New Issue
Block a user