# SlashCommandController

> **Class** in `deepagents_cli`

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

Controller for / slash command completion.

## Signature

```python
SlashCommandController(
    self,
    commands: list[tuple[str, str, str]],
    view: CompletionView,
)
```

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| `commands` | `list[tuple[str, str, str]]` | Yes | List of `(command, description, hidden_keywords)` tuples. |
| `view` | `CompletionView` | Yes | View to render suggestions to. |

## Constructors

```python
__init__(
    self,
    commands: list[tuple[str, str, str]],
    view: CompletionView,
) -> None
```

| Name | Type |
|------|------|
| `commands` | `list[tuple[str, str, str]]` |
| `view` | `CompletionView` |


## Methods

- [`update_commands()`](https://reference.langchain.com/python/deepagents-cli/widgets/autocomplete/SlashCommandController/update_commands)
- [`can_handle()`](https://reference.langchain.com/python/deepagents-cli/widgets/autocomplete/SlashCommandController/can_handle)
- [`reset()`](https://reference.langchain.com/python/deepagents-cli/widgets/autocomplete/SlashCommandController/reset)
- [`on_text_changed()`](https://reference.langchain.com/python/deepagents-cli/widgets/autocomplete/SlashCommandController/on_text_changed)
- [`on_key()`](https://reference.langchain.com/python/deepagents-cli/widgets/autocomplete/SlashCommandController/on_key)

---

[View source on GitHub](https://github.com/langchain-ai/deepagents/blob/a9e6e4f7ad7fe161dd9affc3d74bb19784aca70b/libs/cli/deepagents_cli/widgets/autocomplete.py#L110)