From 9b9a6d909aaac0671c2aeb1e8241e982c4f1f959 Mon Sep 17 00:00:00 2001
From: RossAsscends <124905043+RossAscends@users.noreply.github.com>
Date: Sat, 25 Feb 2023 07:00:46 +0900
Subject: [PATCH 01/22] updated gitignore
should hopefully not be tracking these files for future pushes.
---
.gitignore | 12 ++++++------
1 file changed, 6 insertions(+), 6 deletions(-)
diff --git a/.gitignore b/.gitignore
index 7318ff31a..99842d7df 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1,7 +1,7 @@
-node_modules
-/public/chats
-/public/characters
-/public/User Avatars
-/public/backgrounds
-/uploads
+node_modules/
+/public/chats/
+/public/characters/
+/public/User Avatars/
+/public/backgrounds/
+/uploads/
/config.conf
\ No newline at end of file
From cc55a885a457165bab4c435c83025984053051d4 Mon Sep 17 00:00:00 2001
From: RossAscends <124905043+RossAscends@users.noreply.github.com>
Date: Sat, 25 Feb 2023 16:44:49 +0900
Subject: [PATCH 02/22] Update style.css
---
public/style.css | 1 -
1 file changed, 1 deletion(-)
diff --git a/public/style.css b/public/style.css
index 5bf5a566a..dc0837be5 100644
--- a/public/style.css
+++ b/public/style.css
@@ -1475,7 +1475,6 @@ label.checkbox span {
}
label.checkbox :checked + span {
- background:red;
width:20px;
height:20px;
margin: 0px;
From 001c8fa2b88cb78aaecae29051b27b474a18c440 Mon Sep 17 00:00:00 2001
From: RossAsscends <124905043+RossAscends@users.noreply.github.com>
Date: Sat, 25 Feb 2023 16:46:41 +0900
Subject: [PATCH 03/22] Update .gitignore
---
.gitignore | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/.gitignore b/.gitignore
index 99842d7df..180dcb918 100644
--- a/.gitignore
+++ b/.gitignore
@@ -4,4 +4,7 @@ node_modules/
/public/User Avatars/
/public/backgrounds/
/uploads/
-/config.conf
\ No newline at end of file
+/config.conf
+*.jsonl
+public/characters/update.txt
+public/settings.json
From 13a1110474e0a64c0cc64dc88032c134f70c7cfd Mon Sep 17 00:00:00 2001
From: RossAsscends <124905043+RossAscends@users.noreply.github.com>
Date: Sat, 25 Feb 2023 16:49:56 +0900
Subject: [PATCH 04/22] Update .gitignore
---
.gitignore | 1 +
1 file changed, 1 insertion(+)
diff --git a/.gitignore b/.gitignore
index 180dcb918..1b06dbc36 100644
--- a/.gitignore
+++ b/.gitignore
@@ -8,3 +8,4 @@ node_modules/
*.jsonl
public/characters/update.txt
public/settings.json
+public/chats/Aqua/1673181146000.jsonl
From a0efd37a0caa6d6c0790f4f736b747bffe1f3346 Mon Sep 17 00:00:00 2001
From: RossAsscends <124905043+RossAscends@users.noreply.github.com>
Date: Sat, 25 Feb 2023 16:50:28 +0900
Subject: [PATCH 05/22] Update .gitignore
---
.gitignore | 1 +
1 file changed, 1 insertion(+)
diff --git a/.gitignore b/.gitignore
index 1b06dbc36..fcd24c956 100644
--- a/.gitignore
+++ b/.gitignore
@@ -9,3 +9,4 @@ node_modules/
public/characters/update.txt
public/settings.json
public/chats/Aqua/1673181146000.jsonl
+*.jsonl
From de6cfc339adf3ca2f163ffdb144480bb6ac6406f Mon Sep 17 00:00:00 2001
From: RossAsscends <124905043+RossAscends@users.noreply.github.com>
Date: Sat, 25 Feb 2023 16:56:31 +0900
Subject: [PATCH 06/22] Update .gitignore
---
.gitignore | 11 ++++-------
1 file changed, 4 insertions(+), 7 deletions(-)
diff --git a/.gitignore b/.gitignore
index fcd24c956..9aae58447 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1,12 +1,9 @@
node_modules/
-/public/chats/
-/public/characters/
-/public/User Avatars/
-/public/backgrounds/
+public/chats/
+public/characters/
+public/User Avatars/
+public/backgrounds/
/uploads/
/config.conf
*.jsonl
-public/characters/update.txt
public/settings.json
-public/chats/Aqua/1673181146000.jsonl
-*.jsonl
From d400a74bed0c73cb4c2763834640c1f9f5dd3518 Mon Sep 17 00:00:00 2001
From: RossAsscends <124905043+RossAscends@users.noreply.github.com>
Date: Sat, 25 Feb 2023 16:57:34 +0900
Subject: [PATCH 07/22] Update .gitignore
---
.gitignore | 1 +
1 file changed, 1 insertion(+)
diff --git a/.gitignore b/.gitignore
index 9aae58447..6ccd22666 100644
--- a/.gitignore
+++ b/.gitignore
@@ -7,3 +7,4 @@ public/backgrounds/
/config.conf
*.jsonl
public/settings.json
+public/chats/Aqua/1673181146000.jsonl
From 2cda7710554b1cf6112d290143d9bee82be56d51 Mon Sep 17 00:00:00 2001
From: RossAsscends <124905043+RossAscends@users.noreply.github.com>
Date: Sat, 25 Feb 2023 17:03:34 +0900
Subject: [PATCH 08/22] removed character and chats from this branch
just trying to update the gitignore
---
public/characters/update.txt | 0
public/chats/Aqua/1673181146000.jsonl | 2 --
public/chats/Darkness/1673225255706.jsonl | 2 --
public/chats/Megumin/1673323621108.jsonl | 2 --
4 files changed, 6 deletions(-)
delete mode 100644 public/characters/update.txt
delete mode 100644 public/chats/Aqua/1673181146000.jsonl
delete mode 100644 public/chats/Darkness/1673225255706.jsonl
delete mode 100644 public/chats/Megumin/1673323621108.jsonl
diff --git a/public/characters/update.txt b/public/characters/update.txt
deleted file mode 100644
index e69de29bb..000000000
diff --git a/public/chats/Aqua/1673181146000.jsonl b/public/chats/Aqua/1673181146000.jsonl
deleted file mode 100644
index edb024759..000000000
--- a/public/chats/Aqua/1673181146000.jsonl
+++ /dev/null
@@ -1,2 +0,0 @@
-{"user_name":"You","character_name":"Aqua","create_date":1674559896839}
-{"name":"Aqua","is_user":false,"is_name":true,"send_date":1674563371558,"mes":"*I am in the town square at a city named \"Axel\". It's morning on Saturday and i suddenly noticed a person look like don't know what he's doing. I approached to him and speak* Are you new here? Do you need help? Don't worry, I, aqua the goddess of water, shall help you! Do i look beautiful? *strikes a pose and look at him with puppy eyes*"}
\ No newline at end of file
diff --git a/public/chats/Darkness/1673225255706.jsonl b/public/chats/Darkness/1673225255706.jsonl
deleted file mode 100644
index 33f28a349..000000000
--- a/public/chats/Darkness/1673225255706.jsonl
+++ /dev/null
@@ -1,2 +0,0 @@
-{"user_name":"You","character_name":"Darkness","create_date":1674559899431}
-{"name":"Darkness","is_user":false,"is_name":true,"send_date":1674564914912,"mes":"*It's a sunny day, in a big park on which there are many people, some walking and others lying in the sun. The weather is warm and I walk in the park looking for someone who wants to be helped by me. Suddenly realise that someone is looking at me.* Hello, I am Darkness, a Crusader, and would you like some help?"}
\ No newline at end of file
diff --git a/public/chats/Megumin/1673323621108.jsonl b/public/chats/Megumin/1673323621108.jsonl
deleted file mode 100644
index 14a25aa6c..000000000
--- a/public/chats/Megumin/1673323621108.jsonl
+++ /dev/null
@@ -1,2 +0,0 @@
-{"user_name":"You","character_name":"Megumin","create_date":1674559900991}
-{"name":"Megumin","is_user":false,"is_name":true,"send_date":1674563153854,"mes":"*It was day, the weather was sunny and windless. We accidentally crossed paths near the city in a clearing, I was going to train explosion magic. When I noticed you i stand up in a pretentious and personable pose, and say loudly* I'm Megumin! The Arch Wizard of the Crimson Magic Clan! And i the best at explosion magic!! What are you doing here?"}
\ No newline at end of file
From 64a1ecac7e0e9967facfe0384f529774bae6ae2b Mon Sep 17 00:00:00 2001
From: RossAsscends <124905043+RossAscends@users.noreply.github.com>
Date: Sat, 25 Feb 2023 17:04:32 +0900
Subject: [PATCH 09/22] Update .gitignore
---
.gitignore | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/.gitignore b/.gitignore
index 6ccd22666..ebaffe7b6 100644
--- a/.gitignore
+++ b/.gitignore
@@ -7,4 +7,4 @@ public/backgrounds/
/config.conf
*.jsonl
public/settings.json
-public/chats/Aqua/1673181146000.jsonl
+
From d63c5683e3c5a8de9ca4c2d153006ca5ba210cf7 Mon Sep 17 00:00:00 2001
From: RossAsscends <124905043+RossAscends@users.noreply.github.com>
Date: Sat, 25 Feb 2023 17:09:13 +0900
Subject: [PATCH 10/22] removing more files so gitignore will stop tracking
---
.gitignore | 1 +
config.conf | 8 --------
2 files changed, 1 insertion(+), 8 deletions(-)
delete mode 100644 config.conf
diff --git a/.gitignore b/.gitignore
index ebaffe7b6..78e148fb7 100644
--- a/.gitignore
+++ b/.gitignore
@@ -8,3 +8,4 @@ public/backgrounds/
*.jsonl
public/settings.json
+config.conf
diff --git a/config.conf b/config.conf
deleted file mode 100644
index 38a6aeac0..000000000
--- a/config.conf
+++ /dev/null
@@ -1,8 +0,0 @@
-const port = 8000;
-const whitelist = ['127.0.0.1']; //Example for add several IP in whitelist: ['127.0.0.1', '192.168.0.10']
-const whitelistMode = true; //Disabling enabling the ip whitelist mode. true/false
-const autorun = true; //Autorun in the browser. true/false
-
-module.exports = {
- port, whitelist, whitelistMode, autorun
-};
\ No newline at end of file
From 60cbda218c1964ae28706d208437a54f12924587 Mon Sep 17 00:00:00 2001
From: RossAsscends <124905043+RossAscends@users.noreply.github.com>
Date: Sat, 25 Feb 2023 17:10:52 +0900
Subject: [PATCH 11/22] Update .gitignore
---
.gitignore | 2 --
1 file changed, 2 deletions(-)
diff --git a/.gitignore b/.gitignore
index 78e148fb7..d76f5899b 100644
--- a/.gitignore
+++ b/.gitignore
@@ -4,8 +4,6 @@ public/characters/
public/User Avatars/
public/backgrounds/
/uploads/
-/config.conf
*.jsonl
public/settings.json
-
config.conf
From 4f2174eced8a98f9c8764d15e61a483f68acf7ba Mon Sep 17 00:00:00 2001
From: RossAsscends <124905043+RossAscends@users.noreply.github.com>
Date: Sat, 25 Feb 2023 17:20:04 +0900
Subject: [PATCH 12/22] Delete settings.json
---
public/settings.json | 1 -
1 file changed, 1 deletion(-)
delete mode 100644 public/settings.json
diff --git a/public/settings.json b/public/settings.json
deleted file mode 100644
index aa8375ae0..000000000
--- a/public/settings.json
+++ /dev/null
@@ -1 +0,0 @@
-{"username":"You","api_server":"http://localhost:5000/api","preset_settings":"gui","preset_settings_novel":"Classic-Euterpe","user_avatar":"legat.png","temp":0.43,"amount_gen":90,"max_context":2048,"anchor_order":0,"style_anchor":false,"character_anchor":true,"main_api":"kobold","api_key_novel":"","rep_pen":1.17,"rep_pen_size":1024,"model_novel":"euterpe-v2","temp_novel":1.11,"rep_pen_novel":1.11,"rep_pen_size_novel":320}
\ No newline at end of file
From 5029c6c3f577e2dc36a78162b1f8d6353886ed78 Mon Sep 17 00:00:00 2001
From: RossAscends <124905043+RossAscends@users.noreply.github.com>
Date: Sat, 25 Feb 2023 17:34:05 +0900
Subject: [PATCH 13/22] added TAI main branch config.conf
---
config.conf | 9 +++++++++
1 file changed, 9 insertions(+)
create mode 100644 config.conf
diff --git a/config.conf b/config.conf
new file mode 100644
index 000000000..7fad96b00
--- /dev/null
+++ b/config.conf
@@ -0,0 +1,9 @@
+
+const port = 8000;
+const whitelist = ['127.0.0.1']; //Example for add several IP in whitelist: ['127.0.0.1', '192.168.0.10']
+const whitelistMode = true; //Disabling enabling the ip whitelist mode. true/false
+const autorun = true; //Autorun in the browser. true/false
+
+module.exports = {
+ port, whitelist, whitelistMode, autorun
+};
From e156373ad003d4f11ee4fc6dec8ff033ddf81bd6 Mon Sep 17 00:00:00 2001
From: RossAsscends <124905043+RossAscends@users.noreply.github.com>
Date: Sat, 25 Feb 2023 21:15:29 +0900
Subject: [PATCH 14/22] input bar auto-shrink on send
previous the input bar would expand to the fit the size of the typed input, but when it was sent, the bar would stay the same size. Now it will auto-shrink back to default size after sending the input to AI.
---
public/css/bg_load.css | 2 +-
public/index.html | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/public/css/bg_load.css b/public/css/bg_load.css
index 139ef92e1..f82a68152 100644
--- a/public/css/bg_load.css
+++ b/public/css/bg_load.css
@@ -1 +1 @@
-#bg1 {background-image: url(../backgrounds/tavern.png);}
+#bg1 {background-image: url(../backgrounds/whitesnow.png);}
\ No newline at end of file
diff --git a/public/index.html b/public/index.html
index 2ffe641de..655ad3099 100644
--- a/public/index.html
+++ b/public/index.html
@@ -597,7 +597,7 @@
if(online_status != 'no_connection' && this_chid != undefined){
if(type != 'regenerate'){
var textareaText = $("#send_textarea").val();
- $("#send_textarea").val('');
+ $("#send_textarea").val('').trigger('input');
}else{
var textareaText = "";
From d44cbac87fd245b8152b8a631c3f53de647000e5 Mon Sep 17 00:00:00 2001
From: RossAsscends <124905043+RossAscends@users.noreply.github.com>
Date: Sun, 26 Feb 2023 10:40:46 +0900
Subject: [PATCH 15/22] added proper scrolling to character settings side panel
---
public/css/bg_load.css | 2 +-
public/style.css | 1 +
2 files changed, 2 insertions(+), 1 deletion(-)
diff --git a/public/css/bg_load.css b/public/css/bg_load.css
index f82a68152..4671f73e6 100644
--- a/public/css/bg_load.css
+++ b/public/css/bg_load.css
@@ -1 +1 @@
-#bg1 {background-image: url(../backgrounds/whitesnow.png);}
\ No newline at end of file
+#bg1 {background-image: url(../backgrounds/tavern.png);}
\ No newline at end of file
diff --git a/public/style.css b/public/style.css
index dc0837be5..bfdfd2bac 100644
--- a/public/style.css
+++ b/public/style.css
@@ -584,6 +584,7 @@ input[type=button] {
#rm_ch_create_block{
display: none;
+ overflow-y: auto;
}
/* ################################################################*/
From 2500fc3cdd7557c583ab2763559d1b28f155cb48 Mon Sep 17 00:00:00 2001
From: RossAsscends <124905043+RossAscends@users.noreply.github.com>
Date: Sun, 26 Feb 2023 11:22:06 +0900
Subject: [PATCH 16/22] hotkey switch
enter = new line
shift+enter = send
(imperfect solution but slightly better for mobile users)
---
public/index.html | 18 ++++++++++++++----
1 file changed, 14 insertions(+), 4 deletions(-)
diff --git a/public/index.html b/public/index.html
index 655ad3099..87f031e3a 100644
--- a/public/index.html
+++ b/public/index.html
@@ -1204,10 +1204,20 @@
printMessages();
select_selected_character(this_chid);
}
- $("#send_textarea").keypress(function (e) {
- if(e.which === 13 && !e.shiftKey && is_send_press == false) {
- is_send_press = true;
- e.preventDefault();
+
+ //hotkey to send input with shift+enter (normal enter keypress generates a new line in the chat input box)
+ //problem for mobile: default iOS keyboard function is to make AutoCapitalization happen on new lines.
+ //AutoCapitization effectively presses the virtual Shift key when it thinks a new line/sentence is happening.
+ //iOS result: First Enter press will make a new line, but the second will act like shift+enter, sending the prompt to AI.
+ //ideally we would detect if the user is using a virtual keyboard, and disable this shortcut for them.
+ //because mobile users' hands are always near the screen, tapping the send button is better for them.
+ //caveat: people on an iPad using a Bluetooth keyboard will need to be treated as PC users for this purpose.
+ //note: CAI seems to have this handled. PC: shift+enter = new line, enter = send. iOS: shift+enter AND enter both make new lines, and only the send button sends.
+
+ $("#send_textarea").keydown(function (e) {
+ if(e.which === 13 && e.shiftKey && is_send_press == false) {
+ is_send_press = true;
+ e.preventDefault();
Generate();
//$(this).closest("form").submit();
}
From 384bb56f1e762aea7db2651e29978280b3ca4bd1 Mon Sep 17 00:00:00 2001
From: RossAsscends <124905043+RossAscends@users.noreply.github.com>
Date: Sun, 26 Feb 2023 13:30:17 +0900
Subject: [PATCH 17/22] Update index.html
---
public/index.html | 1 +
1 file changed, 1 insertion(+)
diff --git a/public/index.html b/public/index.html
index 87f031e3a..706915467 100644
--- a/public/index.html
+++ b/public/index.html
@@ -1213,6 +1213,7 @@
//because mobile users' hands are always near the screen, tapping the send button is better for them.
//caveat: people on an iPad using a Bluetooth keyboard will need to be treated as PC users for this purpose.
//note: CAI seems to have this handled. PC: shift+enter = new line, enter = send. iOS: shift+enter AND enter both make new lines, and only the send button sends.
+ //maybe a way to simulate this would be to disable the eventListener for people iOS.
$("#send_textarea").keydown(function (e) {
if(e.which === 13 && e.shiftKey && is_send_press == false) {
From 2263ebe75de65e331b3e01806be75bfab8e60b5c Mon Sep 17 00:00:00 2001
From: RossAsscends <124905043+RossAscends@users.noreply.github.com>
Date: Sun, 26 Feb 2023 17:04:52 +0900
Subject: [PATCH 18/22] Update style.css
---
public/style.css | 17 +++++++++--------
1 file changed, 9 insertions(+), 8 deletions(-)
diff --git a/public/style.css b/public/style.css
index bfdfd2bac..b6f5bd2a3 100644
--- a/public/style.css
+++ b/public/style.css
@@ -1517,13 +1517,13 @@ label.checkbox :checked + span:after {
z-index: 2058;
}
#character_popup{
- display: none;
- background-color: rgba(0,0,0,0.3);
- backdrop-filter: blur(50px);
- -webkit-backdrop-filter: blur(50px);
+ display: none;
+ background-color: rgba(0,0,0,0.3);
+ backdrop-filter: blur(50px);
+ -webkit-backdrop-filter: blur(50px);
grid-template-rows: 50px 100px 100px 40px auto 45px 45px;
- max-width:800px;
- height: 83vh;
+ max-width: 802px; /* 802 instead of 800 to cover #chat's scrollbars entirely */
+ height: 89vh; /* imperfect calculation designed to match the chat height, which is auto-set to (100% - form_sheld height) */
position: absolute;
z-index: 2065;
margin-left: auto;
@@ -1531,9 +1531,10 @@ label.checkbox :checked + span:after {
left: 0;
right: 0;
margin-top: 40px;
- box-shadow: 0 0 2px rgba(0,0,0,0.5);
+ box-shadow: 0 0 2px rgb(0 0 0 / 50%);
padding: 4px;
- border: 1px solid #33;
+ border: 1px solid rgba(0,0,0,0.3);
+ border-radius: 0 0 40px 40px;
}
#character_popup h5 a{
color: #936f4a;
From 3d05198efd3c427e63220ceada0fbc993e1a05aa Mon Sep 17 00:00:00 2001
From: RossAsscends <124905043+RossAscends@users.noreply.github.com>
Date: Sun, 26 Feb 2023 18:19:04 +0900
Subject: [PATCH 19/22] changed input bar status indication
- removed the indicator circle under the send button
- made send_form turn red when not connected
- changed send_textarea's placeholder text when not connected
- made send button hide when not connected (avoids users trying to use API and instead getting a 'character not selected' button)
---
config.conf | 2 +-
public/index.html | 16 +++++++++++++---
public/style.css | 40 ++++++++++++++++++++++------------------
3 files changed, 36 insertions(+), 22 deletions(-)
diff --git a/config.conf b/config.conf
index 7fad96b00..25d278e14 100644
--- a/config.conf
+++ b/config.conf
@@ -1,7 +1,7 @@
const port = 8000;
const whitelist = ['127.0.0.1']; //Example for add several IP in whitelist: ['127.0.0.1', '192.168.0.10']
-const whitelistMode = true; //Disabling enabling the ip whitelist mode. true/false
+const whitelistMode = false; //Disabling enabling the ip whitelist mode. true/false
const autorun = true; //Autorun in the browser. true/false
module.exports = {
diff --git a/public/index.html b/public/index.html
index 706915467..2d68d41af 100644
--- a/public/index.html
+++ b/public/index.html
@@ -196,6 +196,11 @@
function checkOnlineStatus(){
//console.log(online_status);
if(online_status == 'no_connection'){
+ $("#send_textarea").attr('placeholder', "Not connected to API!"); //Input bar placeholder tells users they are not connected
+ $("#send_form").css("background-color", "rgba(255,0,0,0.3)"); //entire input form area is red when not connected
+ $("#send_but").css("display", "none"); //send button is hidden when not connected
+
+
$("#online_status_indicator").css("background-color", "red");
$("#online_status").css("opacity", 0.3);
$("#online_status_text").html("No connection...");
@@ -206,6 +211,11 @@
is_get_status = false;
is_get_status_novel = false;
}else{
+ $("#send_textarea").attr('placeholder', 'Type a message...'); //on connect, placeholder tells user to type message
+ $("#send_form").css("background-color", "rgba(0,0,0,0.3)"); //on connect, form BG changes to transprent black
+ $("#send_but").css("display", "inline"); //on connect, send button shows up
+
+
$("#online_status_indicator").css("background-color", "black");
$("#online_status").css("display", "none");
$("#online_status_text").html("");
@@ -3174,7 +3184,7 @@
-
+