From 4b6c4b326052e25afb6cffcf4f14cbe73d9f163e Mon Sep 17 00:00:00 2001 From: "google-labs-jules[bot]" <161369871+google-labs-jules[bot]@users.noreply.github.com> Date: Sat, 2 Aug 2025 21:13:18 +0000 Subject: [PATCH] fix: Combine prompt and memory to encourage tool use --- src/handlers/posts.ts | 12 ++---------- 1 file changed, 2 insertions(+), 10 deletions(-) diff --git a/src/handlers/posts.ts b/src/handlers/posts.ts index 7ef23c4..9436d07 100644 --- a/src/handlers/posts.ts +++ b/src/handlers/posts.ts @@ -35,17 +35,9 @@ async function generateAIResponse(post: Post, memory: string, parsedThread: stri role: "model" as const, parts: [ { - /* - ? Once memory blocks are working, this will pull the prompt from the database, and the prompt will be - ? automatically initialized with the administrator's handle from the env variables. I only did this so - ? that if anybody runs the code themselves, they just have to edit the env variables, nothing else. - */ - text: modelPrompt + text: `${modelPrompt .replace("{{ administrator }}", env.ADMIN_HANDLE) - .replace("{{ handle }}", env.HANDLE), - }, - { - text: memory, + .replace("{{ handle }}", env.HANDLE)}\n\n${memory}`, }, ], },