mirror of
https://github.com/wu736139669/hapi.git
synced 2026-11-12 02:28:05 +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:
@@ -70,13 +70,21 @@ export class ApiMachineClient {
|
||||
|
||||
setRPCHandlers({ spawnSession, stopSession, requestShutdown }: MachineRpcHandlers): void {
|
||||
this.rpcHandlerManager.registerHandler('spawn-happy-session', async (params: any) => {
|
||||
const { directory, sessionId, machineId, approvedNewDirectoryCreation, agent, token } = params || {}
|
||||
const { directory, sessionId, machineId, approvedNewDirectoryCreation, agent, yolo, token } = params || {}
|
||||
|
||||
if (!directory) {
|
||||
throw new Error('Directory is required')
|
||||
}
|
||||
|
||||
const result = await spawnSession({ directory, sessionId, machineId, approvedNewDirectoryCreation, agent, token })
|
||||
const result = await spawnSession({
|
||||
directory,
|
||||
sessionId,
|
||||
machineId,
|
||||
approvedNewDirectoryCreation,
|
||||
agent,
|
||||
yolo,
|
||||
token
|
||||
})
|
||||
|
||||
switch (result.type) {
|
||||
case 'success':
|
||||
|
||||
Reference in New Issue
Block a user