extra tools path added
This commit is contained in:
@@ -258,6 +258,17 @@ When generating code:
|
||||
- No emojis in code or documentation.
|
||||
- Respect AGENTS.md, GEMINI.md, CLAUDE.md contents in the project.`
|
||||
|
||||
|
||||
func toolsDir(cfg *Cfg) string {
|
||||
if v := strings.TrimSpace(os.Getenv("BANTAM_TOOLS_DIR")); v != "" {
|
||||
return v
|
||||
}
|
||||
if v := strings.TrimSpace(cfg.Raw["bantam_tools_dir"]); v != "" {
|
||||
return v
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
func prompt(path string) string {
|
||||
if d, err := os.ReadFile(path); err == nil {
|
||||
return strings.TrimSpace(string(d))
|
||||
@@ -1577,6 +1588,9 @@ func main() {
|
||||
sp := prompt("system.txt")
|
||||
cfg := getCfg("model.cfg")
|
||||
cfg.ContextWindow = fetchContextWindow(&cfg)
|
||||
if td := toolsDir(&cfg); td != "" {
|
||||
sp += "\n\nExtra shell tools can be found at " + td
|
||||
}
|
||||
COL = col(cfg)
|
||||
stdin = bufio.NewReader(os.Stdin)
|
||||
msgs := []Message{{Role: "system", Content: strp(sp)}}
|
||||
|
||||
Reference in New Issue
Block a user