Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func RunningKeyboard ¶
func RunningKeyboard() *models.InlineKeyboardMarkup
RunningKeyboard is the [Cancel] [Kill] inline keyboard attached to the live-streaming message for a running command. Data handled by the telegram/callbacks package under ns.Job.
Types ¶
type Streamer ¶
type Streamer struct {
// contains filtered or unexported fields
}
func (*Streamer) ActionLoop ¶
ActionLoop sends `action` immediately, then refreshes every ~4s until ctx cancels. Exposed so command handlers can show the "sending a file" status during /get and /audit-out transfers.
func (*Streamer) Stream ¶
Stream drives the Telegram UI for a single job:
- Posts a placeholder message and edits it live every `edit_interval`.
- Shows "… is typing" throughout.
- When the current message would exceed Telegram's cap, finalizes it at a clean boundary (last `\n`, fallback to space, fallback to hard cut) and rolls to a new message.
- On completion, if output spanned more than one message, swaps to the "sending a file" indicator and uploads the full combined output as `output-<unix-ts>.txt`.