diff --git a/mobile/src/lib/api.ts b/mobile/src/lib/api.ts index 42f5b1fc..c3942245 100644 --- a/mobile/src/lib/api.ts +++ b/mobile/src/lib/api.ts @@ -151,7 +151,7 @@ function createClient() { get: (input: { name: string }) => Promise create: (input: CreateWorkspaceRequest) => Promise delete: (input: { name: string }) => Promise<{ success: boolean }> - start: (input: { name: string }) => Promise + start: (input: { name: string; clone?: string; env?: Record }) => Promise stop: (input: { name: string }) => Promise logs: (input: { name: string; tail?: number }) => Promise sync: (input: { name: string }) => Promise<{ success: boolean }> @@ -230,7 +230,8 @@ export const api = { getWorkspace: (name: string) => client.workspaces.get({ name }), createWorkspace: (data: CreateWorkspaceRequest) => client.workspaces.create(data), deleteWorkspace: (name: string) => client.workspaces.delete({ name }), - startWorkspace: (name: string) => client.workspaces.start({ name }), + startWorkspace: (name: string, options?: { clone?: string; env?: Record }) => + client.workspaces.start({ name, clone: options?.clone, env: options?.env }), stopWorkspace: (name: string) => client.workspaces.stop({ name }), getLogs: (name: string, tail = 100) => client.workspaces.logs({ name, tail }), syncWorkspace: (name: string) => client.workspaces.sync({ name }), diff --git a/web/src/lib/api.ts b/web/src/lib/api.ts index 4417f95e..ac8cb52f 100644 --- a/web/src/lib/api.ts +++ b/web/src/lib/api.ts @@ -53,7 +53,7 @@ const client = createORPCClient<{ get: (input: { name: string }) => Promise create: (input: CreateWorkspaceRequest) => Promise delete: (input: { name: string }) => Promise<{ success: boolean }> - start: (input: { name: string }) => Promise + start: (input: { name: string; clone?: string; env?: Record }) => Promise stop: (input: { name: string }) => Promise logs: (input: { name: string; tail?: number }) => Promise sync: (input: { name: string }) => Promise<{ success: boolean }> @@ -107,7 +107,8 @@ export const api = { getWorkspace: (name: string) => client.workspaces.get({ name }), createWorkspace: (data: CreateWorkspaceRequest) => client.workspaces.create(data), deleteWorkspace: (name: string) => client.workspaces.delete({ name }), - startWorkspace: (name: string) => client.workspaces.start({ name }), + startWorkspace: (name: string, options?: { clone?: string; env?: Record }) => + client.workspaces.start({ name, clone: options?.clone, env: options?.env }), stopWorkspace: (name: string) => client.workspaces.stop({ name }), getLogs: (name: string, tail = 100) => client.workspaces.logs({ name, tail }), syncWorkspace: (name: string) => client.workspaces.sync({ name }),