diff --git a/src/games/storywriter/contexts/state.tsx b/src/games/storywriter/contexts/state.tsx index da92cb9..108ef26 100644 --- a/src/games/storywriter/contexts/state.tsx +++ b/src/games/storywriter/contexts/state.tsx @@ -337,6 +337,8 @@ function reducer(state: IState, action: Action): IState { const world = state.worlds.find(w => w.id === action.worldId); const original = world?.stories.find(s => s.id === action.id); if (!original) return state; + const firstMessage = original.chatMessages[0]; + const chatMessages = world?.chatOnly && firstMessage && firstMessage.role === 'assistant' ? [firstMessage] : []; const newStory: Story = { id: crypto.randomUUID(), title: `${original.title} (Copy)`, @@ -345,7 +347,7 @@ function reducer(state: IState, action: Action): IState { lore: [...original.lore], characters: [...original.characters], locations: [...original.locations], - chatMessages: [], + chatMessages, chapters: [], }; return {