Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type SessionState ¶
type SessionState struct {
// TodoManager manages the state of all todos across the application
TodoManager *TodoManager
// SplitDiffView determines whether diff views should be shown side-by-side (true)
// or unified (false)
SplitDiffView bool
}
SessionState holds shared state across the TUI application. This provides a centralized location for state that needs to be accessible by multiple components.
func NewSessionState ¶
func NewSessionState() *SessionState
NewSessionState creates a new SessionState with default values.
func (*SessionState) ToggleSplitDiffView ¶
func (s *SessionState) ToggleSplitDiffView()
ToggleSplitDiffView toggles between split and unified diff view modes.
type TodoManager ¶
type TodoManager struct {
// contains filtered or unexported fields
}
TodoManager handles the shared state of all todos
func NewTodoManager ¶
func NewTodoManager() *TodoManager
NewTodoManager creates a new TodoManager instance
func (*TodoManager) AddTodo ¶
func (tm *TodoManager) AddTodo(id, description, status string)
AddTodo adds a new todo with the given id, description, and status
func (*TodoManager) GetTodos ¶
func (tm *TodoManager) GetTodos() []types.Todo
GetTodos returns all todos
func (*TodoManager) UpdateTodo ¶
func (tm *TodoManager) UpdateTodo(id, status string) bool
UpdateTodo updates the status of a todo by id Returns true if the todo was found and updated, false otherwise
Click to show internal directories.
Click to hide internal directories.