mirror of
https://github.com/mark3labs/kit.git
synced 2026-06-14 03:30:26 +00:00
a95714a22d
When system-prompt was a file path (via --system-prompt, config entry, or SDK Options.SystemPrompt), the path string itself was used as the base prompt because config.LoadSystemPrompt only ran later in BuildProviderConfig — by which point viper had been overwritten with the path-augmented composed text. The LLM received the path instead of the prompt contents. - Call config.LoadSystemPrompt on the raw viper value in New() before PromptBuilder composes runtime context (AGENTS.md / skills / date). - Add HasCustomSystemPrompt() and GetSystemPromptSource() so SDK callers can inspect prompt state without reaching into viper. - Display 'System Prompt loaded: <source>' at startup in CLI and TUI modes, paralleling the per-server 'MCP server loaded' notice. - Add regression tests covering both file-path and inline prompt paths. Fixes #25