mirror of
https://github.com/danny-avila/LibreChat.git
synced 2025-12-22 03:10:15 +01:00
Merge branch 'main' into feat-endpoint-style-structure
This commit is contained in:
commit
8fa20d9356
18 changed files with 2281 additions and 24 deletions
|
|
@ -16,11 +16,12 @@ export default function Conversation({ conversation, retainView }) {
|
|||
const { switchToConversation } = store.useConversation();
|
||||
|
||||
const [renaming, setRenaming] = useState(false);
|
||||
const [titleInput, setTitleInput] = useState(title);
|
||||
const inputRef = useRef(null);
|
||||
|
||||
const { conversationId, title } = conversation;
|
||||
|
||||
const [titleInput, setTitleInput] = useState(title);
|
||||
|
||||
const rename = manualSWR(`/api/convos/update`, 'post');
|
||||
|
||||
const clickHandler = async () => {
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
import { useEffect } from 'react';
|
||||
import { useRecoilValue, useResetRecoilState, useSetRecoilState } from 'recoil';
|
||||
import { SSE } from '~/utils/sse';
|
||||
import { SSE } from '~/utils/sse.mjs';
|
||||
import createPayload from '~/utils/createPayload';
|
||||
|
||||
import store from '~/store';
|
||||
|
|
|
|||
|
|
@ -6,7 +6,7 @@ import remarkMath from 'remark-math';
|
|||
import remarkGfm from 'remark-gfm';
|
||||
import rehypeRaw from 'rehype-raw'
|
||||
import CodeBlock from './CodeBlock';
|
||||
import { langSubset } from '~/utils/languages';
|
||||
import { langSubset } from '~/utils/languages.mjs';
|
||||
|
||||
const Content = React.memo(({ content }) => {
|
||||
let rehypePlugins = [
|
||||
|
|
|
|||
|
|
@ -42,5 +42,5 @@ export const ThemeProvider = ({ initialTheme, children }) => {
|
|||
rawSetTheme(theme);
|
||||
}, [theme]);
|
||||
|
||||
return <ThemeContext.Provider value={{ theme, setTheme }}>{children}</ThemeContext.Provider>;
|
||||
return <ThemeContext.Provider value={{ theme, setTheme }}>{children}</ThemeContext.Provider>
|
||||
};
|
||||
21
client/src/main.jsx
Normal file
21
client/src/main.jsx
Normal file
|
|
@ -0,0 +1,21 @@
|
|||
import React from 'react';
|
||||
import { createRoot } from 'react-dom/client';
|
||||
// import { Provider } from 'react-redux';
|
||||
// import { store } from './src/store';
|
||||
import { RecoilRoot } from 'recoil';
|
||||
|
||||
import { ThemeProvider } from './hooks/ThemeContext';
|
||||
import App from './App';
|
||||
import './style.css';
|
||||
import './mobile.css';
|
||||
|
||||
const container = document.getElementById('root');
|
||||
const root = createRoot(container);
|
||||
|
||||
root.render(
|
||||
<RecoilRoot>
|
||||
<ThemeProvider>
|
||||
<App />
|
||||
</ThemeProvider>
|
||||
</RecoilRoot>
|
||||
);
|
||||
|
|
@ -353,4 +353,4 @@ const langSubset = [
|
|||
'yaml',
|
||||
];
|
||||
|
||||
module.exports = { languages, langSubset };
|
||||
export { languages, langSubset };
|
||||
|
|
@ -211,8 +211,9 @@ var SSE = function (url, options) {
|
|||
};
|
||||
};
|
||||
|
||||
export { SSE };
|
||||
// Export our SSE module for npm.js
|
||||
if (typeof exports !== 'undefined') {
|
||||
// exports.SSE = SSE;
|
||||
module.exports = { SSE };
|
||||
}
|
||||
// if (typeof exports !== 'undefined') {
|
||||
// // exports.SSE = SSE;
|
||||
// module.exports = { SSE };
|
||||
// }
|
||||
Loading…
Add table
Add a link
Reference in a new issue