Documentation
¶
Index ¶
- func BuildUserPrompt(input PromptInput) (string, error)
- func ExecutePlan(ctx context.Context, dir string, plan ExecutionPlan) error
- func GoalSystemPrompt() string
- type ActionKind
- type DirectorySnapshot
- type ExecutionPlan
- type MkdirAction
- type PlannedAction
- type PromptInput
- type RenameAction
- type Session
- type SessionOptions
- type SortRuleAction
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func BuildUserPrompt ¶
func BuildUserPrompt(input PromptInput) (string, error)
func ExecutePlan ¶
func ExecutePlan(ctx context.Context, dir string, plan ExecutionPlan) error
func GoalSystemPrompt ¶
func GoalSystemPrompt() string
Types ¶
type ActionKind ¶
type ActionKind string
const ( ActionSortRule ActionKind = "sort_rule" ActionDedupe ActionKind = "dedupe" ActionRename ActionKind = "rename" ActionMkdir ActionKind = "mkdir" )
type DirectorySnapshot ¶
type DirectorySnapshot struct {
FileCount int `json:"file_count"`
FolderCount int `json:"folder_count"`
ObservedFiles []string `json:"observed_files"`
ObservedFolders []string `json:"observed_folders"`
ExtensionCounts map[string]int `json:"extension_counts"`
}
func SummarizeDirectory ¶
func SummarizeDirectory(ctx context.Context, dir string) (DirectorySnapshot, error)
type ExecutionPlan ¶
type ExecutionPlan struct {
Summary string `json:"summary"`
RequestFilenames []string `json:"request_filenames,omitempty"`
Actions []PlannedAction `json:"actions"`
}
func ParseExecutionPlan ¶
func ParseExecutionPlan(raw string) (ExecutionPlan, error)
func (ExecutionPlan) String ¶
func (p ExecutionPlan) String() string
func (*ExecutionPlan) Validate ¶
func (p *ExecutionPlan) Validate() error
type MkdirAction ¶
type MkdirAction struct {
Path string `json:"path"`
}
type PlannedAction ¶
type PlannedAction struct {
Kind ActionKind `json:"kind"`
SortRule *SortRuleAction `json:"sort_rule,omitempty"`
Rename *RenameAction `json:"rename,omitempty"`
Mkdir *MkdirAction `json:"mkdir,omitempty"`
}
type PromptInput ¶
type PromptInput struct {
Directory string `json:"directory"`
Instruction string `json:"instruction"`
Observed DirectorySnapshot `json:"observed_names"`
UserHints []string `json:"user_hints"`
}
type RenameAction ¶
type Session ¶
type Session struct {
// contains filtered or unexported fields
}
func NewSession ¶
func NewSession(client llm.Client, opts SessionOptions) *Session
type SessionOptions ¶
type SessionOptions struct {
MaxSteps int
}
type SortRuleAction ¶
Click to show internal directories.
Click to hide internal directories.