# ChatInputBox

> **Class** in `deepagents_code`

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

Bordered box that owns the chat composer size.

Sizing is either automatic (content-driven, the default) or manual, and
`_requested_height` is the discriminator: `None` means automatic.

A manual size separates *intent* from what is *rendered*. The requested
height is what the user dragged to and is preserved verbatim; the applied
height is re-derived on every relayout by fitting that request between a
content floor and whichever ceiling is currently tightest. So a completion
popup can transiently squeeze the composer and it springs back when the
popup closes, and a terminal shrink does not destroy the request.

`ChatInput` composes the children and drives this box through
`set_manual_height`, `toggle_expanded`, and `refresh_content_height`.

## Signature

```python
ChatInputBox(
    self,
    kwargs: Any = {},
)
```

## Extends

- `Vertical`

## Constructors

```python
__init__(
    self,
    kwargs: Any = {},
) -> None
```

| Name | Type |
|------|------|
| `kwargs` | `Any` |


## Methods

- [`on_mount()`](https://reference.langchain.com/python/deepagents-code/tui/widgets/chat_input/ChatInputBox/on_mount)
- [`set_manual_height()`](https://reference.langchain.com/python/deepagents-code/tui/widgets/chat_input/ChatInputBox/set_manual_height)
- [`refresh_content_height()`](https://reference.langchain.com/python/deepagents-code/tui/widgets/chat_input/ChatInputBox/refresh_content_height)
- [`toggle_expanded()`](https://reference.langchain.com/python/deepagents-code/tui/widgets/chat_input/ChatInputBox/toggle_expanded)
- [`on_completion_popup_rows_changed()`](https://reference.langchain.com/python/deepagents-code/tui/widgets/chat_input/ChatInputBox/on_completion_popup_rows_changed)
- [`on_prompt_search_panel_rows_changed()`](https://reference.langchain.com/python/deepagents-code/tui/widgets/chat_input/ChatInputBox/on_prompt_search_panel_rows_changed)
- [`on_resize()`](https://reference.langchain.com/python/deepagents-code/tui/widgets/chat_input/ChatInputBox/on_resize)

---

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