mirror of
https://github.com/danny-avila/LibreChat.git
synced 2025-12-19 09:50:15 +01:00
🖋️ feat: Add option to render User Messages as Markdown (#4170)
This commit is contained in:
parent
42b7373ddc
commit
be44caaab1
10 changed files with 94 additions and 21 deletions
|
|
@ -1,9 +1,10 @@
|
|||
import { useRecoilState } from 'recoil';
|
||||
import Cookies from 'js-cookie';
|
||||
import React, { useContext, useCallback, useRef } from 'react';
|
||||
import React, { useContext, useCallback } from 'react';
|
||||
import type { TDangerButtonProps } from '~/common';
|
||||
import { ThemeContext, useLocalize } from '~/hooks';
|
||||
import UserMsgMarkdownSwitch from './UserMsgMarkdownSwitch';
|
||||
import HideSidePanelSwitch from './HideSidePanelSwitch';
|
||||
import { ThemeContext, useLocalize } from '~/hooks';
|
||||
import AutoScrollSwitch from './AutoScrollSwitch';
|
||||
import ArchivedChats from './ArchivedChats';
|
||||
import { Dropdown } from '~/components/ui';
|
||||
|
|
@ -123,8 +124,6 @@ function General() {
|
|||
|
||||
const [langcode, setLangcode] = useRecoilState(store.lang);
|
||||
|
||||
const contentRef = useRef(null);
|
||||
|
||||
const changeTheme = useCallback(
|
||||
(value: string) => {
|
||||
setTheme(value);
|
||||
|
|
@ -156,6 +155,9 @@ function General() {
|
|||
<div className="border-b border-border-medium pb-3 last-of-type:border-b-0">
|
||||
<LangSelector langcode={langcode} onChange={changeLang} />
|
||||
</div>
|
||||
<div className="border-b border-border-medium pb-3 last-of-type:border-b-0">
|
||||
<UserMsgMarkdownSwitch />
|
||||
</div>
|
||||
<div className="border-b border-border-medium pb-3 last-of-type:border-b-0">
|
||||
<AutoScrollSwitch />
|
||||
</div>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue