import request from "@/servers/useRequest"; import { RequestResponse } from "@/types/interfaces/request"; import { SandboxListResponse } from "@/types/interfaces/sandbox"; /** * 获取沙盒列表 */ export const apiGetSandboxList = (): Promise< RequestResponse > => { return request>({ url: "/api/sandbox/config/select/list", method: "GET", }); }; /** * 更新选中的沙盒 */ export const apiUpdateSelectedSandbox = ( agentId: string, sandboxId: string, ): Promise> => { return request>({ url: `/api/sandbox/config/selected/${agentId}/${sandboxId}`, method: "POST", }); }; /** * 重启智能体 */ export const apiRestartAgent = ( conversationId: number, ): Promise> => { return request>({ url: `/api/computer/agent/stop/${conversationId}`, method: "POST", }); }; /** * 重启容器 */ export const apiRestartSandbox = ( conversationId: number, ): Promise> => { return request>({ url: `/api/computer/pod/restart?cId=${conversationId}`, method: "POST", }); };