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:
Ruihang Xia
2025-12-27 21:03:34 +08:00
committed by GitHub
co-authored by weishu
parent 126c5e483c
commit 58e61b3db9
12 changed files with 115 additions and 19 deletions
+7 -2
View File
@@ -227,10 +227,15 @@ export class ApiClient {
return await this.request<MachinesResponse>('/api/machines')
}
async spawnSession(machineId: string, directory: string, agent?: 'claude' | 'codex' | 'gemini'): Promise<SpawnResponse> {
async spawnSession(
machineId: string,
directory: string,
agent?: 'claude' | 'codex' | 'gemini',
yolo?: boolean
): Promise<SpawnResponse> {
return await this.request<SpawnResponse>(`/api/machines/${encodeURIComponent(machineId)}/spawn`, {
method: 'POST',
body: JSON.stringify({ directory, agent })
body: JSON.stringify({ directory, agent, yolo })
})
}
}