fix(agents): pass contextFiles to createAgentSession for openai-completions API
Previously, `contextFiles` was resolved from workspace bootstrap files (SOUL.md, USER.md, IDENTITY.md) and embedded into the system prompt via `buildEmbeddedSystemPrompt`, but an empty array `[]` was passed to `createAgentSession`. Some providers using the openai-completions API may use the `contextFiles` parameter directly instead of relying solely on the system prompt override. This fix ensures bootstrap files are passed both: 1. Embedded in the system prompt (existing behavior) 2. Via the `contextFiles` parameter to `createAgentSession` This addresses the issue where models using openai-completions API (like Ollama) were not receiving workspace bootstrap file content. Fixes #3775 Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
da71eaebd2
commit
69c40d6c98
2 files changed
+2
-2
No files matched your search
@@ -397,7 +397,7 @@ export async function compactEmbeddedPiSessionDirect(
|
||||
sessionManager,
|
||||
settingsManager,
|
||||
skills: [],
|
||||
contextFiles: [],
|
||||
contextFiles,
|
||||
additionalExtensionPaths,
|
||||
}));
|
||||
|
||||
|
||||
@@ -460,7 +460,7 @@ export async function runEmbeddedAttempt(
|
||||
sessionManager,
|
||||
settingsManager,
|
||||
skills: [],
|
||||
contextFiles: [],
|
||||
contextFiles,
|
||||
additionalExtensionPaths,
|
||||
}));
|
||||
if (!session) {
|
||||
|
||||
Reference in new issue
Block a user