diff --git a/packages/bolt/app/components/chat/Chat.client.tsx b/packages/bolt/app/components/chat/Chat.client.tsx index a12128f..a8fa27c 100644 --- a/packages/bolt/app/components/chat/Chat.client.tsx +++ b/packages/bolt/app/components/chat/Chat.client.tsx @@ -4,13 +4,13 @@ import { useAnimate } from 'framer-motion'; import { useEffect, useRef, useState } from 'react'; import { cssTransition, toast, ToastContainer } from 'react-toastify'; import { useMessageParser, usePromptEnhancer, useSnapScroll } from '~/lib/hooks'; +import { useChatHistory } from '~/lib/persistence'; import { chatStore } from '~/lib/stores/chat'; import { workbenchStore } from '~/lib/stores/workbench'; import { fileModificationsToHTML } from '~/utils/diff'; import { cubicEasingFn } from '~/utils/easings'; import { createScopedLogger } from '~/utils/logger'; import { BaseChat } from './BaseChat'; -import { useChatHistory } from '~/lib/persistence'; const toastAnimation = cssTransition({ enter: 'animated fadeInRight', diff --git a/packages/bolt/app/lib/hooks/useMessageParser.ts b/packages/bolt/app/lib/hooks/useMessageParser.ts index 324727b..a70fb82 100644 --- a/packages/bolt/app/lib/hooks/useMessageParser.ts +++ b/packages/bolt/app/lib/hooks/useMessageParser.ts @@ -52,14 +52,6 @@ export function useMessageParser() { for (const [index, message] of messages.entries()) { if (message.role === 'assistant') { - /** - * In production, we only parse the last assistant message since previous messages can't change. - * During development they can change, e.g., if the parser gets modified. - */ - if (import.meta.env.PROD && index < messages.length - 1) { - continue; - } - const newParsedContent = messageParser.parse(message.id, message.content); setParsedMessages((prevParsed) => ({