mirror of
https://github.com/paperclipai/paperclip.git
synced 2026-12-01 18:07:00 +01:00
feat: add experimental Boat configuration and computer viewer surfaces
Co-Authored-By: Paperclip <noreply@paperclip.ing>
This commit is contained in:
1 parent
1dec4c13d1
commit
9525aa80e5
19 files changed
+500
-18
No files matched your search
@@ -0,0 +1,15 @@
|
||||
import type { ComputerViewer, TaskComputer } from "@paperclipai/shared";
|
||||
import { api } from "./client";
|
||||
|
||||
const path = (issueId: string) => `/issues/${encodeURIComponent(issueId)}/computer`;
|
||||
export const computersApi = {
|
||||
get: (issueId: string) => api.get<TaskComputer | null>(path(issueId), { cache: "no-store" }),
|
||||
connect: (issueId: string, environmentId: string) =>
|
||||
api.post<ComputerViewer>(`${path(issueId)}/connect`, { environmentId }),
|
||||
presence: (issueId: string, environmentId: string, owner: ComputerViewer["owner"]) =>
|
||||
api.post<ComputerViewer>(`${path(issueId)}/presence`, { environmentId, owner }),
|
||||
disconnect: (issueId: string, environmentId: string, owner: ComputerViewer["owner"]) =>
|
||||
api.post<void>(`${path(issueId)}/disconnect`, { environmentId, owner }),
|
||||
preview: (issueId: string, environmentId: string, port: number) =>
|
||||
api.post<{ url: string }>(`${path(issueId)}/preview`, { environmentId, port }),
|
||||
};
|
||||
Reference in new issue
Block a user