# `OpenCode.Generated.Tui`
[🔗](https://github.com/UtkarshUsername/opencode-sdk-elixir/blob/v0.1.84/lib/opencode/generated/tui.ex#L1)

Provides API endpoints related to tui

# `tui_control_next_200_json_resp`

```elixir
@type tui_control_next_200_json_resp() :: %{body: map(), path: String.t()}
```

# `tui_append_prompt`

```elixir
@spec tui_append_prompt(body :: map(), opts :: keyword()) ::
  {:ok, boolean()}
  | {:error,
     OpenCode.Generated.EffectHttpApiErrorBadRequest.t()
     | OpenCode.Generated.InvalidRequestError.t()}
```

Append TUI prompt

Append prompt to the TUI.

## Options

  * `directory`
  * `workspace`

## Request Body

**Content Types**: `application/json`

# `tui_clear_prompt`

```elixir
@spec tui_clear_prompt(opts :: keyword()) ::
  {:ok, boolean()} | {:error, OpenCode.Generated.BadRequestError.t()}
```

Clear TUI prompt

Clear the prompt.

## Options

  * `directory`
  * `workspace`

# `tui_control_next`

```elixir
@spec tui_control_next(opts :: keyword()) ::
  {:ok, tui_control_next_200_json_resp()}
  | {:error, OpenCode.Generated.BadRequestError.t()}
```

Get next TUI request

Retrieve the next TUI request from the queue for processing.

## Options

  * `directory`
  * `workspace`

# `tui_control_response`

```elixir
@spec tui_control_response(body :: map(), opts :: keyword()) ::
  {:ok, boolean()} | {:error, OpenCode.Generated.BadRequestError.t()}
```

Submit TUI response

Submit a response to the TUI request queue to complete a pending request.

## Options

  * `directory`
  * `workspace`

## Request Body

**Content Types**: `application/json`

# `tui_execute_command`

```elixir
@spec tui_execute_command(body :: map(), opts :: keyword()) ::
  {:ok, boolean()}
  | {:error,
     OpenCode.Generated.EffectHttpApiErrorBadRequest.t()
     | OpenCode.Generated.InvalidRequestError.t()}
```

Execute TUI command

Execute a TUI command.

## Options

  * `directory`
  * `workspace`

## Request Body

**Content Types**: `application/json`

# `tui_open_help`

```elixir
@spec tui_open_help(opts :: keyword()) ::
  {:ok, boolean()} | {:error, OpenCode.Generated.BadRequestError.t()}
```

Open help dialog

Open the help dialog in the TUI to display user assistance information.

## Options

  * `directory`
  * `workspace`

# `tui_open_models`

```elixir
@spec tui_open_models(opts :: keyword()) ::
  {:ok, boolean()} | {:error, OpenCode.Generated.BadRequestError.t()}
```

Open models dialog

Open the model dialog.

## Options

  * `directory`
  * `workspace`

# `tui_open_sessions`

```elixir
@spec tui_open_sessions(opts :: keyword()) ::
  {:ok, boolean()} | {:error, OpenCode.Generated.BadRequestError.t()}
```

Open sessions dialog

Open the session dialog.

## Options

  * `directory`
  * `workspace`

# `tui_open_themes`

```elixir
@spec tui_open_themes(opts :: keyword()) ::
  {:ok, boolean()} | {:error, OpenCode.Generated.BadRequestError.t()}
```

Open themes dialog

Open the theme dialog.

## Options

  * `directory`
  * `workspace`

# `tui_publish`

```elixir
@spec tui_publish(
  body ::
    OpenCode.Generated.EventTuiCommandExecute.t()
    | OpenCode.Generated.EventTuiPromptAppend.t()
    | OpenCode.Generated.EventTuiSessionSelect.t()
    | OpenCode.Generated.EventTuiToastShow.t(),
  opts :: keyword()
) ::
  {:ok, boolean()}
  | {:error,
     OpenCode.Generated.EffectHttpApiErrorBadRequest.t()
     | OpenCode.Generated.InvalidRequestError.t()}
```

Publish TUI event

Publish a TUI event.

## Options

  * `directory`
  * `workspace`

## Request Body

**Content Types**: `application/json`

# `tui_select_session`

```elixir
@spec tui_select_session(body :: map(), opts :: keyword()) ::
  {:ok, boolean()}
  | {:error,
     OpenCode.Generated.EffectHttpApiErrorBadRequest.t()
     | OpenCode.Generated.InvalidRequestError.t()
     | OpenCode.Generated.NotFoundError.t()}
```

Select session

Navigate the TUI to display the specified session.

## Options

  * `directory`
  * `workspace`

## Request Body

**Content Types**: `application/json`

# `tui_show_toast`

```elixir
@spec tui_show_toast(body :: map(), opts :: keyword()) ::
  {:ok, boolean()} | {:error, OpenCode.Generated.BadRequestError.t()}
```

Show TUI toast

Show a toast notification in the TUI.

## Options

  * `directory`
  * `workspace`

## Request Body

**Content Types**: `application/json`

# `tui_submit_prompt`

```elixir
@spec tui_submit_prompt(opts :: keyword()) ::
  {:ok, boolean()} | {:error, OpenCode.Generated.BadRequestError.t()}
```

Submit TUI prompt

Submit the prompt.

## Options

  * `directory`
  * `workspace`

---

*Consult [api-reference.md](api-reference.md) for complete listing*
