schema cleanup

This commit is contained in:
Roy Han
2026-03-26 00:41:48 -07:00
parent 25ca65296a
commit e1f9d57bc8
8 changed files with 79 additions and 2 deletions
@@ -2457,6 +2457,13 @@
},
"type": "object"
},
"SubmissionType": {
"enum": [
"prompt",
"prompt_queued"
],
"type": "string"
},
"TextElement": {
"properties": {
"byteRange": {
@@ -3225,6 +3232,17 @@
],
"description": "Override the service tier for this turn and subsequent turns."
},
"submissionType": {
"anyOf": [
{
"$ref": "#/definitions/SubmissionType"
},
{
"type": "null"
}
],
"description": "Classify the primary input message submitted with `turn/start`."
},
"summary": {
"anyOf": [
{
@@ -11888,6 +11888,13 @@
}
]
},
"SubmissionType": {
"enum": [
"prompt",
"prompt_queued"
],
"type": "string"
},
"TerminalInteractionNotification": {
"$schema": "http://json-schema.org/draft-07/schema#",
"properties": {
@@ -14418,6 +14425,17 @@
],
"description": "Override the service tier for this turn and subsequent turns."
},
"submissionType": {
"anyOf": [
{
"$ref": "#/definitions/v2/SubmissionType"
},
{
"type": "null"
}
],
"description": "Classify the primary input message submitted with `turn/start`."
},
"summary": {
"anyOf": [
{
@@ -9635,6 +9635,13 @@
}
]
},
"SubmissionType": {
"enum": [
"prompt",
"prompt_queued"
],
"type": "string"
},
"TerminalInteractionNotification": {
"$schema": "http://json-schema.org/draft-07/schema#",
"properties": {
@@ -12165,6 +12172,17 @@
],
"description": "Override the service tier for this turn and subsequent turns."
},
"submissionType": {
"anyOf": [
{
"$ref": "#/definitions/SubmissionType"
},
{
"type": "null"
}
],
"description": "Classify the primary input message submitted with `turn/start`."
},
"summary": {
"anyOf": [
{
@@ -354,6 +354,13 @@
],
"type": "object"
},
"SubmissionType": {
"enum": [
"prompt",
"prompt_queued"
],
"type": "string"
},
"TextElement": {
"properties": {
"byteRange": {
@@ -595,6 +602,17 @@
],
"description": "Override the service tier for this turn and subsequent turns."
},
"submissionType": {
"anyOf": [
{
"$ref": "#/definitions/SubmissionType"
},
{
"type": "null"
}
],
"description": "Classify the primary input message submitted with `turn/start`."
},
"summary": {
"anyOf": [
{
@@ -67,6 +67,7 @@ export type { ServiceTier } from "./ServiceTier";
export type { SessionSource } from "./SessionSource";
export type { Settings } from "./Settings";
export type { SubAgentSource } from "./SubAgentSource";
export type { SubmissionType } from "./SubmissionType";
export type { ThreadId } from "./ThreadId";
export type { Tool } from "./Tool";
export type { Verbosity } from "./Verbosity";
@@ -6,6 +6,7 @@ import type { Personality } from "../Personality";
import type { ReasoningEffort } from "../ReasoningEffort";
import type { ReasoningSummary } from "../ReasoningSummary";
import type { ServiceTier } from "../ServiceTier";
import type { SubmissionType } from "../SubmissionType";
import type { JsonValue } from "../serde_json/JsonValue";
import type { ApprovalsReviewer } from "./ApprovalsReviewer";
import type { AskForApproval } from "./AskForApproval";
@@ -41,6 +42,9 @@ summary?: ReasoningSummary | null, /**
* Override the personality for this turn and subsequent turns.
*/
personality?: Personality | null, /**
* Classify the primary input message submitted with `turn/start`.
*/
submissionType?: SubmissionType | null, /**
* Optional JSON Schema used to constrain the final assistant message for
* this turn.
*/
+1 -1
View File
@@ -217,7 +217,7 @@ async fn user_turn_tracks_turn_metadata_analytics() -> anyhow::Result<()> {
event_params["product_client_id"],
serde_json::json!(codex_core::default_client::originator().value)
);
assert_eq!(event_params["submission_type"], "prompt");
assert_eq!(event_params["submission_type"], "default");
assert_eq!(event_params["model"], session_configured.model);
assert_eq!(event_params["model_provider"], config.model_provider_id);
assert_eq!(event_params["reasoning_effort"], "high");
+1 -1
View File
@@ -5327,7 +5327,7 @@ impl ChatWidget {
}
fn submit_user_message(&mut self, user_message: UserMessage) {
self.submit_user_message_with_type(user_message, None);
self.submit_user_message_with_type(user_message, /*submission_type*/ None);
}
fn submit_user_message_with_type(