-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
FE: React Query Cache Bug fixes + typewritter Animation + Toaster add…
…itons (#59) * FE: add react toaster to show BE errors * FE: Fix the Backend toaster message * FE: fix nested button validation issue + fix the login message * FE: minor front end fix-ups * FE: Login and register components padding additions fix * FE: Minor styling fixes * FE: add scrolling into the written text * FE: Fix the Caching Continue conversation issue * FE: Fix the Caching Continue conversation issue * FE: Fix linting issues * FE: adding minor TODOs
- Loading branch information
Showing
18 changed files
with
181 additions
and
37 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
19 changes: 16 additions & 3 deletions
19
frontend/src/pages/Conversation/Discussions/Discussion.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,15 +1,28 @@ | ||
import { PromptRole, PromptRoleType } from "models/Discussion.ts"; | ||
import { clsx } from "clsx"; | ||
import AnimateText from "ui/AnimateText.tsx"; | ||
|
||
interface DiscussionProps { | ||
role: PromptRoleType; | ||
text: string; | ||
animate?: boolean; | ||
} | ||
|
||
export default function Discussion({ role, text }: DiscussionProps) { | ||
export default function Discussion({ role, text, animate }: DiscussionProps) { | ||
return ( | ||
<div className="flex flex-col text-white"> | ||
<div className="font-bold">{role === PromptRole.User ? "YOU" : "Chatto"}</div> | ||
<div>{text}</div> | ||
<div | ||
className={clsx( | ||
{ | ||
"text-blue-600": role === PromptRole.Assistant, | ||
"text-green-600": role === PromptRole.User, | ||
}, | ||
"font-bold", | ||
)} | ||
> | ||
{role === PromptRole.User ? "YOU" : "Chatto"} | ||
</div> | ||
{animate ? <AnimateText text={text} speed={10} /> : <div>{text}</div>} | ||
</div> | ||
); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.