trading_agent.terminal.screens.channels_screen
¶
The Channels page: the Telegram channel's state, the chats waiting to be paired, and the paired chats.
It copies the web page's ChannelsPage.tsx: a waiting pairing is approved with a, a code can be typed, and a paired chat is revoked with Delete.
Typical usage example:
app.push_screen(ChannelsScreen('general'))
ChannelsScreen
¶
Bases: PageScreen
The Channels page.
Source code in src/trading_agent/terminal/screens/page_screen.py
compose_page
¶
Builds the status, the pairing tables and the code box.
Yields:
| Type | Description |
|---|---|
Widget
|
The sections, in a scroll area. |
Source code in src/trading_agent/terminal/screens/channels_screen.py
on_mount
¶
Sets up the tables, then reads the channel.
Source code in src/trading_agent/terminal/screens/channels_screen.py
refresh_page
async
¶
Reads the Telegram channel.
Source code in src/trading_agent/terminal/screens/channels_screen.py
action_approve
¶
on_input_submitted
¶
Approves a typed code.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
event
|
Submitted
|
The code. |
required |
Source code in src/trading_agent/terminal/screens/channels_screen.py
action_revoke
¶
Revokes the highlighted paired chat.