mirror of
https://github.com/openai/codex.git
synced 2026-04-24 14:45:27 +00:00
add uuid to metadata
This commit is contained in:
@@ -2815,8 +2815,11 @@ mod tests {
|
||||
use codex_protocol::items::HookPromptFragment;
|
||||
use codex_protocol::items::build_hook_prompt_message;
|
||||
use codex_protocol::mcp::CallToolResult;
|
||||
use codex_protocol::models::ContentItem;
|
||||
use codex_protocol::models::FileSystemPermissions as CoreFileSystemPermissions;
|
||||
use codex_protocol::models::NetworkPermissions as CoreNetworkPermissions;
|
||||
use codex_protocol::models::ResponseItem;
|
||||
use codex_protocol::models::ResponseItemMetadata;
|
||||
use codex_protocol::plan_tool::PlanItemArg;
|
||||
use codex_protocol::plan_tool::StepStatus;
|
||||
use codex_protocol::protocol::CollabResumeBeginEvent;
|
||||
|
||||
@@ -46,7 +46,12 @@ pub struct Prompt {
|
||||
|
||||
impl Prompt {
|
||||
pub(crate) fn get_formatted_input(&self) -> Vec<ResponseItem> {
|
||||
let mut input = self.input.clone();
|
||||
let mut input: Vec<ResponseItem> = self
|
||||
.input
|
||||
.clone()
|
||||
.into_iter()
|
||||
.map(ResponseItem::with_generated_metadata_uuid)
|
||||
.collect();
|
||||
|
||||
// when using the *Freeform* apply_patch tool specifically, tool outputs
|
||||
// should be structured text, not json. Do NOT reserialize when using
|
||||
|
||||
@@ -107,6 +107,13 @@ impl ApprovalOutcomeMetadata {
|
||||
approval_source,
|
||||
}
|
||||
}
|
||||
|
||||
pub(crate) fn policy() -> Self {
|
||||
Self {
|
||||
review_decision: None,
|
||||
approval_source: ApprovalSourceMetadata::Policy,
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
impl ActiveTurn {
|
||||
|
||||
Reference in New Issue
Block a user