Documentation
¶
Overview ¶
Package instruction discovers the project's instruction files (AGENTS.md and the files named in config, local or remote) and tracks which ones a session has already loaded, so each is injected into the prompt once.
Index ¶
- type Config
- type DefaultHTTPClient
- type FileSystem
- type Flags
- type Global
- type HTTPClient
- type Instance
- type OSFileSystem
- func (OSFileSystem) ExistsSafe(path string) bool
- func (filesystem OSFileSystem) FindUp(target, start, stop string) ([]string, error)
- func (OSFileSystem) Glob(pattern, cwd string) ([]string, error)
- func (filesystem OSFileSystem) GlobUp(pattern, start, stop string) ([]string, error)
- func (OSFileSystem) ReadFileString(path string) (string, error)
- type Options
- type OrderedSet
- type Resolved
- type Service
- func (service *Service) Clear(messageID string)
- func (service *Service) Find(dir string) *string
- func (service *Service) Resolve(messages []msgmodel.WithParts, file string, messageID string) []Resolved
- func (service *Service) System(ctx context.Context) []string
- func (service *Service) SystemPaths() *OrderedSet
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type DefaultHTTPClient ¶
type FileSystem ¶
type HTTPClient ¶
type OSFileSystem ¶
type OSFileSystem struct{}
func (OSFileSystem) ExistsSafe ¶
func (OSFileSystem) ExistsSafe(path string) bool
func (OSFileSystem) FindUp ¶
func (filesystem OSFileSystem) FindUp( target, start, stop string, ) ([]string, error)
func (OSFileSystem) GlobUp ¶
func (filesystem OSFileSystem) GlobUp( pattern, start, stop string, ) ([]string, error)
func (OSFileSystem) ReadFileString ¶
func (OSFileSystem) ReadFileString(path string) (string, error)
type Options ¶
type Options struct {
Config Config
Global Global
Instance Instance
Flags Flags
FS FileSystem
HTTP HTTPClient
}
type OrderedSet ¶
type OrderedSet struct {
// contains filtered or unexported fields
}
func Loaded ¶
func Loaded(messages []msgmodel.WithParts) *OrderedSet
func NewOrderedSet ¶
func NewOrderedSet() *OrderedSet
func (*OrderedSet) Add ¶
func (set *OrderedSet) Add(value string)
func (*OrderedSet) Has ¶
func (set *OrderedSet) Has(value string) bool
func (*OrderedSet) Values ¶
func (set *OrderedSet) Values() []string
type Service ¶
type Service struct {
// contains filtered or unexported fields
}
func (*Service) SystemPaths ¶
func (service *Service) SystemPaths() *OrderedSet
Click to show internal directories.
Click to hide internal directories.