mirror of
https://github.com/danny-avila/LibreChat.git
synced 2025-12-19 18:00:15 +01:00
⬤ style: Circular Streaming Cursor (#1736)
* Updated Style Cursor like ChatGPT * style(Markdown.tsx): add space before cursor when there is text * fix: revert OpenAIClient.tokens.js change * fix:(Markdown.tsx): revert change of unused file * fix(convos.spec.ts): test fix * chore: remove raw HTML for cursor animations --------- Co-authored-by: Danny Avila <danacordially@gmail.com> Co-authored-by: Danny Avila <messagedaniel@protonmail.com>
This commit is contained in:
parent
92a41fbf47
commit
a2e85b7053
7 changed files with 75 additions and 58 deletions
|
|
@ -179,9 +179,7 @@ export default function useChatHelpers(index = 0, paramId: string | undefined) {
|
|||
|
||||
// construct the placeholder response message
|
||||
const generation = editedText ?? latestMessage?.text ?? '';
|
||||
const responseText = isEditOrContinue
|
||||
? generation
|
||||
: '<span className="result-streaming">█</span>';
|
||||
const responseText = isEditOrContinue ? generation : '';
|
||||
|
||||
const responseMessageId = editedMessageId ?? latestMessage?.messageId ?? null;
|
||||
const initialResponse: TMessage = {
|
||||
|
|
|
|||
|
|
@ -87,9 +87,7 @@ const useMessageHandler = () => {
|
|||
|
||||
// construct the placeholder response message
|
||||
const generation = editedText ?? latestMessage?.text ?? '';
|
||||
const responseText = isEditOrContinue
|
||||
? generation
|
||||
: '<span className="result-streaming">█</span>';
|
||||
const responseText = isEditOrContinue ? generation : '';
|
||||
|
||||
const responseMessageId = editedMessageId ?? latestMessage?.messageId ?? null;
|
||||
const initialResponse: TMessage = {
|
||||
|
|
@ -99,7 +97,6 @@ const useMessageHandler = () => {
|
|||
messageId: responseMessageId ?? `${isRegenerate ? messageId : fakeMessageId}_`,
|
||||
conversationId,
|
||||
unfinished: false,
|
||||
submitting: true,
|
||||
isCreatedByUser: false,
|
||||
isEdited: isEditOrContinue,
|
||||
error: false,
|
||||
|
|
|
|||
|
|
@ -332,10 +332,6 @@ export default function useSSE(submission: TSubmission | null, index = 0) {
|
|||
} else if (response.status === 204) {
|
||||
const responseMessage = {
|
||||
...submission.initialResponse,
|
||||
text: submission.initialResponse.text.replace(
|
||||
'<span className="result-streaming">█</span>',
|
||||
'',
|
||||
),
|
||||
};
|
||||
|
||||
return {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue