Documentation
¶
Overview ¶
Package voice provides NLP intent parsing for voice-based task management. It takes a transcribed text string, calls an AI provider to extract the user's intent, and returns a structured IntentResult ready for execution.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Action ¶
type Action string
Action is the type of operation the user wants to perform.
const ( ActionAddTask Action = "add_task" ActionListTasks Action = "list_tasks" ActionMarkDone Action = "mark_done" ActionMarkFailed Action = "mark_failed" ActionSetPriority Action = "set_priority" ActionStartRun Action = "start_run" ActionStopRun Action = "stop_run" ActionShowStatus Action = "show_status" ActionShowGoal Action = "show_goal" ActionReorderTasks Action = "reorder_tasks" ActionGenerateRetro Action = "generate_retro" ActionUnknown Action = "unknown" )
type IntentResult ¶
type IntentResult struct {
// Transcription is the raw text from speech-to-text.
Transcription string `json:"transcription"`
// Action is the detected operation.
Action Action `json:"action"`
// TaskTitle is populated for add_task.
TaskTitle string `json:"task_title,omitempty"`
// TaskDescription is populated for add_task.
TaskDescription string `json:"task_description,omitempty"`
// TaskID is populated for mark_done, mark_failed, set_priority.
TaskID int `json:"task_id,omitempty"`
// Priority (1=highest) for add_task / set_priority.
Priority int `json:"priority,omitempty"`
// CloopArgs holds the resolved cloop command arguments for execution.
// e.g. ["task", "add", "Fix the login bug"]
CloopArgs []string `json:"cloop_args,omitempty"`
// Explanation is a human-friendly description of the resolved action.
Explanation string `json:"explanation,omitempty"`
}
IntentResult holds the parsed user intent and parameters.
Click to show internal directories.
Click to hide internal directories.