Documentation
¶
Overview ¶
Package ai provides LLM-powered command interpretation for task management.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Command ¶
type Command struct {
Type CommandType `json:"type"`
TaskID int64 `json:"task_id,omitempty"`
Title string `json:"title,omitempty"`
Body string `json:"body,omitempty"`
Status string `json:"status,omitempty"`
Project string `json:"project,omitempty"`
Query string `json:"query,omitempty"`
Message string `json:"message,omitempty"` // Human-readable response
}
Command represents a parsed command from user input.
type CommandService ¶
type CommandService struct {
// contains filtered or unexported fields
}
CommandService handles AI command interpretation.
func NewCommandService ¶
func NewCommandService(apiKey string) *CommandService
NewCommandService creates a new command service.
func (*CommandService) InterpretCommand ¶
func (s *CommandService) InterpretCommand(ctx context.Context, input string, cmdCtx *Context) (*Command, error)
InterpretCommand uses an LLM to interpret a natural language command.
func (*CommandService) IsAvailable ¶
func (s *CommandService) IsAvailable() bool
IsAvailable returns true if the service has an API key.
type CommandType ¶
type CommandType string
CommandType represents the type of action to perform.
const ( CommandCreateTask CommandType = "create_task" CommandUpdateStatus CommandType = "update_status" CommandSelectTask CommandType = "select_task" CommandSearchTasks CommandType = "search_tasks" CommandUnknown CommandType = "unknown" )
Click to show internal directories.
Click to hide internal directories.