mirror of
https://github.com/wu736139669/hapi.git
synced 2026-08-08 07:17:39 +00:00
Add Codex clear and compact slash commands (#541)
* Add Codex clear and compact slash commands * Stabilize queued thinking event test * Interrupt active Codex turn before slash commands
This commit is contained in:
@@ -13,7 +13,9 @@ import type {
|
||||
TurnStartParams,
|
||||
TurnStartResponse,
|
||||
TurnInterruptParams,
|
||||
TurnInterruptResponse
|
||||
TurnInterruptResponse,
|
||||
ThreadCompactStartParams,
|
||||
ThreadCompactStartResponse
|
||||
} from './appServerTypes';
|
||||
|
||||
type JsonRpcLiteRequest = {
|
||||
@@ -173,6 +175,17 @@ export class CodexAppServerClient {
|
||||
return response as TurnInterruptResponse;
|
||||
}
|
||||
|
||||
async compactThread(
|
||||
params: ThreadCompactStartParams,
|
||||
options?: { signal?: AbortSignal }
|
||||
): Promise<ThreadCompactStartResponse> {
|
||||
const response = await this.sendRequest('thread/compact/start', params, {
|
||||
signal: options?.signal,
|
||||
timeoutMs: CodexAppServerClient.DEFAULT_TIMEOUT_MS
|
||||
});
|
||||
return response as ThreadCompactStartResponse;
|
||||
}
|
||||
|
||||
async disconnect(): Promise<void> {
|
||||
if (!this.connected) {
|
||||
return;
|
||||
|
||||
Reference in New Issue
Block a user