OpenCode.Generated.Tui (opencode_sdk v0.1.68)

Copy Markdown View Source

Provides API endpoints related to tui

Summary

Types

tui_control_next_200_json_resp()

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

Functions

tui_append_prompt(body, opts \\ [])

@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(opts \\ [])

@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(opts \\ [])

@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(body, opts \\ [])

@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(body, opts \\ [])

@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(opts \\ [])

@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(opts \\ [])

@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(opts \\ [])

@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(opts \\ [])

@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(body, opts \\ [])

Publish TUI event

Publish a TUI event.

Options

  • directory
  • workspace

Request Body

Content Types: application/json

tui_select_session(body, opts \\ [])

Select session

Navigate the TUI to display the specified session.

Options

  • directory
  • workspace

Request Body

Content Types: application/json

tui_show_toast(body, opts \\ [])

@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(opts \\ [])

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

Submit TUI prompt

Submit the prompt.

Options

  • directory
  • workspace