diff --git a/src/games/storywriter/components/chat-sidebar.tsx b/src/games/storywriter/components/chat-sidebar.tsx index 553fe95..3004d44 100644 --- a/src/games/storywriter/components/chat-sidebar.tsx +++ b/src/games/storywriter/components/chat-sidebar.tsx @@ -167,6 +167,8 @@ export const ChatPanel = () => { } try { + const charName = currentWorld.title ?? 'Assistant'; + const prefix = `${charName}: `; let accumulatedContent = ''; let accumulatedReasoning = ''; let tool_calls: LLM.ToolCall[] | undefined; @@ -184,6 +186,9 @@ export const ChatPanel = () => { const content = delta?.content; if (content) { accumulatedContent += content; + if (currentWorld?.chatOnly && accumulatedContent.startsWith(prefix)) { + accumulatedContent = accumulatedContent.slice(prefix.length); + } } const reasoningContent = delta?.reasoning_content; if (reasoningContent) { @@ -496,30 +501,32 @@ export const ChatPanel = () => { )} {currentStory && (