Documentation
¶
Index ¶
- Constants
- Variables
- func BootstrapSystem() error
- func EnsureProjectInitialized(tikiSkillMdContent, dokiSkillMdContent string) (bool, error)
- func GenerateRandomID() string
- func GetArtTView() string
- func GetBoardViewMode() string
- func GetBool(key string) bool
- func GetContentBackgroundColor() tcell.Color
- func GetContentTextColor() tcell.Color
- func GetDefaultNewTaskTemplate() string
- func GetDokiRoot() string
- func GetEffectiveTheme() string
- func GetFireIcon() string
- func GetHeaderVisible() bool
- func GetInt(key string) int
- func GetMaxPoints() int
- func GetString(key string) string
- func GetTheme() string
- func PromptForProjectInit() ([]string, bool, error)
- func SaveBoardViewMode(viewMode string) error
- func SaveHeaderVisible(visible bool) error
- func SavePluginViewMode(pluginName string, configIndex int, viewMode string) error
- func SetColors(colors *ColorConfig)
- type ColorConfig
- type Config
- type Gradient
Constants ¶
const ( // Task box heights TaskBoxHeight = 5 // Compact view mode TaskBoxHeightExpanded = 9 // Expanded view mode // Task box width padding TaskBoxPaddingCompact = 12 // Width padding in compact mode TaskBoxPaddingExpanded = 4 // Width padding in expanded mode TaskBoxMinWidth = 10 // Minimum width fallback // Search box dimensions SearchBoxHeight = 3 )
Variables ¶
var ( // Version is the semantic version or commit hash. Version = "dev" // GitCommit is the full git commit hash. GitCommit = "unknown" // BuildDate is the ISO 8601 build timestamp. BuildDate = "unknown" )
Build information variables injected via ldflags at compile time. These are set by the build process (Makefile or GoReleaser) using: -ldflags "-X tiki/config.Version=... -X tiki/config.GitCommit=... -X tiki/config.BuildDate=..."
var ( TaskDir = ".doc/tiki" DokiDir = ".doc/doki" )
Hardcoded task storage configuration
Functions ¶
func BootstrapSystem ¶
func BootstrapSystem() error
BootstrapSystem creates the task storage and seeds the initial tiki.
func EnsureProjectInitialized ¶
EnsureProjectInitialized bootstraps the project if .doc/tiki is missing. Returns (proceed, error). If proceed is false, the user canceled initialization.
func GenerateRandomID ¶
func GenerateRandomID() string
GenerateRandomID generates a 6-character random alphanumeric ID (lowercase)
func GetArtTView ¶
func GetArtTView() string
GetArtTView returns the art logo formatted for tview (with tview color codes) uses the current gradient colors
func GetBoardViewMode ¶
func GetBoardViewMode() string
GetBoardViewMode loads the board view mode from config Priority: plugins array entry with name "Board", then default
func GetContentBackgroundColor ¶
GetContentBackgroundColor returns the background color for markdown content areas Dark theme needs black background for light text; light theme uses terminal default
func GetContentTextColor ¶
GetContentTextColor returns the appropriate text color for content areas Dark theme uses white text; light theme uses black text
func GetDefaultNewTaskTemplate ¶
func GetDefaultNewTaskTemplate() string
GetDefaultNewTaskTemplate returns the embedded new.md template
func GetDokiRoot ¶
func GetDokiRoot() string
GetDokiRoot returns the absolute path to the doki directory
func GetEffectiveTheme ¶
func GetEffectiveTheme() string
GetEffectiveTheme resolves "auto" to actual theme based on terminal detection
func GetHeaderVisible ¶
func GetHeaderVisible() bool
GetHeaderVisible returns the header visibility setting
func PromptForProjectInit ¶
PromptForProjectInit presents a Huh form for project initialization. Returns (selectedAITools, proceed, error)
func SaveBoardViewMode ¶
SaveBoardViewMode saves the board view mode to config.yaml Deprecated: Use SavePluginViewMode("Board", -1, viewMode) instead
func SaveHeaderVisible ¶
SaveHeaderVisible saves the header visibility setting to config.yaml
func SavePluginViewMode ¶
SavePluginViewMode saves a plugin's view mode to config.yaml This function updates or creates the plugin entry in the plugins array configIndex: index in config array (-1 to create new entry by name)
Types ¶
type ColorConfig ¶
type ColorConfig struct {
// Board view colors
BoardColumnTitleBackground tcell.Color
BoardColumnTitleText tcell.Color
BoardColumnBorder tcell.Color
BoardColumnTitleGradient Gradient
BoardPaneTitleBackground tcell.Color
BoardPaneTitleText tcell.Color
BoardPaneBorder tcell.Color
BoardPaneTitleGradient Gradient
// Task box colors
TaskBoxSelectedBackground tcell.Color
TaskBoxSelectedText tcell.Color
TaskBoxSelectedBorder tcell.Color
TaskBoxUnselectedBorder tcell.Color
TaskBoxUnselectedBackground tcell.Color
TaskBoxIDColor Gradient
TaskBoxTitleColor string // tview color string like "[#b8b8b8]"
TaskBoxLabelColor string // tview color string like "[#767676]"
TaskBoxDescriptionColor string // tview color string like "[#767676]"
TaskBoxTagValueColor string // tview color string like "[#5a6f8f]"
// Task detail view colors
TaskDetailIDColor Gradient
TaskDetailTitleText string // tview color string like "[yellow]"
TaskDetailLabelText string // tview color string like "[green]"
TaskDetailValueText string // tview color string like "[white]"
TaskDetailCommentAuthor string // tview color string like "[yellow]"
TaskDetailEditDimTextColor string // tview color string like "[#808080]"
TaskDetailEditDimLabelColor string // tview color string like "[#606060]"
TaskDetailEditDimValueColor string // tview color string like "[#909090]"
TaskDetailEditFocusMarker string // tview color string like "[yellow]"
TaskDetailEditFocusText string // tview color string like "[white]"
// Search box colors
SearchBoxLabelColor tcell.Color
SearchBoxBackgroundColor tcell.Color
SearchBoxTextColor tcell.Color
// Input field colors (used in task detail edit mode)
InputFieldBackgroundColor tcell.Color
InputFieldTextColor tcell.Color
// Burndown chart colors
BurndownChartAxisColor tcell.Color
BurndownChartLabelColor tcell.Color
BurndownChartValueColor tcell.Color
BurndownChartBarColor tcell.Color
BurndownChartGradientFrom Gradient
BurndownChartGradientTo Gradient
BurndownHeaderGradientFrom Gradient // Header-specific chart gradient
BurndownHeaderGradientTo Gradient
// Header view colors
HeaderInfoLabel string // tview color string like "[orange]"
HeaderInfoValue string // tview color string like "[white]"
HeaderKeyBinding string // tview color string like "[yellow]"
HeaderKeyText string // tview color string like "[white]"
}
ColorConfig holds all color and style definitions per view
func DefaultColors ¶
func DefaultColors() *ColorConfig
DefaultColors returns the default color configuration
func GetColors ¶
func GetColors() *ColorConfig
GetColors returns the global color configuration with theme-aware overrides
type Config ¶
type Config struct {
// Logging configuration
Logging struct {
Level string `mapstructure:"level"` // "debug", "info", "warn", "error"
} `mapstructure:"logging"`
// Board view configuration
Board struct {
View string `mapstructure:"view"` // "compact" or "expanded"
} `mapstructure:"board"`
// Header configuration
Header struct {
Visible bool `mapstructure:"visible"`
} `mapstructure:"header"`
// Tiki configuration
Tiki struct {
MaxPoints int `mapstructure:"maxPoints"`
} `mapstructure:"tiki"`
// Appearance configuration
Appearance struct {
Theme string `mapstructure:"theme"` // "dark", "light", "auto"
} `mapstructure:"appearance"`
}
Config holds all application configuration loaded from config.yaml
func GetConfig ¶
func GetConfig() *Config
GetConfig returns the loaded configuration If config hasn't been loaded yet, it loads it first
func LoadConfig ¶
LoadConfig loads configuration from config.yaml in the binary's directory If config.yaml doesn't exist, it uses default values