Add projects without creating workspaces
Keep the legacy open-project request creating a workspace for old clients; new clients now add projects and create workspaces through separate flows.
This commit is contained in:
@@ -52,6 +52,7 @@ import type {
|
||||
PaseoWorktreeListResponse,
|
||||
PaseoWorktreeArchiveResponse,
|
||||
ProjectIconResponse,
|
||||
ProjectAddResponse,
|
||||
OpenProjectResponseMessage,
|
||||
ArchiveWorkspaceResponseMessage,
|
||||
WorkspaceSetupStatusResponseMessage,
|
||||
@@ -661,6 +662,7 @@ export interface RenameTerminalInput {
|
||||
requestId?: string;
|
||||
}
|
||||
type OpenProjectPayload = OpenProjectResponseMessage["payload"];
|
||||
type ProjectAddPayload = ProjectAddResponse["payload"];
|
||||
type ArchiveWorkspacePayload = ArchiveWorkspaceResponseMessage["payload"];
|
||||
type WorkspaceSetupStatusPayload = WorkspaceSetupStatusResponseMessage["payload"];
|
||||
|
||||
@@ -1884,6 +1886,18 @@ export class DaemonClient {
|
||||
});
|
||||
}
|
||||
|
||||
async addProject(cwd: string, requestId?: string): Promise<ProjectAddPayload> {
|
||||
return this.sendCorrelatedSessionRequest({
|
||||
requestId,
|
||||
message: {
|
||||
type: "project.add.request",
|
||||
cwd,
|
||||
},
|
||||
responseType: "project.add.response",
|
||||
timeout: 10000,
|
||||
});
|
||||
}
|
||||
|
||||
async startWorkspaceScript(
|
||||
workspaceId: string,
|
||||
scriptName: string,
|
||||
|
||||
Reference in New Issue
Block a user