mirror of
https://github.com/wu736139669/hapi.git
synced 2026-08-08 07:17:39 +00:00
feat: create new session with yolo mode (#13)
* feat: create new session with yolo mode Signed-off-by: Ruihang Xia <waynestxia@gmail.com> * fix: harden sequence typecheck * feat: add unified --yolo flag across all agents --------- Signed-off-by: Ruihang Xia <waynestxia@gmail.com> Co-authored-by: weishu <twsxtd@gmail.com>
This commit is contained in:
@@ -7,6 +7,7 @@ type SpawnInput = {
|
||||
machineId: string
|
||||
directory: string
|
||||
agent?: 'claude' | 'codex' | 'gemini'
|
||||
yolo?: boolean
|
||||
}
|
||||
|
||||
export function useSpawnSession(api: ApiClient | null): {
|
||||
@@ -21,7 +22,7 @@ export function useSpawnSession(api: ApiClient | null): {
|
||||
if (!api) {
|
||||
throw new Error('API unavailable')
|
||||
}
|
||||
return await api.spawnSession(input.machineId, input.directory, input.agent)
|
||||
return await api.spawnSession(input.machineId, input.directory, input.agent, input.yolo)
|
||||
},
|
||||
onSuccess: () => {
|
||||
void queryClient.invalidateQueries({ queryKey: queryKeys.sessions })
|
||||
|
||||
Reference in New Issue
Block a user