Skip to content

Commit

Permalink
fix empty check
Browse files Browse the repository at this point in the history
  • Loading branch information
0xd22f9c committed Sep 20, 2024
1 parent aee2b72 commit 5a19c53
Showing 1 changed file with 3 additions and 4 deletions.
Original file line number Diff line number Diff line change
@@ -1,17 +1,16 @@
import React, { useMemo } from 'react';

import DotPulse from '@/components/DotPulse';
import { IModelCategory } from '@/types/customize-model';
import Lego from '../../../component4/Lego';
import useNodeHelper from '../../../hooks/useNodeHelper';
import useTemplate from '../../../hooks/useTemplate';
import { draggedDappIndexesSignal } from '../../../signals/useDragSignal';
import useDappsStore from '../../../stores/useDappStore';
import useModelCategoriesStore from '../../../stores/useModelCategoriesStore';
import { chainKeyToDappKey } from '../../../utils';
import useChatBoxState, { ChatBoxStatus } from '../chatbox-store';
import { blockLegoResponseToModelCategory } from '../utils/convertApiUtils';
import styles from './styles.module.scss';
import { draggedDappIndexesSignal } from '../../../signals/useDragSignal';

function MessageStream({ message }: { message: string }) {
const { categories } = useModelCategoriesStore();
Expand Down Expand Up @@ -105,8 +104,8 @@ function MessageStream({ message }: { message: string }) {

const isEmpty = useMemo(() => {
return (
generationStatus.beforeJsonBlock === '' &&
generationStatus.afterJsonBlock === '' &&
(generationStatus.beforeJsonBlock || '').replaceAll(' ', '') === '' &&
(generationStatus.afterJsonBlock || '').replaceAll(' ', '') === '' &&
generationStatus.template.length === 0
);
}, [generationStatus]);
Expand Down

0 comments on commit 5a19c53

Please sign in to comment.