mirror of
https://github.com/wu736139669/hapi.git
synced 2026-08-05 06:24:37 +00:00
Add Codex model selection
This commit is contained in:
@@ -10,6 +10,7 @@ import type {
|
||||
MachinePathsExistsResponse,
|
||||
MachinesResponse,
|
||||
MessagesResponse,
|
||||
CodexModelsResponse,
|
||||
PermissionMode,
|
||||
PushSubscriptionPayload,
|
||||
PushUnsubscribePayload,
|
||||
@@ -407,6 +408,18 @@ export class ApiClient {
|
||||
})
|
||||
}
|
||||
|
||||
async getMachineCodexModels(machineId: string): Promise<CodexModelsResponse> {
|
||||
return await this.request<CodexModelsResponse>(
|
||||
`/api/machines/${encodeURIComponent(machineId)}/codex-models`
|
||||
)
|
||||
}
|
||||
|
||||
async getSessionCodexModels(sessionId: string): Promise<CodexModelsResponse> {
|
||||
return await this.request<CodexModelsResponse>(
|
||||
`/api/sessions/${encodeURIComponent(sessionId)}/codex-models`
|
||||
)
|
||||
}
|
||||
|
||||
async getSlashCommands(sessionId: string): Promise<SlashCommandsResponse> {
|
||||
return await this.request<SlashCommandsResponse>(
|
||||
`/api/sessions/${encodeURIComponent(sessionId)}/slash-commands`
|
||||
|
||||
Reference in New Issue
Block a user