# DiffMessage

> **Class** in `deepagents_code`

📖 [View in docs](https://reference.langchain.com/python/deepagents-code/tui/widgets/messages/DiffMessage)

Widget displaying a diff with syntax highlighting.

## Signature

```python
DiffMessage(
    self,
    diff_content: str,
    file_path: str = '',
    *,
    tool_name: str | None = None,
    **kwargs: Any = {},
)
```

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| `diff_content` | `str` | Yes | The unified diff content |
| `file_path` | `str` | No | Path to the file being modified (default: `''`) |
| `tool_name` | `str \| None` | No | Name of the file tool that produced the diff (default: `None`) |
| `**kwargs` | `Any` | No | Additional arguments passed to parent (default: `{}`) |

## Extends

- `Static`

## Constructors

```python
__init__(
    self,
    diff_content: str,
    file_path: str = '',
    *,
    tool_name: str | None = None,
    **kwargs: Any = {},
) -> None
```

| Name | Type |
|------|------|
| `diff_content` | `str` |
| `file_path` | `str` |
| `tool_name` | `str \| None` |


## Properties

- `DEFAULT_CSS`

## Methods

- [`compose()`](https://reference.langchain.com/python/deepagents-code/tui/widgets/messages/DiffMessage/compose)
- [`on_mount()`](https://reference.langchain.com/python/deepagents-code/tui/widgets/messages/DiffMessage/on_mount)

---

[View source on GitHub](https://github.com/langchain-ai/deepagents/blob/e14e0adcbe78565ed3650e7f24b2a775d5437d25/libs/code/deepagents_code/tui/widgets/messages.py#L3430)