mirror of
https://github.com/getpaseo/paseo.git
synced 2026-07-29 12:01:31 +00:00
Update workspace and app changes
This commit is contained in:
@@ -33,6 +33,8 @@ import type {
|
||||
PaseoWorktreeListResponse,
|
||||
PaseoWorktreeArchiveResponse,
|
||||
ProjectIconResponse,
|
||||
OpenProjectResponseMessage,
|
||||
ArchiveWorkspaceResponseMessage,
|
||||
ListCommandsResponse,
|
||||
ListProviderModelsResponseMessage,
|
||||
ListAvailableProvidersResponse,
|
||||
@@ -305,6 +307,8 @@ export type FetchWorkspacesOptions = Omit<FetchWorkspacesRequest, 'type' | 'requ
|
||||
}
|
||||
export type FetchWorkspacesEntry = FetchWorkspacesPayload['entries'][number]
|
||||
export type FetchWorkspacesPageInfo = FetchWorkspacesPayload['pageInfo']
|
||||
type OpenProjectPayload = OpenProjectResponseMessage['payload']
|
||||
type ArchiveWorkspacePayload = ArchiveWorkspaceResponseMessage['payload']
|
||||
|
||||
export type FetchAgentResult = {
|
||||
agent: AgentSnapshotPayload
|
||||
@@ -1143,6 +1147,30 @@ export class DaemonClient {
|
||||
})
|
||||
}
|
||||
|
||||
async openProject(cwd: string, requestId?: string): Promise<OpenProjectPayload> {
|
||||
return this.sendCorrelatedSessionRequest({
|
||||
requestId,
|
||||
message: {
|
||||
type: 'open_project_request',
|
||||
cwd,
|
||||
},
|
||||
responseType: 'open_project_response',
|
||||
timeout: 10000,
|
||||
})
|
||||
}
|
||||
|
||||
async archiveWorkspace(workspaceId: string, requestId?: string): Promise<ArchiveWorkspacePayload> {
|
||||
return this.sendCorrelatedSessionRequest({
|
||||
requestId,
|
||||
message: {
|
||||
type: 'archive_workspace_request',
|
||||
workspaceId,
|
||||
},
|
||||
responseType: 'archive_workspace_response',
|
||||
timeout: 10000,
|
||||
})
|
||||
}
|
||||
|
||||
async fetchAgent(agentId: string, requestId?: string): Promise<FetchAgentResult | null> {
|
||||
const resolvedRequestId = this.createRequestId(requestId)
|
||||
const message = SessionInboundMessageSchema.parse({
|
||||
|
||||
Reference in New Issue
Block a user