util

package
v0.5.1 Latest Latest
Warning

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

Go to latest
Published: Apr 20, 2024 License: MIT Imports: 11 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 DeleteFilesIfDevMode added in v0.4.0

func DeleteFilesIfDevMode()

func GetAppDataPath added in v0.3.0

func GetAppDataPath() (string, error)

func InitDb

func InitDb() *sql.DB

func Log added in v0.3.0

func Log(msgs ...any)

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 PrompInputMode added in v0.3.0

type PrompInputMode int
const (
	PromptInsertMode PrompInputMode = iota
	PromptNormalMode
)

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