mirror of
https://github.com/getcompanion-ai/co-mono.git
synced 2026-04-15 21:03:19 +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
|
|
@ -550,7 +550,13 @@ export async function createAgentSession(options: CreateAgentSessionOptions = {}
|
|||
if (options.systemPrompt === undefined) {
|
||||
systemPrompt = defaultPrompt;
|
||||
} else if (typeof options.systemPrompt === "string") {
|
||||
systemPrompt = options.systemPrompt;
|
||||
systemPrompt = buildSystemPromptInternal({
|
||||
cwd,
|
||||
agentDir,
|
||||
skills,
|
||||
contextFiles,
|
||||
customPrompt: options.systemPrompt,
|
||||
});
|
||||
} else {
|
||||
systemPrompt = options.systemPrompt(defaultPrompt);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue