mirror of
https://github.com/openai/codex.git
synced 2026-11-13 14:46:14 +00:00
[elicitations] Switch to use MCP style elicitation payload for mcp tool approvals. (#13621)
- [x] Switch to use MCP style elicitation payload for mcp tool approvals. - [ ] TODO: Update the UI to support the full spec.
This commit is contained in:
1 parent
ee1a20258a
commit
98dca99db7
59 files changed
+5165
-100
No files matched your search
@@ -196,10 +196,16 @@ impl ExecApprovalRequestEvent {
|
||||
#[ts(tag = "mode")]
|
||||
pub enum ElicitationRequest {
|
||||
Form {
|
||||
#[serde(rename = "_meta", default, skip_serializing_if = "Option::is_none")]
|
||||
#[ts(optional, rename = "_meta")]
|
||||
meta: Option<JsonValue>,
|
||||
message: String,
|
||||
requested_schema: JsonValue,
|
||||
},
|
||||
Url {
|
||||
#[serde(rename = "_meta", default, skip_serializing_if = "Option::is_none")]
|
||||
#[ts(optional, rename = "_meta")]
|
||||
meta: Option<JsonValue>,
|
||||
message: String,
|
||||
url: String,
|
||||
elicitation_id: String,
|
||||
@@ -216,6 +222,10 @@ impl ElicitationRequest {
|
||||
|
||||
#[derive(Debug, Clone, Deserialize, Serialize, PartialEq, JsonSchema, TS)]
|
||||
pub struct ElicitationRequestEvent {
|
||||
/// Turn ID that this elicitation belongs to, when known.
|
||||
#[serde(default, skip_serializing_if = "Option::is_none")]
|
||||
#[ts(optional)]
|
||||
pub turn_id: Option<String>,
|
||||
pub server_name: String,
|
||||
#[ts(type = "string | number")]
|
||||
pub id: RequestId,
|
||||
|
||||
Reference in new issue
Block a user