Skip to content

Commit

Permalink
Merge branch '0xd22f9c/ai-socket-connect' into staging
Browse files Browse the repository at this point in the history
  • Loading branch information
0xd22f9c committed Sep 18, 2024
2 parents fde1396 + 09a2465 commit b50d3dd
Show file tree
Hide file tree
Showing 3 changed files with 45 additions and 1 deletion.
15 changes: 15 additions & 0 deletions src/components/DotPulse/index.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
import React from 'react';

import styles from './styles.module.scss';

const DotPulse = () => {
return (
<div className={styles.dotPulse}>
<div className={styles.dotPulse__dot}>.</div>
<div className={styles.dotPulse__dot}>.</div>
<div className={styles.dotPulse__dot}>.</div>
</div>
);
};

export default DotPulse;
28 changes: 28 additions & 0 deletions src/components/DotPulse/styles.module.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
.dotPulse {
display: flex;
gap: 4px;
align-items: center;
// justify-content: center;

&__dot:nth-child(1) {
animation: dotPulse 1s infinite linear 0s;
}

&__dot:nth-child(2) {
animation: dotPulse 1s infinite linear 0.2s;
}

&__dot:nth-child(3) {
animation: dotPulse 1s infinite linear 0.4s;
}
}

@keyframes dotPulse {
0% {
opacity: 0;
}

100% {
opacity: 1;
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ import useChatBoxState, { ChatBoxStatus } from '../chatbox-store';
import useDappsStore from '../../../stores/useDappStore';
import useNodeHelper from '../../../hooks/useNodeHelper';
import useTemplate from '../../../hooks/useTemplate';
import DotPulse from '@/components/DotPulse';

function MessageStream({ message }: { message: string }) {
const { categories } = useModelCategoriesStore();
Expand Down Expand Up @@ -124,7 +125,7 @@ function MessageStream({ message }: { message: string }) {

{generationStatus.isGeneratingJson &&
!generationStatus.isGeneratedJson ? (
<div>...</div>
<DotPulse />
) : null}

{generationStatus.isGeneratedJson &&
Expand Down

0 comments on commit b50d3dd

Please sign in to comment.