# build_approval_preview

> **Function** in `deepagents_code`

📖 [View in docs](https://reference.langchain.com/python/deepagents-code/file_ops/build_approval_preview)

Collect summary info and diff for HITL approvals.

## Signature

```python
build_approval_preview(
    tool_name: str,
    args: dict[str, Any],
    assistant_id: str | None,
) -> ApprovalPreview | None
```

## Returns

`ApprovalPreview | None`

ApprovalPreview with diff and details, or None if tool not supported.

---

[View source on GitHub](https://github.com/langchain-ai/deepagents/blob/0412009c5441bef8d75a427e1da8909e33ab5b56/libs/code/deepagents_code/file_ops.py#L169)