Skip to main content

agent_doc_apply_patch_with_boundary

Function agent_doc_apply_patch_with_boundary 

Source
#[unsafe(no_mangle)]
pub unsafe extern "C" fn agent_doc_apply_patch_with_boundary( doc: *const c_char, component_name: *const c_char, content: *const c_char, mode: *const c_char, boundary_id: *const c_char, ) -> FfiPatchResult
Expand description

Apply a component patch using a boundary marker for insertion point.

When mode is "append" and boundary_id is provided, the content is inserted at the boundary marker position (replacing the marker). This ensures agent responses appear after the prompt that triggered them, even if the user has typed new text below.

Falls back to normal patch application if the boundary is not found.

ยงSafety

All pointers must be valid, non-null, NUL-terminated UTF-8.