mirror of
https://github.com/wu736139669/hapi.git
synced 2026-08-08 07:17:39 +00:00
feat: support Codex goal slash command
This commit is contained in:
@@ -16,7 +16,15 @@ import type {
|
||||
TurnInterruptParams,
|
||||
TurnInterruptResponse,
|
||||
ThreadCompactStartParams,
|
||||
ThreadCompactStartResponse
|
||||
ThreadCompactStartResponse,
|
||||
ThreadGoalSetParams,
|
||||
ThreadGoalSetResponse,
|
||||
ThreadGoalGetParams,
|
||||
ThreadGoalGetResponse,
|
||||
ThreadGoalClearParams,
|
||||
ThreadGoalClearResponse,
|
||||
ExperimentalFeatureEnablementSetParams,
|
||||
ExperimentalFeatureEnablementSetResponse
|
||||
} from './appServerTypes';
|
||||
|
||||
type JsonRpcLiteRequest = {
|
||||
@@ -153,6 +161,15 @@ export class CodexAppServerClient {
|
||||
return response as CollaborationModeListResponse;
|
||||
}
|
||||
|
||||
async setExperimentalFeatureEnablement(
|
||||
params: ExperimentalFeatureEnablementSetParams
|
||||
): Promise<ExperimentalFeatureEnablementSetResponse> {
|
||||
const response = await this.sendRequest('experimentalFeature/enablement/set', params, {
|
||||
timeoutMs: 30_000
|
||||
});
|
||||
return response as ExperimentalFeatureEnablementSetResponse;
|
||||
}
|
||||
|
||||
async startThread(params: ThreadStartParams, options?: { signal?: AbortSignal }): Promise<ThreadStartResponse> {
|
||||
const response = await this.sendRequest('thread/start', params, {
|
||||
signal: options?.signal,
|
||||
@@ -195,6 +212,39 @@ export class CodexAppServerClient {
|
||||
return response as ThreadCompactStartResponse;
|
||||
}
|
||||
|
||||
async setThreadGoal(
|
||||
params: ThreadGoalSetParams,
|
||||
options?: { signal?: AbortSignal }
|
||||
): Promise<ThreadGoalSetResponse> {
|
||||
const response = await this.sendRequest('thread/goal/set', params, {
|
||||
signal: options?.signal,
|
||||
timeoutMs: 30_000
|
||||
});
|
||||
return response as ThreadGoalSetResponse;
|
||||
}
|
||||
|
||||
async getThreadGoal(
|
||||
params: ThreadGoalGetParams,
|
||||
options?: { signal?: AbortSignal }
|
||||
): Promise<ThreadGoalGetResponse> {
|
||||
const response = await this.sendRequest('thread/goal/get', params, {
|
||||
signal: options?.signal,
|
||||
timeoutMs: 30_000
|
||||
});
|
||||
return response as ThreadGoalGetResponse;
|
||||
}
|
||||
|
||||
async clearThreadGoal(
|
||||
params: ThreadGoalClearParams,
|
||||
options?: { signal?: AbortSignal }
|
||||
): Promise<ThreadGoalClearResponse> {
|
||||
const response = await this.sendRequest('thread/goal/clear', params, {
|
||||
signal: options?.signal,
|
||||
timeoutMs: 30_000
|
||||
});
|
||||
return response as ThreadGoalClearResponse;
|
||||
}
|
||||
|
||||
async disconnect(): Promise<void> {
|
||||
if (!this.connected) {
|
||||
return;
|
||||
|
||||
Reference in New Issue
Block a user