Remove unused persona marketplace and discover page files.
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
import {download, multipart, post} from "./api.js";
|
||||
|
||||
export function createWorkspaceTransfer({conversation, getChatById, setNotice, promptPopup, confirmPopup, setChatLoading, loadPersonas, loadChatSessions}) {
|
||||
export function createWorkspaceTransfer({conversation, getChatById, setNotice, promptPopup, confirmPopup, setChatLoading, loadChatSessions}) {
|
||||
async function exportCurrentChat() {
|
||||
const chat = getChatById(conversation.activeChatId);
|
||||
if (!chat || !conversation.currentMessages.length) return;
|
||||
@@ -78,7 +78,7 @@ export function createWorkspaceTransfer({conversation, getChatById, setNotice, p
|
||||
setChatLoading(true, "Importing workspace and images...");
|
||||
const result = await submit("/imports/workspace/archive", Boolean(preview.preview?.duplicates?.length));
|
||||
if (result.error) return setNotice(result.error, "error");
|
||||
await Promise.all([loadPersonas(), loadChatSessions()]);
|
||||
await loadChatSessions();
|
||||
setNotice(`Workspace imported: ${result.imported.chats} chats with their images.`, "success");
|
||||
} catch { setNotice("Workspace archive could not be imported.", "error"); }
|
||||
finally { setChatLoading(false); }
|
||||
@@ -118,7 +118,7 @@ export function createWorkspaceTransfer({conversation, getChatById, setNotice, p
|
||||
const detail = (imported.errors || imported.warnings || []).slice(0, 4).join("; ");
|
||||
return setNotice(detail || imported.error, "error");
|
||||
}
|
||||
await Promise.all([loadPersonas(), loadChatSessions()]);
|
||||
await loadChatSessions();
|
||||
setChatLoading(false);
|
||||
setNotice(`Workspace imported: ${imported.imported.personas} personas, ${imported.imported.chats} chats, ${imported.imported.templates} templates.`, "success");
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user