|
@@ -1979,18 +1979,22 @@
|
|
|
let _chatId = $chatId;
|
|
|
|
|
|
if (!$temporaryChatEnabled) {
|
|
|
- chat = await createNewChat(localStorage.token, {
|
|
|
- id: _chatId,
|
|
|
- title: $i18n.t('New Chat'),
|
|
|
- models: selectedModels,
|
|
|
- system: $settings.system ?? undefined,
|
|
|
- params: params,
|
|
|
- history: history,
|
|
|
- messages: createMessagesList(history, history.currentId),
|
|
|
- tags: [],
|
|
|
- ...($selectedFolder ? { folder_id: $selectedFolder?.id } : {}),
|
|
|
- timestamp: Date.now()
|
|
|
- });
|
|
|
+ chat = await createNewChat(
|
|
|
+ localStorage.token,
|
|
|
+ {
|
|
|
+ id: _chatId,
|
|
|
+ title: $i18n.t('New Chat'),
|
|
|
+ models: selectedModels,
|
|
|
+ system: $settings.system ?? undefined,
|
|
|
+ params: params,
|
|
|
+ history: history,
|
|
|
+ messages: createMessagesList(history, history.currentId),
|
|
|
+ tags: [],
|
|
|
+
|
|
|
+ timestamp: Date.now()
|
|
|
+ },
|
|
|
+ $selectedFolder?.id
|
|
|
+ );
|
|
|
|
|
|
_chatId = chat.id;
|
|
|
await chatId.set(_chatId);
|