statusbar

package
v0.0.0-...-b8911e7 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Mar 13, 2023 License: MPL-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ChatThreadMsg

type ChatThreadMsg struct {
	ChatThread *chat.Thread
}

ChatThreadMsg is a message sent to the status bar.

type Model

type Model struct {
	Width int
	Style lipgloss.Style

	Spinner  spinner.Model
	Spinning bool

	ChatThread *chat.Thread
}

Model is a status bar model.

func New

func New() *Model

New creates a new status bar component.

func (*Model) Init

func (s *Model) Init() tea.Cmd

Init implements tea.Model, but does nothing currently.

func (*Model) Update

func (s *Model) Update(msg tea.Msg) (*Model, tea.Cmd)

Update implements tea.Model, handles window size and status bar messages.

func (*Model) View

func (s *Model) View() string

View implements tea.Model, which actually renders the status bar.

This status bar is still early, but hopefully it'll be a good start.

It should be much more customizable, but for now it's just a simple status bar with the current thread name, message count, and token count.

type SpinMsg

type SpinMsg struct {
	Spinning bool
}

SpinMsg is a message sent to the status bar.

Directories

Path Synopsis
Package music provides a simple interface to interact with music on the user's computer.
Package music provides a simple interface to interact with music on the user's computer.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL