diff --git a/client/src/components/Conversations/Conversation.jsx b/client/src/components/Conversations/Conversation.jsx index 59128f6244..7db57378c6 100644 --- a/client/src/components/Conversations/Conversation.jsx +++ b/client/src/components/Conversations/Conversation.jsx @@ -18,7 +18,6 @@ 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 { @@ -35,6 +34,8 @@ export default function Conversation({ conversation, retainView }) { toneStyle } = conversation; + const [titleInput, setTitleInput] = useState(title); + const rename = manualSWR(`/api/convos/update`, 'post'); const bingData = conversationSignature diff --git a/client/src/components/MessageHandler/index.jsx b/client/src/components/MessageHandler/index.jsx index 2a7d329be1..5f13729af2 100644 --- a/client/src/components/MessageHandler/index.jsx +++ b/client/src/components/MessageHandler/index.jsx @@ -1,6 +1,6 @@ import React, { useEffect, useRef, useState } from 'react'; import { useRecoilState, useResetRecoilState, useSetRecoilState } from 'recoil'; -import { SSE } from '~/utils/sse'; +import { SSE } from '~/utils/sse.mjs'; import { useMessageHandler } from '../../utils/handleSubmit'; import createPayload from '~/utils/createPayload'; diff --git a/client/src/components/Messages/Content/Content.jsx b/client/src/components/Messages/Content/Content.jsx index 166562059c..3cb0e25923 100644 --- a/client/src/components/Messages/Content/Content.jsx +++ b/client/src/components/Messages/Content/Content.jsx @@ -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 = [ diff --git a/client/src/hooks/ThemeContext.js b/client/src/hooks/ThemeContext.jsx similarity index 97% rename from client/src/hooks/ThemeContext.js rename to client/src/hooks/ThemeContext.jsx index f575ab9110..7ca4e702a7 100644 --- a/client/src/hooks/ThemeContext.js +++ b/client/src/hooks/ThemeContext.jsx @@ -42,5 +42,5 @@ export const ThemeProvider = ({ initialTheme, children }) => { rawSetTheme(theme); }, [theme]); - return {children}; + return {children} }; diff --git a/client/src/utils/index.js b/client/src/utils/index.jsx similarity index 100% rename from client/src/utils/index.js rename to client/src/utils/index.jsx diff --git a/client/src/utils/languages.js b/client/src/utils/languages.mjs similarity index 98% rename from client/src/utils/languages.js rename to client/src/utils/languages.mjs index 4162649841..416c1bfeb7 100644 --- a/client/src/utils/languages.js +++ b/client/src/utils/languages.mjs @@ -353,4 +353,4 @@ const langSubset = [ 'yaml', ]; -module.exports = { languages, langSubset }; \ No newline at end of file +export { languages, langSubset }; \ No newline at end of file diff --git a/client/src/utils/sse.js b/client/src/utils/sse.mjs similarity index 97% rename from client/src/utils/sse.js rename to client/src/utils/sse.mjs index 72f49dfc4b..dce09d15b4 100644 --- a/client/src/utils/sse.js +++ b/client/src/utils/sse.mjs @@ -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 }; +// }