Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
chenpangpang
open-webui
Commits
27e74948
"src/lib/vscode:/vscode.git/clone" did not exist on "3bbd238d7d128cd876aeb3d0330af67d906637b8"
Commit
27e74948
authored
Jul 16, 2024
by
Timothy J. Baek
Browse files
refac: title gen should only run once
parent
f0a8aca0
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
2 deletions
+2
-2
src/lib/components/chat/Chat.svelte
src/lib/components/chat/Chat.svelte
+2
-2
No files found.
src/lib/components/chat/Chat.svelte
View file @
27e74948
...
@@ -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);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment