LemonChannels.Adapters.Telegram.Transport.ChatPreferences (lemon_channels v0.1.0)

View Source

Telegram-local chat and topic preference commands.

This module owns trigger-mode evaluation plus the /trigger, /thinking, and /cwd command flows extracted from the transport shell.

Summary

Types

callbacks()

@type callbacks() :: %{
  extract_chat_ids: (map() -> {integer() | nil, integer() | nil}),
  extract_message_ids: (map() ->
                          {integer() | nil, integer() | nil, integer() | nil}),
  maybe_select_project_for_scope: (LemonCore.ChatScope.t(), binary() ->
                                     {:ok, map()} | {:error, binary()}),
  send_system_message: (map(),
                        integer(),
                        integer()
                        | nil,
                        integer()
                        | nil,
                        binary() ->
                          any())
}

Functions

handle_cwd_command(state, inbound, callbacks)

@spec handle_cwd_command(map(), map(), callbacks()) :: map()

handle_thinking_command(state, inbound, callbacks)

@spec handle_thinking_command(map(), map(), callbacks()) :: map()

handle_trigger_command(state, inbound, callbacks)

@spec handle_trigger_command(map(), map(), callbacks()) :: map()

should_ignore_for_trigger?(state, inbound, text, callbacks)

@spec should_ignore_for_trigger?(map(), map(), binary(), callbacks()) :: boolean()