Documentation
¶
Overview ¶
Package suggestions provides template suggestion and smart completion functionality.
Index ¶
- type Detector
- type FeedbackEvent
- type FeedbackType
- type Learner
- func (l *Learner) AdjustSuggestion(suggestion *Suggestion)
- func (l *Learner) ClearHistory()
- func (l *Learner) GetAdjustments() map[string]float64
- func (l *Learner) GetRecentHistory(limit int) []FeedbackEvent
- func (l *Learner) GetStats() map[string]ToolStats
- func (l *Learner) RecordFeedback(toolName string, pattern string, feedback FeedbackType)
- type Suggestion
- type ToolStats
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Detector ¶
type Detector struct {
// contains filtered or unexported fields
}
Detector analyzes user input to suggest appropriate tools
func NewDetector ¶
func NewDetector() *Detector
NewDetector creates a new suggestion detector with default patterns
func (*Detector) AnalyzeInput ¶
func (d *Detector) AnalyzeInput(input string) []Suggestion
AnalyzeInput analyzes user input and returns suggestions
type FeedbackEvent ¶
type FeedbackEvent struct {
ToolName string
Pattern string // Pattern that triggered the suggestion
Feedback FeedbackType
Timestamp time.Time
}
FeedbackEvent records user interaction with a suggestion
type FeedbackType ¶
type FeedbackType int
FeedbackType represents user feedback on a suggestion
const ( // FeedbackAccepted indicates the user accepted a suggestion FeedbackAccepted FeedbackType = iota // FeedbackRejected indicates the user rejected a suggestion FeedbackRejected // FeedbackIgnored indicates the user ignored a suggestion FeedbackIgnored )
type Learner ¶
type Learner struct {
// contains filtered or unexported fields
}
Learner tracks suggestion effectiveness and adjusts confidence
func (*Learner) AdjustSuggestion ¶
func (l *Learner) AdjustSuggestion(suggestion *Suggestion)
AdjustSuggestion applies learned adjustments to a suggestion
func (*Learner) ClearHistory ¶
func (l *Learner) ClearHistory()
ClearHistory clears all feedback history and adjustments
func (*Learner) GetAdjustments ¶
GetAdjustments returns current confidence adjustments for all tools
func (*Learner) GetRecentHistory ¶
func (l *Learner) GetRecentHistory(limit int) []FeedbackEvent
GetRecentHistory returns recent feedback events (max 20)
func (*Learner) RecordFeedback ¶
func (l *Learner) RecordFeedback(toolName string, pattern string, feedback FeedbackType)
RecordFeedback records user feedback on a suggestion
type Suggestion ¶
type Suggestion struct {
ToolName string // Name of the suggested tool
Confidence float64 // Confidence score (0.0 - 1.0)
Reason string // Human-readable reason for the suggestion
Action string // Suggested action text (e.g., ":read /path/to/file")
}
Suggestion represents a tool suggestion with confidence score