🛠️ fix: RunManager, AssistantService and useContentHandler Issues (#1920)

* fix(useContentHandler): retain undefined parts and handle them within `ContentParts` rendering

* fix(AssistantService/in_progress): skip empty messages

* refactor(RunManager): create highly specific `seenSteps` Set keys for RunSteps with use of `getDetailsSignature` and `getToolCallSignature`,to ensure changes from polling are always captured
This commit is contained in:
Danny Avila 2024-02-28 15:15:45 -05:00 committed by GitHub
parent 057fcf6274
commit 388dc1789b
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
4 changed files with 60 additions and 10 deletions

View file

@ -1,12 +1,10 @@
import { Suspense } from 'react';
// import type { ContentPart } from 'librechat-data-provider';
import type { TMessageContentParts } from 'librechat-data-provider';
import { UnfinishedMessage } from './MessageContent';
import { DelayedRender } from '~/components/ui';
import Part from './Part';
// Content Component
const ContentParts = ({
edit,
error,
unfinished,
isSubmitting,
@ -17,15 +15,16 @@ const ContentParts = ({
any) => {
if (error) {
// return <ErrorMessage text={text} />;
} else if (edit) {
// return <EditMessage text={text} isSubmitting={isSubmitting} {...props} />;
} else {
const { message } = props;
const { messageId } = message;
return (
<>
{content.map((part, idx) => {
{content.map((part: TMessageContentParts | undefined, idx: number) => {
if (!part) {
return null;
}
return (
<Part
key={`display-${messageId}-${idx}`}