Fix custom system prompts missing context, skills, date/time, cwd
fixes #321
This commit is contained in:
@@ -2,6 +2,10 @@
|
|||||||
|
|
||||||
## [Unreleased]
|
## [Unreleased]
|
||||||
|
|
||||||
|
### Fixed
|
||||||
|
|
||||||
|
- **Custom system prompts missing context**: When using a custom system prompt string, project context files (AGENTS.md), skills, date/time, and working directory were not appended. ([#321](https://github.com/badlogic/pi-mono/issues/321))
|
||||||
|
|
||||||
## [0.30.0] - 2025-12-25
|
## [0.30.0] - 2025-12-25
|
||||||
|
|
||||||
### Breaking Changes
|
### Breaking Changes
|
||||||
|
|||||||
@@ -550,7 +550,13 @@ export async function createAgentSession(options: CreateAgentSessionOptions = {}
|
|||||||
if (options.systemPrompt === undefined) {
|
if (options.systemPrompt === undefined) {
|
||||||
systemPrompt = defaultPrompt;
|
systemPrompt = defaultPrompt;
|
||||||
} else if (typeof options.systemPrompt === "string") {
|
} else if (typeof options.systemPrompt === "string") {
|
||||||
systemPrompt = options.systemPrompt;
|
systemPrompt = buildSystemPromptInternal({
|
||||||
|
cwd,
|
||||||
|
agentDir,
|
||||||
|
skills,
|
||||||
|
contextFiles,
|
||||||
|
customPrompt: options.systemPrompt,
|
||||||
|
});
|
||||||
} else {
|
} else {
|
||||||
systemPrompt = options.systemPrompt(defaultPrompt);
|
systemPrompt = options.systemPrompt(defaultPrompt);
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user