Documentation
¶
Overview ¶
Package chat provides an interactive conversational PM interface.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Action ¶
type Action struct {
Type ActionType
Args []string // parsed arguments
Raw string // original directive line
}
Action represents a PM directive embedded in an AI response.
func ParseActions ¶
ParseActions scans AI output for embedded PM directives. Directives look like: ACTION:TASK_DONE:3 or ACTION:TASK_CREATE:Title:Description:2
type ActionResult ¶
ActionResult records what happened when an action was applied.
type ActionType ¶
type ActionType string
ActionType identifies the kind of PM action the AI wants to take.
const ( ActionTaskDone ActionType = "TASK_DONE" ActionTaskFail ActionType = "TASK_FAIL" ActionTaskSkip ActionType = "TASK_SKIP" ActionTaskStart ActionType = "TASK_START" ActionTaskCreate ActionType = "TASK_CREATE" ActionNote ActionType = "NOTE" ActionGoalDone ActionType = "GOAL_COMPLETE" )
type Session ¶
type Session struct {
State *state.ProjectState
Memory *memory.Memory
History []Turn
Provider provider.Provider
Model string
Timeout time.Duration
// OnToken, if set, enables streaming mode. Each token chunk is passed
// to this callback as the AI generates its response.
OnToken func(token string)
// Action callbacks — called when AI emits a PM directive.
OnTaskUpdate func(taskID int, status pm.TaskStatus) error
OnTaskCreate func(title, description string, priority int) (*pm.Task, error)
OnNote func(text string) error
}
Session holds the state of an interactive chat session.
func NewSession ¶
func NewSession(s *state.ProjectState, mem *memory.Memory, prov provider.Provider, model string) *Session
NewSession creates a new chat session.
Click to show internal directories.
Click to hide internal directories.