# ThreadOption

> **Class** in `deepagents_cli`

📖 [View in docs](https://reference.langchain.com/python/deepagents-cli/widgets/thread_selector/ThreadOption)

A clickable thread option in the selector.

## Signature

```python
ThreadOption(
    self,
    thread: ThreadInfo,
    index: int,
    *,
    columns: dict[str, bool],
    column_widths: Mapping[str, int | None],
    selected: bool,
    current: bool,
    relative_time: bool = False,
    cell_text: dict[tuple[str, str], str] | None = None,
    classes: str = '',
)
```

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| `thread` | `ThreadInfo` | Yes | Thread metadata for the row. |
| `index` | `int` | Yes | The index of this option in the filtered list. |
| `columns` | `dict[str, bool]` | Yes | Column visibility settings. |
| `column_widths` | `Mapping[str, int \| None]` | Yes | Effective widths for the visible columns. |
| `selected` | `bool` | Yes | Whether the row is highlighted. |
| `current` | `bool` | Yes | Whether the row is the active thread. |
| `relative_time` | `bool` | No | Use relative timestamps. (default: `False`) |
| `cell_text` | `dict[tuple[str, str], str] \| None` | No | Pre-formatted cell values keyed by `(thread_id, key)`. (default: `None`) |
| `classes` | `str` | No | CSS classes for styling. (default: `''`) |

## Extends

- `Horizontal`

## Constructors

```python
__init__(
    self,
    thread: ThreadInfo,
    index: int,
    *,
    columns: dict[str, bool],
    column_widths: Mapping[str, int | None],
    selected: bool,
    current: bool,
    relative_time: bool = False,
    cell_text: dict[tuple[str, str], str] | None = None,
    classes: str = '',
) -> None
```

| Name | Type |
|------|------|
| `thread` | `ThreadInfo` |
| `index` | `int` |
| `columns` | `dict[str, bool]` |
| `column_widths` | `Mapping[str, int \| None]` |
| `selected` | `bool` |
| `current` | `bool` |
| `relative_time` | `bool` |
| `cell_text` | `dict[tuple[str, str], str] \| None` |
| `classes` | `str` |


## Properties

- `thread`
- `thread_id`
- `index`

## Methods

- [`compose()`](https://reference.langchain.com/python/deepagents-cli/widgets/thread_selector/ThreadOption/compose)
- [`set_selected()`](https://reference.langchain.com/python/deepagents-cli/widgets/thread_selector/ThreadOption/set_selected)
- [`on_click()`](https://reference.langchain.com/python/deepagents-cli/widgets/thread_selector/ThreadOption/on_click)

---

[View source on GitHub](https://github.com/langchain-ai/deepagents/blob/3bcc51a95da80094cfc8bc4bcaf25dc1e2ad8f44/libs/cli/deepagents_cli/widgets/thread_selector.py#L274)