mirror of
https://github.com/KoboldAI/KoboldAI-Client.git
synced 2025-06-05 21:59:24 +02:00
Add ability to have multiple new WI cards.
This commit is contained in:
@@ -7241,7 +7241,7 @@ def UI_2_edit_world_info(data):
|
||||
print("edit_world_info")
|
||||
print(data)
|
||||
|
||||
if data['uid'] == -1:
|
||||
if data['uid'] < 0:
|
||||
koboldai_vars.worldinfo_v2.add_item(data['title'], data['key'],
|
||||
data['keysecondary'], data['folder'],
|
||||
data['constant'], data['manual_text'],
|
||||
|
@@ -2269,7 +2269,13 @@ function add_secondary_tags(tags, data) {
|
||||
}
|
||||
|
||||
function create_new_wi_entry(folder) {
|
||||
data = {"uid": -1,
|
||||
var uid = -1;
|
||||
for (item of document.getElementsByClassName('world_info_card')) {
|
||||
if (parseInt(item.getAttribute("uid")) <= uid) {
|
||||
uid = parseInt(item.getAttribute("uid")) - 1;
|
||||
}
|
||||
}
|
||||
data = {"uid": uid,
|
||||
"title": "New World Info Entry",
|
||||
"key": [],
|
||||
"keysecondary": [],
|
||||
|
Reference in New Issue
Block a user