mirror of
https://github.com/wu736139669/hapi.git
synced 2026-08-05 06:24:37 +00:00
feat: add directory autocomplete with validation for new session form
This commit is contained in:
@@ -3,6 +3,7 @@ import type {
|
||||
FileReadResponse,
|
||||
FileSearchResponse,
|
||||
GitCommandResponse,
|
||||
MachinePathsExistsResponse,
|
||||
MachinesResponse,
|
||||
MessagesResponse,
|
||||
SlashCommandsResponse,
|
||||
@@ -228,6 +229,19 @@ export class ApiClient {
|
||||
return await this.request<MachinesResponse>('/api/machines')
|
||||
}
|
||||
|
||||
async checkMachinePathsExists(
|
||||
machineId: string,
|
||||
paths: string[]
|
||||
): Promise<MachinePathsExistsResponse> {
|
||||
return await this.request<MachinePathsExistsResponse>(
|
||||
`/api/machines/${encodeURIComponent(machineId)}/paths/exists`,
|
||||
{
|
||||
method: 'POST',
|
||||
body: JSON.stringify({ paths })
|
||||
}
|
||||
)
|
||||
}
|
||||
|
||||
async spawnSession(
|
||||
machineId: string,
|
||||
directory: string,
|
||||
|
||||
Reference in New Issue
Block a user