mirror of
https://github.com/wu736139669/hapi.git
synced 2026-08-08 07:17:39 +00:00
Add Codex model selection
This commit is contained in:
@@ -4,6 +4,8 @@ import { killProcessByChildProcess } from '@/utils/process';
|
||||
import type {
|
||||
InitializeParams,
|
||||
InitializeResponse,
|
||||
ModelListParams,
|
||||
ModelListResponse,
|
||||
ThreadStartParams,
|
||||
ThreadStartResponse,
|
||||
ThreadResumeParams,
|
||||
@@ -133,6 +135,13 @@ export class CodexAppServerClient {
|
||||
return response as InitializeResponse;
|
||||
}
|
||||
|
||||
async listModels(params?: ModelListParams): Promise<ModelListResponse> {
|
||||
const response = await this.sendRequest('model/list', params ?? {}, {
|
||||
timeoutMs: 30_000
|
||||
});
|
||||
return response as ModelListResponse;
|
||||
}
|
||||
|
||||
async startThread(params: ThreadStartParams, options?: { signal?: AbortSignal }): Promise<ThreadStartResponse> {
|
||||
const response = await this.sendRequest('thread/start', params, {
|
||||
signal: options?.signal,
|
||||
|
||||
Reference in New Issue
Block a user