Documentation
¶
Index ¶
- Constants
- func ActivateDirsFromAbsPath(projRoot, absPath string) []string
- func AddRule(scope, projHex, text string) (n int, err error)
- func FindAgentsFile(dir string) (filePath string, ok bool)
- func FormatInstructionBlock(sections PromptSections) string
- func LoadAllRulesText(projHex string) (string, error)
- func MergeActivatedDirs(existing, newly []string) []string
- func NormalizeRelDir(projRoot, absPath string) string
- func ParseRuleNumber(s string) (int, error)
- func PathsFromShellCommand(projRoot, command string) []string
- func RemoveRule(scope, projHex string, number int) (err error)
- func WriteRulesList(w io.Writer, projHex string) error
- type Loader
- func (l *Loader) BuildPromptSections(ctx context.Context, projRoot, projHex string, activatedDirs []string, ...) (PromptSections, error)
- func (l *Loader) LoadGlobal() (path, content string, ok bool)
- func (l *Loader) LoadRepoDir(projRoot, relDir string) (path, content string, ok bool)
- func (l *Loader) LoadRepoRoot(projRoot string) (path, content string, ok bool)
- type PromptSections
- type RuleEntry
Constants ¶
View Source
const ( ScopeGlobal = "global" ScopeProject = "project" )
View Source
const DefaultMaxFileBytes = 32 * 1024
Variables ¶
This section is empty.
Functions ¶
func ActivateDirsFromAbsPath ¶
func FindAgentsFile ¶
func FormatInstructionBlock ¶
func FormatInstructionBlock(sections PromptSections) string
func LoadAllRulesText ¶
func MergeActivatedDirs ¶
func NormalizeRelDir ¶
func ParseRuleNumber ¶
func PathsFromShellCommand ¶
func RemoveRule ¶
Types ¶
type Loader ¶
type Loader struct {
MaxFileBytes int64
// contains filtered or unexported fields
}
func (*Loader) BuildPromptSections ¶
func (*Loader) LoadGlobal ¶
func (*Loader) LoadRepoDir ¶
type PromptSections ¶
Click to show internal directories.
Click to hide internal directories.