mirror of
https://github.com/stackblitz-labs/bolt.diy
synced 2025-06-26 18:26:38 +00:00
Disable free uses check when using mock chats (#140)
This commit is contained in:
parent
448660bf58
commit
611aa9fb82
@ -32,6 +32,7 @@ import mergeResponseMessage from '~/components/chat/ChatComponent/functions/merg
|
|||||||
import flushSimulationData from '~/components/chat/ChatComponent/functions/flushSimulation';
|
import flushSimulationData from '~/components/chat/ChatComponent/functions/flushSimulation';
|
||||||
import getRewindMessageIndexAfterReject from '~/components/chat/ChatComponent/functions/getRewindMessageIndexAfterReject';
|
import getRewindMessageIndexAfterReject from '~/components/chat/ChatComponent/functions/getRewindMessageIndexAfterReject';
|
||||||
import flashScreen from '~/components/chat/ChatComponent/functions/flashScreen';
|
import flashScreen from '~/components/chat/ChatComponent/functions/flashScreen';
|
||||||
|
import { usingMockChat } from '~/lib/replay/MockChat';
|
||||||
|
|
||||||
interface ChatProps {
|
interface ChatProps {
|
||||||
initialMessages: Message[];
|
initialMessages: Message[];
|
||||||
@ -160,7 +161,7 @@ const ChatImplementer = memo((props: ChatProps) => {
|
|||||||
|
|
||||||
gActiveChatMessageTelemetry = new ChatMessageTelemetry(messages.length);
|
gActiveChatMessageTelemetry = new ChatMessageTelemetry(messages.length);
|
||||||
|
|
||||||
if (!isLoggedIn) {
|
if (!isLoggedIn && !usingMockChat()) {
|
||||||
const numFreeUses = +(Cookies.get(anthropicNumFreeUsesCookieName) || 0);
|
const numFreeUses = +(Cookies.get(anthropicNumFreeUsesCookieName) || 0);
|
||||||
|
|
||||||
if (numFreeUses >= maxFreeUses) {
|
if (numFreeUses >= maxFreeUses) {
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user