Add apply_patch code mode result (#15100)

It's empty !
This commit is contained in:
pakrym-oai
2026-03-18 16:11:10 -07:00
committed by GitHub
parent 3590e181fa
commit 56d0c6bf67
3 changed files with 40 additions and 3 deletions
+35
View File
@@ -199,6 +199,41 @@ impl ToolOutput for FunctionToolOutput {
}
}
pub struct ApplyPatchToolOutput {
pub text: String,
}
impl ApplyPatchToolOutput {
pub fn from_text(text: String) -> Self {
Self { text }
}
}
impl ToolOutput for ApplyPatchToolOutput {
fn log_preview(&self) -> String {
telemetry_preview(&self.text)
}
fn success_for_logging(&self) -> bool {
true
}
fn to_response_item(&self, call_id: &str, payload: &ToolPayload) -> ResponseInputItem {
function_tool_response(
call_id,
payload,
vec![FunctionCallOutputContentItem::InputText {
text: self.text.clone(),
}],
Some(true),
)
}
fn code_mode_result(&self, _payload: &ToolPayload) -> JsonValue {
JsonValue::Object(serde_json::Map::new())
}
}
pub struct AbortedToolOutput {
pub message: String,
}