mirror of
https://github.com/openai/codex.git
synced 2026-04-24 14:45:27 +00:00
feat: model warning in case of apply patch (#7494)
This commit is contained in:
@@ -181,6 +181,12 @@ pub(crate) async fn intercept_apply_patch(
|
||||
) -> Result<Option<ToolOutput>, FunctionCallError> {
|
||||
match codex_apply_patch::maybe_parse_apply_patch_verified(command, cwd) {
|
||||
codex_apply_patch::MaybeApplyPatchVerified::Body(changes) => {
|
||||
session
|
||||
.record_model_warning(
|
||||
format!("apply_patch was requested via {tool_name}. Use the apply_patch tool instead of exec_command."),
|
||||
turn,
|
||||
)
|
||||
.await;
|
||||
match apply_patch::apply_patch(session, turn, call_id, changes).await {
|
||||
InternalApplyPatchInvocation::Output(item) => {
|
||||
let content = item?;
|
||||
|
||||
Reference in New Issue
Block a user