🧹 chore: Bump Agents Dependencies (#7525)

* chore: bump langchain dependencies

* chore: bump @librechat/agents to v2.4.36

* chore: bump @librechat/agents to v2.4.37

* refactor: simplify remark plugins in Markdown component with no conditional usage
This commit is contained in:
Danny Avila 2025-05-23 16:16:04 -04:00
parent 0dbbf7de04
commit afee1a2cbd
No known key found for this signature in database
GPG key ID: BF31EEB2C5CA0956
3 changed files with 364 additions and 209 deletions

View file

@ -12,7 +12,6 @@ import type { Pluggable } from 'unified';
import {
useToastContext,
ArtifactProvider,
useSearchContext,
CodeBlockProvider,
useCodeBlockContext,
} from '~/Providers';
@ -175,7 +174,6 @@ type TContentProps = {
};
const Markdown = memo(({ content = '', isLatestMessage }: TContentProps) => {
const { searchResults } = useSearchContext();
const LaTeXParsing = useRecoilValue<boolean>(store.LaTeXParsing);
const isInitializing = content === '';
@ -201,22 +199,14 @@ const Markdown = memo(({ content = '', isLatestMessage }: TContentProps) => {
[],
);
const searchTurns = useMemo(() => Object.keys(searchResults ?? {}).length, [searchResults]);
const remarkPlugins: Pluggable[] = useMemo(() => {
const plugins: Pluggable[] = [
supersub,
remarkGfm,
remarkDirective,
artifactPlugin,
[remarkMath, { singleDollarTextMath: true }],
];
if (searchTurns > 0) {
plugins.push(unicodeCitation);
}
return plugins;
}, [searchTurns]);
const remarkPlugins: Pluggable[] = [
supersub,
remarkGfm,
remarkDirective,
artifactPlugin,
[remarkMath, { singleDollarTextMath: true }],
unicodeCitation,
];
if (isInitializing) {
return (