From 36099bc078c3bbb13b2c48188b39ae438fbae8be Mon Sep 17 00:00:00 2001 From: Pabloader Date: Wed, 8 Apr 2026 14:04:49 +0000 Subject: [PATCH] Add scratchpad to chat context --- src/games/storywriter/utils/prompt.ts | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/games/storywriter/utils/prompt.ts b/src/games/storywriter/utils/prompt.ts index 41c9cdc..e323ba9 100644 --- a/src/games/storywriter/utils/prompt.ts +++ b/src/games/storywriter/utils/prompt.ts @@ -303,11 +303,15 @@ namespace Prompt { // Chat-only worlds: system instruction + user info, no story scaffolding if (currentWorld?.chatOnly) { + parts.unshift('# **Roleplay Context**'); const userSection = formatUserSection(state); if (userSection) { parts.push(userSection); } - parts.unshift('# **Roleplay Context**'); + + if (currentStory.scratchpad) { + parts.push(`## Scratchpad`, currentStory.scratchpad); + } parts.push('### **End of Roleplay Context**'); } else { parts.push(`# Story Title: ${currentStory.title}`);