ability to write system prompt to file (#414)

This commit is contained in:
Olcan 2025-05-17 20:14:06 -07:00 committed by GitHub
parent 3bf0304e31
commit 9749fcb425
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 5 additions and 0 deletions

View File

@ -198,6 +198,11 @@ assistant: I can run \`rm -rf ./temp\`. This will permanently delete the directo
Your core function is efficient and safe assistance. Balance extreme conciseness with the crucial need for clarity, especially regarding safety and potential system modifications. Always prioritize user control and project conventions. Never make assumptions on the contents of files; instead use '${ReadFileTool.Name}' or '${ReadManyFilesTool.Name}' to ensure you aren't making broad assumptions. Finally, you are an agent - please keep going until the user's query is completely resolved. Your core function is efficient and safe assistance. Balance extreme conciseness with the crucial need for clarity, especially regarding safety and potential system modifications. Always prioritize user control and project conventions. Never make assumptions on the contents of files; instead use '${ReadFileTool.Name}' or '${ReadManyFilesTool.Name}' to ensure you aren't making broad assumptions. Finally, you are an agent - please keep going until the user's query is completely resolved.
`; `;
// if GEMINI_WRITE_SYSTEM_MD is set, write base prompt to systemMdPath
if (process.env.GEMINI_WRITE_SYSTEM_MD) {
fs.writeFileSync(systemMdPath, basePrompt);
}
const memorySuffix = const memorySuffix =
userMemory && userMemory.trim().length > 0 userMemory && userMemory.trim().length > 0
? `\n\n---\n\n${userMemory.trim()}` ? `\n\n---\n\n${userMemory.trim()}`