diff --git a/aiserver.py b/aiserver.py
index 31f03630..ef6f7425 100644
--- a/aiserver.py
+++ b/aiserver.py
@@ -297,6 +297,7 @@ class ImportBuffer:
authors_note: Optional[str] = None
notes: Optional[str] = None
world_infos: Optional[dict] = None
+ title: Optional[str] = None
@dataclass
class PromptPlaceholder:
@@ -416,6 +417,7 @@ class ImportBuffer:
self.memory = j["memory"]
self.authors_note = j["authorsNote"]
self.notes = j["description"]
+ self.title = j["title"] or "Imported Story"
self.world_infos = []
@@ -449,6 +451,7 @@ class ImportBuffer:
koboldai_vars.memory = self.memory or ""
koboldai_vars.authornote = self.authors_note or ""
koboldai_vars.notes = self.notes
+ koboldai_vars.story_name = self.title
for wi in self.world_infos:
koboldai_vars.worldinfo_v2.add_item(
diff --git a/static/koboldai.js b/static/koboldai.js
index 4fdf80c3..b92758af 100644
--- a/static/koboldai.js
+++ b/static/koboldai.js
@@ -76,6 +76,7 @@ var finder_actions = [
{name: "Load Story", icon: "folder_open", type: "action", func: function() { socket.emit('load_story_list', ''); }},
{name: "Save Story", icon: "save", type: "action", func: function() { socket.emit("save_story", null, (response) => {save_as_story(response);}); }},
{name: "Download Story", icon: "file_download", type: "action", func: function() { document.getElementById('download_iframe').src = 'json'; }},
+ {name: "Import Story", icon: "file_download", desc: "Import a prompt from aetherroom.club, formerly prompts.aidg.club", type: "action", func: openClubImport },
// Locations
{name: "Setting Presets", icon: "open_in_new", type: "location", func: function() { highlightEl(".var_sync_model_selected_preset") }},
@@ -4616,6 +4617,10 @@ function updateTitle() {
document.title = `${titleInput.innerText} - KoboldAI Client`;
}
+function openClubImport() {
+ document.getElementById("import_aidg_club_popup").classList.remove("hidden");
+}
+
//// INIT ////
document.onkeydown = detect_key_down;
diff --git a/templates/popups.html b/templates/popups.html
index 0dbe9b98..cc1e7b56 100644
--- a/templates/popups.html
+++ b/templates/popups.html
@@ -22,7 +22,7 @@
Load from Local
-