"src/lib/vscode:/vscode.git/clone" did not exist on "3bbd238d7d128cd876aeb3d0330af67d906637b8"
Commit 27e74948 authored by Timothy J. Baek's avatar Timothy J. Baek
Browse files

refac: title gen should only run once

parent f0a8aca0
...@@ -990,7 +990,7 @@ ...@@ -990,7 +990,7 @@
scrollToBottom(); scrollToBottom();
} }
if (messages.length == 2 && messages.at(1).content !== '') { if (messages.length == 2 && messages.at(1).content !== '' && selectedModels[0] === model.id) {
window.history.replaceState(history.state, '', `/c/${_chatId}`); window.history.replaceState(history.state, '', `/c/${_chatId}`);
const _title = await generateChatTitle(userPrompt); const _title = await generateChatTitle(userPrompt);
await setChatTitle(_chatId, _title); await setChatTitle(_chatId, _title);
...@@ -1252,7 +1252,7 @@ ...@@ -1252,7 +1252,7 @@
scrollToBottom(); scrollToBottom();
} }
if (messages.length == 2) { if (messages.length == 2 && selectedModels[0] === model.id) {
window.history.replaceState(history.state, '', `/c/${_chatId}`); window.history.replaceState(history.state, '', `/c/${_chatId}`);
const _title = await generateChatTitle(userPrompt); const _title = await generateChatTitle(userPrompt);
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment