X-Git-Url: https://git.giacomolli.uk/onechat/blobdiff_plain/ddd0a50f7b801112376d7fb27bfd05d2fc26c2fd..7c84ed87ef71088b880a3765b2653e1ded57bf14:/agent.go?ds=sidebyside diff --git a/agent.go b/agent.go index 1be2b0a..1d76c5b 100644 --- a/agent.go +++ b/agent.go @@ -90,7 +90,12 @@ func (a *Agent) Prompt() (string, error) { return "", err } - return prompt(a.config.Name, instructions), nil + path, err := filepath.Abs(filepath.Join(a.dir, agentInstructionsFileName)) + if err != nil { + return "", fmt.Errorf("find instructions path: %w", err) + } + + return prompt(a.config.Name, path, instructions), nil } // SubagentPrompt returns the system prompt of a subagent of the agent, with the