diff --git a/api/server/index.js b/api/server/index.js index 17a3e9f809..9f68518c2a 100644 --- a/api/server/index.js +++ b/api/server/index.js @@ -29,7 +29,8 @@ const projectPath = path.join(__dirname, '..', '..', 'client'); session({ secret: 'chatgpt-clone-random-secrect', resave: false, - saveUninitialized: true + saveUninitialized: true, + cookie: { maxAge: 7 * 24 * 60 * 60 * 1000 } // 7 days }) ); diff --git a/client/src/store/conversation.js b/client/src/store/conversation.js index 7ae123c254..b59aef4af5 100644 --- a/client/src/store/conversation.js +++ b/client/src/store/conversation.js @@ -131,7 +131,7 @@ const useConversation = () => { ); }; - const searchPlaceholderConversation = ({ model = null, chatGptLabel = null, promptPrefix = null } = {}) => { + const searchPlaceholderConversation = () => { switchToConversation( { conversationId: 'search', @@ -140,9 +140,9 @@ const useConversation = () => { conversationSignature: null, clientId: null, invocationId: null, - model: model, - chatGptLabel: chatGptLabel, - promptPrefix: promptPrefix, + model: null, + chatGptLabel: null, + promptPrefix: null, user: null, suggestions: [], toneStyle: null