mirror of
https://github.com/danny-avila/LibreChat.git
synced 2025-12-23 11:50:14 +01:00
🧹 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:
parent
0dbbf7de04
commit
afee1a2cbd
3 changed files with 364 additions and 209 deletions
|
|
@ -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 (
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue