util

package
v0.1.5 Latest Latest
Warning

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

Go to latest
Published: Mar 5, 2024 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	Pink100 = "#F2B3E8"
	Pink200 = "#8C3A87"
	Pink300 = "#BD54BF"
	Purple  = "#432D59"
	Indigo  = "#4A2B8C"

	NormalTabBorderColor = lipgloss.Color("#bbb")
	ActiveTabBorderColor = lipgloss.Color(Pink300)
)
View Source
var MotivationalMessage = lipgloss.NewStyle().
	PaddingLeft(1).
	Render("There's something scary about a blank canvas...that's why I'm here 😄!")

Functions

func InitDb

func InitDb() *sql.DB

func MakeErrorMsg

func MakeErrorMsg(v string) tea.Cmd

func MakeFocusMsg

func MakeFocusMsg(v bool) tea.Msg

func MakeWindowResizeMsg

func MakeWindowResizeMsg(w int) tea.Msg

func MigrateFS

func MigrateFS(db *sql.DB, migrationsFS fs.FS, dir string) error

Types

type ErrorEvent

type ErrorEvent struct {
	Message string
}

type FocusEvent

type FocusEvent struct {
	IsFocused bool
}

type FocusPane

type FocusPane int
const (
	SettingsType FocusPane = iota
	SessionsType
	PromptType
	ChatMessagesType
)

fake enum to keep tab of the currently focused pane

func GetNewFocusMode

func GetNewFocusMode(mode ViewMode, currentFocus FocusPane) FocusPane

type OurWindowResize

type OurWindowResize struct {
	Width int
}

type ViewMode

type ViewMode int
const (
	ZenMode ViewMode = iota
	NormalMode
)

Jump to

Keyboard shortcuts

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