mirror of
https://github.com/openai/codex.git
synced 2026-11-18 23:02:23 +00:00
Support openai/elicitation form requests (#41447)
## What changed - Advertise `openai/elicitation` form support when the client declares an object-valued `form` capability, without deriving it from the legacy `openai/form` capability. - Handle `openai/elicitation/create` requests in `form` mode and forward their metadata and opaque schema through app-server as `openaiForm`, preserving `x-openai-*` annotations. - Keep legacy form handling independent and have the TUI automatically decline the new form requests it cannot render. ## Testing - Add an app-server round-trip test for capability negotiation, request forwarding, and accepted responses. - Extend MCP capability filtering coverage for `openai/elicitation.form`. GitOrigin-RevId: 88f39257bffafe4ee98a9c910e38507843cd7eeb
This commit is contained in:
1 parent
0ae94fdd49
commit
eec4a23cb1
19 files changed
+329
-25
No files matched your search
@@ -755,6 +755,7 @@ pub enum McpServerElicitationRequest {
|
||||
message: String,
|
||||
requested_schema: McpElicitationSchema,
|
||||
},
|
||||
// TODO(victor): Deprecate once migrated to `openai/elicitation/create`.
|
||||
#[serde(rename = "openai/form", rename_all = "camelCase")]
|
||||
#[ts(rename = "openai/form", rename_all = "camelCase")]
|
||||
OpenAiForm {
|
||||
@@ -764,6 +765,15 @@ pub enum McpServerElicitationRequest {
|
||||
message: String,
|
||||
requested_schema: JsonValue,
|
||||
},
|
||||
#[serde(rename = "openaiForm", rename_all = "camelCase")]
|
||||
#[ts(rename = "openaiForm", rename_all = "camelCase")]
|
||||
OpenAiElicitationForm {
|
||||
#[serde(rename = "_meta")]
|
||||
#[ts(rename = "_meta")]
|
||||
meta: Option<JsonValue>,
|
||||
message: String,
|
||||
requested_schema: JsonValue,
|
||||
},
|
||||
#[serde(rename_all = "camelCase")]
|
||||
#[ts(rename_all = "camelCase")]
|
||||
Url {
|
||||
@@ -799,6 +809,15 @@ impl TryFrom<CoreElicitationRequest> for McpServerElicitationRequest {
|
||||
message,
|
||||
requested_schema,
|
||||
}),
|
||||
CoreElicitationRequest::OpenAiElicitationForm {
|
||||
meta,
|
||||
message,
|
||||
requested_schema,
|
||||
} => Ok(Self::OpenAiElicitationForm {
|
||||
meta,
|
||||
message,
|
||||
requested_schema,
|
||||
}),
|
||||
CoreElicitationRequest::Url {
|
||||
meta,
|
||||
message,
|
||||
|
||||
Reference in new issue
Block a user