feat(core): allow external workspace creation (#26212)

This commit is contained in:
James Long
2026-05-08 11:09:12 -04:00
committed by GitHub
parent c36ab3f935
commit c818c9dcb6
21 changed files with 2039 additions and 145 deletions

View File

@@ -36,6 +36,7 @@ import type {
ExperimentalWorkspaceRemoveErrors,
ExperimentalWorkspaceRemoveResponses,
ExperimentalWorkspaceStatusResponses,
ExperimentalWorkspaceSyncListResponses,
ExperimentalWorkspaceWarpErrors,
ExperimentalWorkspaceWarpResponses,
FileListResponses,
@@ -949,6 +950,36 @@ export class Workspace extends HeyApiClient {
})
}
/**
* Sync workspace list
*
* Register missing workspaces returned by workspace adapters.
*/
public syncList<ThrowOnError extends boolean = false>(
parameters?: {
directory?: string
workspace?: string
},
options?: Options<never, ThrowOnError>,
) {
const params = buildClientParams(
[parameters],
[
{
args: [
{ in: "query", key: "directory" },
{ in: "query", key: "workspace" },
],
},
],
)
return (options?.client ?? this.client).post<ExperimentalWorkspaceSyncListResponses, unknown, ThrowOnError>({
url: "/experimental/workspace/sync-list",
...options,
...params,
})
}
/**
* Workspace status
*

View File

@@ -1755,6 +1755,7 @@ export type Workspace = {
directory: string | null
extra: unknown | null
projectID: string
timeUsed: number | "NaN" | "Infinity" | "-Infinity" | "Infinity" | "-Infinity" | "NaN"
}
export type WorkspaceWarpError = {
@@ -6706,6 +6707,26 @@ export type ExperimentalWorkspaceCreateResponses = {
export type ExperimentalWorkspaceCreateResponse =
ExperimentalWorkspaceCreateResponses[keyof ExperimentalWorkspaceCreateResponses]
export type ExperimentalWorkspaceSyncListData = {
body?: never
path?: never
query?: {
directory?: string
workspace?: string
}
url: "/experimental/workspace/sync-list"
}
export type ExperimentalWorkspaceSyncListResponses = {
/**
* Workspace list synced
*/
204: void
}
export type ExperimentalWorkspaceSyncListResponse =
ExperimentalWorkspaceSyncListResponses[keyof ExperimentalWorkspaceSyncListResponses]
export type ExperimentalWorkspaceStatusData = {
body?: never
path?: never