feat: get_available_thinking_levels rpc (#6865)

This commit is contained in:
Cristina Poncela Cubeiro
2026-07-20 16:29:10 +02:00
committed by GitHub
parent 1942b2600f
commit c179395218
5 changed files with 63 additions and 0 deletions
@@ -280,6 +280,14 @@ export class RpcClient {
return this.getData(response);
}
/**
* Get list of available thinking levels for the current model.
*/
async getAvailableThinkingLevels(): Promise<ThinkingLevel[]> {
const response = await this.send({ type: "get_available_thinking_levels" });
return this.getData<{ levels: ThinkingLevel[] }>(response).levels;
}
/**
* Set steering mode.
*/
@@ -504,6 +504,11 @@ export async function runRpcMode(runtimeHost: AgentSessionRuntime): Promise<neve
return success(id, "cycle_thinking_level", { level });
}
case "get_available_thinking_levels": {
const levels = session.getAvailableThinkingLevels();
return success(id, "get_available_thinking_levels", { levels });
}
// =================================================================
// Queue Modes
// =================================================================
@@ -36,6 +36,7 @@ export type RpcCommand =
// Thinking
| { id?: string; type: "set_thinking_level"; level: ThinkingLevel }
| { id?: string; type: "cycle_thinking_level" }
| { id?: string; type: "get_available_thinking_levels" }
// Queue modes
| { id?: string; type: "set_steering_mode"; mode: "all" | "one-at-a-time" }
@@ -154,6 +155,13 @@ export type RpcResponse =
success: true;
data: { level: ThinkingLevel } | null;
}
| {
id?: string;
type: "response";
command: "get_available_thinking_levels";
success: true;
data: { levels: ThinkingLevel[] };
}
// Queue modes
| { id?: string; type: "response"; command: "set_steering_mode"; success: true }