feat: add structured session picker

This commit is contained in:
Miguel Palhas
2026-09-06 16:18:33 +01:00
parent c3d008d07f
commit ba7fd68004
16 changed files with 829 additions and 30 deletions
+28
View File
@@ -436,6 +436,7 @@ export interface ReducedState {
context?: AcpUsage | null;
model?: string | null;
mode?: string | null;
config_options?: { configOptions: AcpSessionConfigOption[] } | null;
}
/** Server messages on `WS /api/structured/:id`. */
@@ -449,6 +450,33 @@ export interface StructuredPromptRequest {
prompt: string;
}
export interface StructuredConfigRequest {
config_id: string;
value: string | boolean;
}
export interface AcpSessionConfigChoice {
value: string;
name: string;
description?: string | null;
}
export interface AcpSessionConfigGroup {
group: string;
name: string;
options: AcpSessionConfigChoice[];
}
export interface AcpSessionConfigOption {
id: string;
name: string;
description?: string | null;
category?: string | null;
type: "select" | "boolean" | string;
currentValue: string | boolean;
options?: Array<AcpSessionConfigChoice | AcpSessionConfigGroup>;
}
/** `POST /api/sessions/:id/structured/approvals/:nonce` body — a bare JSON
* string (a bracketless Rust enum), not `{decision: ...}`. */
export type StructuredApprovalDecision = "allow_once" | "allow_for_session" | "deny";