# BranchLabel

> **Class** in `deepagents_code`

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

A label that displays the git branch with glyph-aware truncation.

Unlike CSS `text-overflow: ellipsis` (which always uses the Unicode
ellipsis character), this widget truncates manually in :meth:`render` using
:func:`get_glyphs` so ASCII mode (`DEEPAGENTS_CODE_UI_CHARSET_MODE=ascii`)
gets `"..."` instead of `"…"`.

## Signature

```python
BranchLabel()
```

## Extends

- `Widget`

## Properties

- `branch`

## Methods

- [`get_content_width()`](https://reference.langchain.com/python/deepagents-code/tui/widgets/status/BranchLabel/get_content_width)
- [`render()`](https://reference.langchain.com/python/deepagents-code/tui/widgets/status/BranchLabel/render)

---

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