Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewClientCapabilities ¶ added in v1.5.0
func NewClientCapabilities(client fullClient) tab.ClientCapabilities
NewClientCapabilities records every capability of a fully authenticated client.
Types ¶
type AppStateManager ¶ added in v0.6.2
type ChannelHistory ¶ added in v1.0.0
type ChannelHistory interface {
LoadHistory() ([]save.ChannelHistoryEntry, error)
RecordChannel(login string) error
}
ChannelHistory tracks recently visited channels.
type ChatuinoServer ¶ added in v0.7.0
type ChatuinoServer interface {
tab.APIClient
RefreshToken(ctx context.Context, refreshToken string) (string, string, error)
CheckLink(ctx context.Context, targetURL string) (server.CheckLinkResponse, error)
GetLatestVersion(ctx context.Context) (string, error)
}
ChatuinoServer is the chatuino server API plus the endpoints only the shell calls: token refresh, link checking and the version check.
type CloseTabMessage ¶ added in v1.5.0
type CloseTabMessage struct {
TabID string
}
CloseTabMessage closes a tab by stable identity. Unlike close-pane, this runs the tab's normal resource cleanup; unassigned-tab closure leaves panes alone.
type Root ¶
type Root struct {
// contains filtered or unexported fields
}
func NewUI ¶
func NewUI( ctx context.Context, messageLoggerChan chan<- *twitchirc.PrivateMessage, settings save.Settings, themes *save.ThemeManager, keymap save.KeyMap, accounts []save.Account, version string, serverAPI ChatuinoServer, clients map[string]tab.ClientCapabilities, accountProvider tab.AccountProvider, emoteCache tab.EmoteCache, badgeCache *badge.Cache, emoteReplacer tab.EmoteReplacer, badgeReplacer tab.BadgeReplacer, imageDisplayManager *kittyimg.DisplayManager, recentMessages tab.RecentMessageService, messageLogger tab.MessageLogger, pool tab.ConnectionPool, appStateManager AppStateManager, channelHistory ChannelHistory, initialState *save.AppState, ) *Root
NewUI creates the root Bubble Tea model. When initialState is non-nil the session runs in detached mode: the provided state is used instead of loading from disk and no state is persisted, allowing multiple independent instances.
func (*Root) Close ¶ added in v0.0.4
func (r *Root) Close()
Close cancels and drains chat-event preparation. Call it after Program.Run, including error/cancellation exits. Quit keys also close preparation promptly.
func (*Root) HasSessionLoaded ¶ added in v0.6.2
func (*Root) IsDetached ¶ added in v1.2.0
IsDetached reports whether the session was started with explicit --tab flags and is therefore not loading or persisting state to disk.
func (*Root) TakeStateSnapshot ¶
type UpdateInfo ¶ added in v1.0.1
UpdateInfo holds the result of a version check.