Simplify workspace creation with inline worktree API

Replace the multi-step new-agent route flow with a single
create_paseo_worktree endpoint that registers the workspace immediately
and creates the git worktree in the background. The sidebar now calls
this endpoint directly and shows a creating spinner inline.

Also auto-resolves the base branch from origin/HEAD when not explicitly
provided, removes the unused Tauri WebSocket transport layer, and
normalizes loopback endpoints to localhost.

Closes #125
This commit is contained in:
Mohamed Boudra
2026-03-19 23:33:35 +07:00
parent 3d4ac57bd0
commit 6ab97c579e
21 changed files with 514 additions and 531 deletions
+19
View File
@@ -936,6 +936,13 @@ export const PaseoWorktreeArchiveRequestSchema = z.object({
requestId: z.string(),
})
export const CreatePaseoWorktreeRequestSchema = z.object({
type: z.literal('create_paseo_worktree_request'),
cwd: z.string(),
worktreeSlug: z.string().optional(),
requestId: z.string(),
})
export const OpenProjectRequestSchema = z.object({
type: z.literal('open_project_request'),
cwd: z.string(),
@@ -1186,6 +1193,7 @@ export const SessionInboundMessageSchema = z.discriminatedUnion('type', [
DirectorySuggestionsRequestSchema,
PaseoWorktreeListRequestSchema,
PaseoWorktreeArchiveRequestSchema,
CreatePaseoWorktreeRequestSchema,
OpenProjectRequestSchema,
ArchiveWorkspaceRequestSchema,
FileExplorerRequestSchema,
@@ -1961,6 +1969,16 @@ export const PaseoWorktreeArchiveResponseSchema = z.object({
}),
})
export const CreatePaseoWorktreeResponseSchema = z.object({
type: z.literal('create_paseo_worktree_response'),
payload: z.object({
workspace: WorkspaceDescriptorPayloadSchema.nullable(),
error: z.string().nullable(),
setupTerminalId: z.string().nullable(),
requestId: z.string(),
}),
})
export const FileExplorerResponseSchema = z.object({
type: z.literal('file_explorer_response'),
payload: z.object({
@@ -2237,6 +2255,7 @@ export const SessionOutboundMessageSchema = z.discriminatedUnion('type', [
DirectorySuggestionsResponseSchema,
PaseoWorktreeListResponseSchema,
PaseoWorktreeArchiveResponseSchema,
CreatePaseoWorktreeResponseSchema,
FileExplorerResponseSchema,
ProjectIconResponseSchema,
FileDownloadTokenResponseSchema,