extra tools path added

This commit is contained in:
Luxferre
2026-08-28 10:56:49 +03:00
parent 699bb429fb
commit 0fd886ed86
2 changed files with 23 additions and 0 deletions
+14
View File
@@ -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)}}