Load recipe deeplinks in single window when app is closed (#4048)
This commit is contained in:
@@ -30,6 +30,7 @@ import { ChatContextManagerProvider } from './context_management/ChatContextMana
|
||||
import 'react-toastify/dist/ReactToastify.css';
|
||||
|
||||
import { ChatType } from '../types/chat';
|
||||
import { DEFAULT_CHAT_TITLE } from '../contexts/ChatContext';
|
||||
|
||||
export default function Hub({
|
||||
chat: _chat,
|
||||
@@ -57,7 +58,7 @@ export default function Hub({
|
||||
const newChatId = generateSessionId();
|
||||
const newPairChat = {
|
||||
id: newChatId, // This generates a unique ID each time
|
||||
title: 'New Chat',
|
||||
title: DEFAULT_CHAT_TITLE,
|
||||
messages: [], // Always start with empty messages
|
||||
messageHistoryIndex: 0,
|
||||
recipeConfig: null, // Clear recipe for new chats from Hub
|
||||
@@ -68,10 +69,10 @@ export default function Hub({
|
||||
setPairChat(newPairChat);
|
||||
|
||||
// Navigate to pair page with the message to be submitted immediately
|
||||
// No delay needed since we're updating state synchronously
|
||||
setView('pair', {
|
||||
disableAnimation: true,
|
||||
initialMessage: combinedTextFromInput,
|
||||
resetChat: true,
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user