cmd

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Feb 26, 2026 License: MIT Imports: 37 Imported by: 0

Documentation

Overview

Package cmd 提供 CLI 命令

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Execute

func Execute()

Execute 执行命令

func GetConfig

func GetConfig() *config.Config

GetConfig 获取配置

Types

type AuthSnapshot

type AuthSnapshot struct {
	Provider      string
	DisplayName   string
	ShortName     string
	TokenPath     string
	Authenticated bool
	Valid         *bool
	StatusText    string
	ExpiresAt     string
	NextAction    string
}

type DayData

type DayData struct {
	Date      string `json:"date"`
	Completed int    `json:"completed"`
}

DayData 每日数据

type InputMode

type InputMode int

InputMode 输入模式

const (
	// ModeNormal 普通模式
	ModeNormal InputMode = iota
	// ModeSearch 搜索模式
	ModeSearch
)

type MCPTool

type MCPTool struct {
	Name        string                 `json:"name"`
	Description string                 `json:"description"`
	InputSchema map[string]interface{} `json:"inputSchema"`
}

MCPTool MCP 工具定义

type Model

type Model struct {
	// contains filtered or unexported fields
}

Model TUI 模型

func (Model) Init

func (m Model) Init() tea.Cmd

Init 初始化

func (Model) Update

func (m Model) Update(msg tea.Msg) (tea.Model, tea.Cmd)

Update 更新

func (Model) View

func (m Model) View() string

View 渲染

type PriorityAnalysis

type PriorityAnalysis struct {
	Urgent  PriorityData `json:"urgent"`
	High    PriorityData `json:"high"`
	Medium  PriorityData `json:"medium"`
	Low     PriorityData `json:"low"`
	None    PriorityData `json:"none"`
	Summary SummaryData  `json:"summary"`
}

PriorityAnalysis 优先级分析结果

type PriorityData

type PriorityData struct {
	Count      int      `json:"count"`
	Percentage float64  `json:"percentage"`
	Tasks      []string `json:"tasks,omitempty"`
}

PriorityData 优先级数据

type ProviderInfo

type ProviderInfo struct {
	Name         string
	ShortName    string
	DisplayName  string
	Description  string
	AuthType     string
	Enabled      bool
	Connected    bool
	Capabilities []string
}

ProviderInfo Provider 信息

type QuadrantAnalysis

type QuadrantAnalysis struct {
	Q1 QuadrantData `json:"q1"`
	Q2 QuadrantData `json:"q2"`
	Q3 QuadrantData `json:"q3"`
	Q4 QuadrantData `json:"q4"`
}

QuadrantAnalysis 四象限分析结果

type QuadrantData

type QuadrantData struct {
	Name        string   `json:"name"`
	Description string   `json:"description"`
	Count       int      `json:"count"`
	Percentage  float64  `json:"percentage"`
	Tasks       []string `json:"tasks,omitempty"`
}

QuadrantData 象限数据

type SortType

type SortType int

SortType 排序类型

const (
	// SortByDueDate 按截止日期排序
	SortByDueDate SortType = iota
	// SortByPriority 按优先级排序
	SortByPriority
	// SortByCreated 按创建时间排序
	SortByCreated
	// SortByTitle 按标题排序
	SortByTitle
	// SortCount 排序类型计数
	SortCount
)

type SummaryData

type SummaryData struct {
	Total            int     `json:"total"`
	Active           int     `json:"active"`
	Completed        int     `json:"completed"`
	AvgPriorityScore float64 `json:"avg_priority_score"`
}

SummaryData 汇总数据

type TaskOutput

type TaskOutput struct {
	ID            string   `json:"id"`
	Title         string   `json:"title"`
	Status        string   `json:"status"`
	Quadrant      string   `json:"quadrant,omitempty"`
	Priority      string   `json:"priority,omitempty"`
	DueDate       string   `json:"due_date,omitempty"`
	Tags          []string `json:"tags,omitempty"`
	Source        string   `json:"source"`
	ListID        string   `json:"list_id,omitempty"`
	ListName      string   `json:"list_name,omitempty"`
	Progress      int      `json:"progress,omitempty"`
	PriorityScore int      `json:"priority_score,omitempty"`
}

TaskOutput 任务输出格式

type TimeAnalysis

type TimeAnalysis struct {
	Overdue   TimeData `json:"overdue"`
	Today     TimeData `json:"today"`
	Tomorrow  TimeData `json:"tomorrow"`
	ThisWeek  TimeData `json:"this_week"`
	NextWeek  TimeData `json:"next_week"`
	ThisMonth TimeData `json:"this_month"`
	Future    TimeData `json:"future"`
	NoDueDate TimeData `json:"no_due_date"`
}

TimeAnalysis 时间分析结果

type TimeData

type TimeData struct {
	Description string   `json:"description"`
	Count       int      `json:"count"`
	Tasks       []string `json:"tasks,omitempty"`
}

TimeData 时间数据

type TrendAnalysis

type TrendAnalysis struct {
	DailyCompletions []DayData `json:"daily_completions"`
	WeeklyAverage    float64   `json:"weekly_average"`
	TotalCompleted   int       `json:"total_completed"`
}

TrendAnalysis 趋势分析结果

type ViewType

type ViewType int

ViewType 视图类型

const (
	// ViewTasks 任务视图
	ViewTasks ViewType = iota
	// ViewQuadrant 象限视图
	ViewQuadrant
	// ViewProjects 项目视图
	ViewProjects
	// ViewProviders 提供者视图
	ViewProviders
	// ViewAuth 认证视图
	ViewAuth
	// ViewCount 视图计数
	ViewCount
)

Jump to

Keyboard shortcuts

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