mirror of
https://github.com/getcompanion-ai/co-mono.git
synced 2026-04-17 03:03:44 +00:00
Fix custom system prompts missing context, skills, date/time, cwd
fixes #321
This commit is contained in:
parent
9652072f20
commit
fbfdeb2c2e
2 changed files with 11 additions and 1 deletions
|
|
@ -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);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue