fix: resolver system_prompt_file relativo al directorio del config
Antes, el runtime construia la ruta del system prompt como agents/<agent-id>/<file>, lo cual fallaba para agentes en agents/_specials/ (como Father Bot). Ahora: 1. config.Load() guarda el directorio del config en ConfigDir 2. llm.go usa ConfigDir para resolver rutas relativas Esto corrige que Father Bot operara sin su system prompt completo (369 lineas de instrucciones, pipeline, seguridad) usando solo la description de una linea como fallback. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -3,6 +3,7 @@ package config
|
||||
import (
|
||||
"fmt"
|
||||
"os"
|
||||
"path/filepath"
|
||||
|
||||
"gopkg.in/yaml.v3"
|
||||
)
|
||||
@@ -26,6 +27,8 @@ func Load(path string) (*AgentConfig, error) {
|
||||
return nil, fmt.Errorf("invalid config %s: %w", path, err)
|
||||
}
|
||||
|
||||
cfg.ConfigDir = filepath.Dir(path)
|
||||
|
||||
return &cfg, nil
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user