Skip to content

Enhanced ChatGPT Clone: Features Agents, MCP, Skills, DeepSeek, Anthropic, AWS, OpenAI, Responses API, Azure, Groq, o1, GPT-5, Mistral, OpenRouter, Vertex AI, Gemini, Artifacts, AI model switching, message search, Code Interpreter, langchain, DALL-E-3, OpenAPI Actions, Functions, Secure Multi-User Auth, Presets, open-source for self-hosting. Active

fix bing chat not persisting after 1st invocation

Danny Avila61d898c38756
diff --git a/server/routes/ask.js b/server/routes/ask.js
index 6b379f9df1..c7fb4fa5e9 100644
--- a/server/routes/ask.js
+++ b/server/routes/ask.js
@@ -48,8 +48,8 @@ router.post('/bing', async (req, res) => {
convo
});
- // console.log('CLIENT RESPONSE');
- // console.dir(response, { depth: null });
+ console.log('CLIENT RESPONSE');
+ console.dir(response, { depth: null });
userMessage.conversationSignature =
convo.conversationSignature || response.conversationSignature;
diff --git a/src/components/Messages/TextWrapper.jsx b/src/components/Messages/TextWrapper.jsx
index f9c9931e7c..733604e46d 100644
--- a/src/components/Messages/TextWrapper.jsx
+++ b/src/components/Messages/TextWrapper.jsx
@@ -44,7 +44,7 @@ const inLineWrap = (parts) => {
};
export default function TextWrapper({ text }) {
- // append triple backticks to the end of the text if only singular found and language found
+ // append triple backticks to the end of the text only if singular found and language found
if (text.match(/```/g)?.length === 1 && text.match(languageMatch)) {
text += '```';
}
diff --git a/src/components/main/TextChat.jsx b/src/components/main/TextChat.jsx
index 0d6bf3d9b5..5458b31d11 100644
--- a/src/components/main/TextChat.jsx
+++ b/src/components/main/TextChat.jsx
@@ -40,8 +40,6 @@ export default function TextChat({ messages }) {
console.log('in convo handler');
if (model !== 'bingai' && convo.conversationId === null && convo.parentMessageId === null) {
const { title, conversationId, id } = data;
- console.log('parentMessageId is null');
- console.log('title, convoId, id', title, conversationId, id);
dispatch(
setConversation({
title,
@@ -52,17 +50,8 @@ export default function TextChat({ messages }) {
invocationId: null
})
);
- } else if (model === 'bingai' && convo.invocationId === null) {
+ } else if (model === 'bingai' && convo.conversationId === null && convo.invocationId === null) {
const { title, conversationSignature, clientId, conversationId, invocationId } = data;
- console.log('convoSig is null');
- console.log(
- 'bing res data',
- title,
- conversationSignature,
- clientId,
- conversationId,
- invocationId
- );
dispatch(
setConversation({
title,