Documentation
¶
Index ¶
- func ColorProfileName(profile termenv.Profile) string
- func DetectColorProfile() termenv.Profile
- func Run(service core.TaskService, cfg *config.Config) error
- type AppState
- type AutocompleteDataLoadedMsg
- type CalendarSyncCompletedMsg
- type ColorScheme
- type ErrorMsg
- type FilePathMatch
- type Model
- type ProjectSummaryLoadedMsg
- type RefreshMsg
- type ResourceMatch
- type ResourceType
- type StatusMsg
- type Styles
- func (s *Styles) DueDate(task interface{ ... }) lipgloss.Style
- func (s *Styles) GetTheme() Theme
- func (s *Styles) Priority(priority string) lipgloss.Style
- func (s *Styles) TaskStatus(status string) lipgloss.Style
- func (s *Styles) ToSectionsStyles() components.SectionsStyles
- func (s *Styles) ToSidebarStyles() components.SidebarStyles
- func (s *Styles) ToTaskListStyles() components.TaskListStyles
- type TaskModifiedMsg
- type TasksLoadedMsg
- type Theme
- type URLMatch
- type ViewMode
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ColorProfileName ¶
ColorProfileName returns a human-readable name for the color profile
func DetectColorProfile ¶
DetectColorProfile returns the terminal's color capability
Types ¶
type AppState ¶
type AppState int
AppState represents the current application state
const ( // StateNormal is the default state for navigation and task operations StateNormal AppState = iota // StateFilterInput is active when user is entering a filter StateFilterInput // StateHelp is active when help screen is shown StateHelp // StateConfirm is active when user needs to confirm an action StateConfirm // StateModifyInput is active when user is entering task modifications StateModifyInput // StateAnnotateInput is active when user is adding an annotation StateAnnotateInput // StateNewTaskInput is active when user is creating a new task StateNewTaskInput // StateResourcePicker is active when user is selecting a resource (URL or file) to open StateResourcePicker // StateTaskValidation is active when user is shown task validation warnings (TODOs or blocking tasks) StateTaskValidation )
type AutocompleteDataLoadedMsg ¶
AutocompleteDataLoadedMsg is sent when autocomplete data (projects/tags) has been loaded
type CalendarSyncCompletedMsg ¶
type CalendarSyncCompletedMsg struct {
Result *calendar.SyncResult
Err error
}
CalendarSyncCompletedMsg is sent when calendar sync completes
type ColorScheme ¶
type ColorScheme struct {
// Priority colors
PriorityHigh lipgloss.Color
PriorityMedium lipgloss.Color
PriorityLow lipgloss.Color
// Due date colors
DueOverdue lipgloss.Color
DueToday lipgloss.Color
DueSoon lipgloss.Color
// Status colors
StatusActive lipgloss.Color
StatusWaiting lipgloss.Color
StatusCompleted lipgloss.Color
// UI element colors
HeaderFg lipgloss.Color
SeparatorFg lipgloss.Color
SelectionBg lipgloss.Color
SelectionFg lipgloss.Color
SidebarBorder lipgloss.Color
SidebarTitle lipgloss.Color
LabelFg lipgloss.Color
ValueFg lipgloss.Color
DimFg lipgloss.Color
ErrorFg lipgloss.Color
SuccessFg lipgloss.Color
TagFg lipgloss.Color
// Section colors
SectionActiveFg lipgloss.Color
SectionActiveBg lipgloss.Color
SectionInactiveFg lipgloss.Color
}
ColorScheme defines the color palette for the TUI
type FilePathMatch ¶
type FilePathMatch struct {
Path string // The actual file path (expanded and normalized)
Annotation string // The full annotation text containing this path
}
FilePathMatch represents a file path found in an annotation
func ExtractFilePathsFromAnnotations ¶
func ExtractFilePathsFromAnnotations(task *core.Task) []FilePathMatch
ExtractFilePathsFromAnnotations extracts all file paths from a task's annotations Supports: - Absolute paths: /home/user/file.txt, /tmp/data - Paths with spaces (quoted): "/home/user/my documents/file.txt" - Paths with escaped spaces: /home/user/my\ documents/file.txt - Home directory paths: ~/documents/file.txt - Relative paths: ./file.txt, ../parent/file - file:// URLs: file:///home/user/file.txt (with %20 for spaces)
func (FilePathMatch) FormatForDisplay ¶
func (f FilePathMatch) FormatForDisplay() string
FormatForDisplay formats a FilePathMatch for display in the picker Shows the full annotation text so users can recognize which path they want
type Model ¶
type Model struct {
// contains filtered or unexported fields
}
Model represents the main TUI application model
func NewModel ¶
func NewModel(service core.TaskService, cfg *config.Config) Model
NewModel creates a new TUI model
type ProjectSummaryLoadedMsg ¶
type ProjectSummaryLoadedMsg struct {
Summaries []core.ProjectSummary
Err error
}
ProjectSummaryLoadedMsg is sent when project summaries have been loaded
type ResourceMatch ¶
type ResourceMatch struct {
Resource string // The actual URL or file path
Annotation string // The full annotation text containing this resource
Type ResourceType // Whether this is a URL or file path
}
ResourceMatch represents a resource (URL or file path) found in an annotation
func ExtractResourcesFromAnnotations ¶
func ExtractResourcesFromAnnotations(task *core.Task) []ResourceMatch
ExtractResourcesFromAnnotations extracts all URLs and file paths from a task's annotations Returns a combined, deduplicated list of resources
func (ResourceMatch) FormatForDisplay ¶
func (r ResourceMatch) FormatForDisplay() string
FormatForDisplay formats a ResourceMatch for display in the picker
type ResourceType ¶
type ResourceType int
ResourceType indicates whether a resource is a URL or a file path
const ( ResourceTypeURL ResourceType = iota ResourceTypeFile )
type Styles ¶
type Styles struct {
// Pre-computed styles
Header lipgloss.Style
Separator lipgloss.Style
Selection lipgloss.Style
Normal lipgloss.Style
SidebarBorder lipgloss.Style
SidebarTitle lipgloss.Style
Label lipgloss.Style
Value lipgloss.Style
Dim lipgloss.Style
Error lipgloss.Style
Success lipgloss.Style
Tag lipgloss.Style
LoadingIndicator lipgloss.Style
SectionActive lipgloss.Style
SectionInactive lipgloss.Style
SectionCount lipgloss.Style
TasklistHeader lipgloss.Style
GroupHeader lipgloss.Style
InputPrompt lipgloss.Style
InputHint lipgloss.Style
FloatingWindowBox lipgloss.Style
FloatingWindowTitle lipgloss.Style
// contains filtered or unexported fields
}
Styles holds all the lipgloss styles for the TUI
func (*Styles) DueDate ¶
func (s *Styles) DueDate(task interface { IsOverdue() bool IsDueToday() bool IsDueSoon() bool }) lipgloss.Style
DueDate returns a style for a due date based on its urgency
func (*Styles) TaskStatus ¶
TaskStatus returns a style for a task based on its status
func (*Styles) ToSectionsStyles ¶
func (s *Styles) ToSectionsStyles() components.SectionsStyles
ToSectionsStyles converts Styles to component-specific SectionsStyles
func (*Styles) ToSidebarStyles ¶
func (s *Styles) ToSidebarStyles() components.SidebarStyles
ToSidebarStyles converts Styles to component-specific SidebarStyles
func (*Styles) ToTaskListStyles ¶
func (s *Styles) ToTaskListStyles() components.TaskListStyles
ToTaskListStyles converts Styles to component-specific TaskListStyles
type TaskModifiedMsg ¶
TaskModifiedMsg is sent when a task has been modified
type TasksLoadedMsg ¶
TasksLoadedMsg is sent when tasks have been loaded from the service
type Theme ¶
type Theme struct {
Name string
Colors ColorScheme
}
Theme represents a complete visual theme
func DefaultDarkTheme ¶
func DefaultDarkTheme() Theme
DefaultDarkTheme returns the default dark color scheme
func DefaultLightTheme ¶
func DefaultLightTheme() Theme
DefaultLightTheme returns a light color scheme
func ThemeFromConfig ¶
ThemeFromConfig converts a config.Theme to a tui.Theme
type URLMatch ¶
type URLMatch struct {
URL string // The actual URL
Annotation string // The full annotation text containing this URL
}
URLMatch represents a URL found in an annotation with optional display text
func ExtractURLsFromAnnotations ¶
ExtractURLsFromAnnotations extracts all URLs from a task's annotations Supports: - Plain URLs (http://, https://, ftp://) - Markdown links: [text](url) - URLs with complex query strings and fragments
func (URLMatch) FormatForDisplay ¶
FormatForDisplay formats a URLMatch for display in the picker Shows the full annotation text so users can recognize which URL they want
type ViewMode ¶
type ViewMode int
ViewMode represents the view layout mode
const ( // ViewModeList shows only the task list ViewModeList ViewMode = iota // ViewModeListWithSidebar shows task list with detail sidebar ViewModeListWithSidebar // ViewModeSmall shows task list optimized for small screens (2 lines per task) ViewModeSmall // ViewModeSmallTaskDetail shows full-screen task details on small screens ViewModeSmallTaskDetail )