From 1d7165c047ef2b6a5e367c237ed35e0ae5a27999 Mon Sep 17 00:00:00 2001 From: Stefan Daniel Schwarz Date: Sat, 26 Aug 2023 12:09:47 +0200 Subject: [PATCH 1/4] context template preset manager --- default/settings.json | 1 + public/index.html | 12 +++++++++--- public/scripts/instruct-mode.js | 6 +++--- public/scripts/power-user.js | 23 +++++++++++++++++++++++ public/scripts/preset-manager.js | 20 ++++++++++++++------ public/style.css | 4 ++++ 6 files changed, 54 insertions(+), 12 deletions(-) diff --git a/default/settings.json b/default/settings.json index 73597d741..25b1eebaf 100644 --- a/default/settings.json +++ b/default/settings.json @@ -151,6 +151,7 @@ "names_force_groups": true, "activation_regex": "" }, + "default_context": "Default", "context": { "preset": "Default", "story_string": "{{#if system}}{{system}}\n{{/if}}{{#if wiBefore}}{{wiBefore}}\n{{/if}}{{#if description}}{{description}}\n{{/if}}{{#if personality}}{{char}}'s personality: {{personality}}\n{{/if}}{{#if scenario}}Scenario: {{scenario}}\n{{/if}}{{#if wiAfter}}{{wiAfter}}\n{{/if}}{{#if persona}}{{persona}}\n{{/if}}", diff --git a/public/index.html b/public/index.html index cda9b4711..467c29cf4 100644 --- a/public/index.html +++ b/public/index.html @@ -2090,9 +2090,15 @@

Context Template

-
- +
+ + + + + + + +
tag --- public/index.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/public/index.html b/public/index.html index 467c29cf4..841d79644 100644 --- a/public/index.html +++ b/public/index.html @@ -2137,7 +2137,6 @@ Enabled
- @@ -2176,6 +2175,7 @@ Force for Groups and Personas + From 7e506db1053597c39627fbb22e77a91f12f72213 Mon Sep 17 00:00:00 2001 From: Cohee <18619528+Cohee1207@users.noreply.github.com> Date: Sat, 26 Aug 2023 14:38:30 +0300 Subject: [PATCH 3/4] Server fix for context template manager --- server.js | 2 ++ 1 file changed, 2 insertions(+) diff --git a/server.js b/server.js index ba71100e0..8d8971fd1 100644 --- a/server.js +++ b/server.js @@ -3819,6 +3819,8 @@ function getPresetSettingsByAPI(apiId) { return { folder: directories.textGen_Settings, extension: '.settings' }; case 'instruct': return { folder: directories.instruct, extension: '.json' }; + case 'context': + return { folder: directories.context, extension: '.json' }; default: return { folder: null, extension: null }; } From 3509e6b1d498b7b8dca3383ca3d711cbc2b7abb8 Mon Sep 17 00:00:00 2001 From: Stefan Daniel Schwarz Date: Sat, 26 Aug 2023 14:52:23 +0200 Subject: [PATCH 4/4] default context preset cannot be deleted --- public/index.html | 4 ++-- public/scripts/power-user.js | 2 ++ public/scripts/preset-manager.js | 5 +++++ 3 files changed, 9 insertions(+), 2 deletions(-) diff --git a/public/index.html b/public/index.html index 841d79644..a5ea80a8f 100644 --- a/public/index.html +++ b/public/index.html @@ -2093,12 +2093,12 @@
- + - +