Commit Graph

3198 Commits

Author SHA1 Message Date
BlipRanger
f854609512 Option to split on newlines 2023-07-07 00:23:28 -04:00
BlipRanger
e595f83590 Merge branch 'dev' of https://github.com/BlipRanger/SillyTavern into feature/chroma-wi 2023-07-06 23:58:30 -04:00
Cohee
f93fb78bc7 Don't append System narrator name to Chat completion messages. 2023-07-06 21:04:51 +03:00
Cohee
48e9332db9 Merge branch 'dev' of https://github.com/SillyLossy/TavernAI into dev 2023-07-06 20:42:01 +03:00
Cohee
afea5d48f1 Add {{idle_duration}} macro 2023-07-06 20:41:58 +03:00
Cohee
d6c3c6f26e Chub cope 2023-07-06 20:36:02 +03:00
Cohee
7d9c346d25 Better visibility filter on counter 2023-07-06 18:21:14 +03:00
Cohee
1acaea2a4c Merge pull request #642 from BlipRanger/feature/count
Feature/count
2023-07-06 18:13:54 +03:00
BlipRanger
bc52df493e Cleaned up code, relative font size 2023-07-06 11:07:38 -04:00
Cohee
11bbb6e8e3 Add purge to unsuccessful Poe auto-JB procedure 2023-07-06 13:23:18 +03:00
Cohee
85e82f854b (beta) Add davinci models to OpenAI 2023-07-06 13:18:33 +03:00
Cohee
35390c07ef #640 Fix group candidates filtering 2023-07-06 12:35:03 +03:00
Cohee
87f436fe44 Merge pull request #641 from BlipRanger/dev 2023-07-06 08:26:08 +03:00
Cohee
4740e872cd Merge pull request #638 from bdashore3/dev 2023-07-06 08:25:20 +03:00
kingbri
fb69397ac1 Regex: Add overlay replacement strategy
As opposed to making the match variable include the entire regex
match, overlay the replacement string over the regex match and splice
out whatever's already in the replacement string from the regex match.

This new strategy helps save time when editing messages since match
prefix and suffix phrases have a lower chance of being repeated on
every edit. The overlay strategy also preserves uniqueness if the user
decides to change something in the edited text.

However, overlay can cause issues especially with punctiation,
so the strategy isn't chosen by default when creating a new regex.

Signed-off-by: kingbri <bdashore3@proton.me>
2023-07-06 00:49:26 -04:00
kingbri
3168ee536e Regex: Add an about section in editor
Adds a small helpful message in the editor and a link to regexr
for learning regex interactively.

Signed-off-by: kingbri <bdashore3@proton.me>
2023-07-06 00:43:32 -04:00
kingbri
8212206d50 Regex: Fix markdown format bugs
If a regex cannot be parsed, silently return out and don't run the
script. May be a good idea to display a toast message saying the
script didn't run.

Also only reload the chat if a chat is actually loaded.

Signed-off-by: kingbri <bdashore3@proton.me>
2023-07-06 00:43:32 -04:00
BlipRanger
bbe08ece84 Display total and dynamic character count 2023-07-06 00:42:04 -04:00
BlipRanger
c9db2f7c9c More descriptive error handling. 2023-07-05 23:33:32 -04:00
RossAscends
13ba5cec49 add help page for macros 2023-07-06 06:11:13 +09:00
Cohee
892824df1a Add Scale to UI texts 2023-07-05 23:50:33 +03:00
Cohee
2a8f3e7334 Unlocked context for Scale 2023-07-05 23:42:29 +03:00
Cohee
d7db7885e5 #24 Add Scale support 2023-07-05 23:34:40 +03:00
Cohee
4e8a2b8386 Add retry logic to OpenAI request handling 2023-07-05 21:43:33 +03:00
RossAscends
59f857262b seedrandom for {{random}} 2023-07-06 02:51:01 +09:00
RossAscends
a2a496a4c9 Merge branch 'dev' of https://github.com/Cohee1207/SillyTavern into dev 2023-07-06 02:47:44 +09:00
RossAscends
88429baa48 add seedrandom library 2023-07-06 02:47:41 +09:00
Cohee
935a3d6c35 Clone WI entries before returning them to evaluator 2023-07-05 20:46:30 +03:00
RossAscends
3c64c46daf make constant WI entries substitute before insert 2023-07-06 02:00:59 +09:00
RossAscends
a53cee20d2 Merge branch 'dev' of https://github.com/Cohee1207/SillyTavern into dev 2023-07-06 01:30:41 +09:00
RossAscends
cb741fd954 AND/NOT logic for selective WI 2023-07-06 01:30:37 +09:00
Cohee
f3ebea6ad8 #629 Random list select substitution 2023-07-05 17:59:53 +03:00
Cohee
af6d9d48e0 Merge pull request #630 from bdashore3/dev
Add regex engine and other fixes
2023-07-05 17:30:17 +03:00
Cohee
04b5d73a85 Merge pull request #634 from BlipRanger/feature/spoilers
Add the ability to avoid spoilers
2023-07-05 17:24:43 +03:00
Cohee
9ed05725c6 Hide "branch" button under advanced 2023-07-05 17:23:03 +03:00
Cohee
15a2a61615 Merge pull request #633 from mweldon/dev
Add retroactive bookmarking
2023-07-05 17:21:09 +03:00
Cohee
df6b87fa23 Bump package version 2023-07-05 15:18:52 +03:00
RossAscends
f6f4a5199b WI Entry label alignment fix 2023-07-05 21:10:56 +09:00
RossAscends
d59eaa4912 Merge branch 'dev' of https://github.com/Cohee1207/SillyTavern into dev 2023-07-05 20:55:47 +09:00
RossAscends
26b55d47b4 WI Entry restyle; fix colorpicker loc for mobile 2023-07-05 20:55:39 +09:00
Cohee
5c39327450 Display Claude tokenizer in the UI if Claude model is used 2023-07-05 14:49:45 +03:00
Cohee
9c3823a616 #635 Fix sanitation of WI names 2023-07-05 13:40:40 +03:00
Cohee
46330f0558 Skill issue in A/N persona positioning 2023-07-05 13:27:44 +03:00
kingbri
afdab4c5b6 Regex: Add character name override
Sendas uses a different character's name for messages, so allow
the use of a character name override in the regex match function.
This overrides substituteParams to use a different value.

Signed-off-by: kingbri <bdashore3@proton.me>
2023-07-05 01:35:52 -04:00
kingbri
b8f86d55da Regex: Add substitution to regex and undefined checks
Sometimes a user may want to substitute variables in the regex
itself rather than just matching those variables. This can be
optionally enabled in the editor.

In addition, try preventing crashes by checking for undefined
variables or null coalescing.

Signed-off-by: kingbri <bdashore3@proton.me>
2023-07-05 01:30:50 -04:00
kingbri
fee801c2a4 Regex: Upgrade engine
If the extension is disabled, don't use any regex formatting. In
addition, wrap all foreach logic into its own function which
reduces the size of all regex injections.

This commit also removes the need for working around static imports
as UI is separate from the engine and is therefore imported at the
same time as other non-static extensions.

Signed-off-by: kingbri <bdashore3@proton.me>
2023-07-05 01:30:50 -04:00
kingbri
fb02c00402 Extensions: Workaround loading static extensions
Some extensions are statically imported inside script.js, bypassing
the extension load method. The true method to solve this is using
dynamic imports and undefined checks, but implementing this is
extremely time-consuming.

For now, add the extension_first_load event which fires when
first load is about to start. This changes loading priority to
static -> offline -> online/API.

In addition, initialize the event source earlier since it's more
important than most of the other imports.

Signed-off-by: kingbri <bdashore3@proton.me>
2023-07-05 01:30:50 -04:00
kingbri
7c0222a15b Regex: Migrate CSS styling
Universal styling has been moved to the main styles.css.

Signed-off-by: kingbri <bdashore3@proton.me>
2023-07-05 01:30:50 -04:00
kingbri
e6eae0aad1 Regex: Fix script duplication on edit
Editing a script can bypass the unique naming system by just renaming
the script to another one. This change ensures that no two script
names can be the same by checking if the existing index and found indices
differ.

If something goes wrong, it would be better to use a filter and a
map and then check the index array length/includes. FindIndex
is used here for efficiency's sake since each array index is unique.

Signed-off-by: kingbri <bdashore3@proton.me>
2023-07-05 01:30:50 -04:00
kingbri
0f8d07053e Regex: Don't wrap scriptTemplate elements
Fix some UI for flex element wrapping. Text overflow for a script
name is now truncated if it exceeds one line of text. Also fix
how extension settings are laid out to prevent unnecessary
flex resizing.

Signed-off-by: kingbri <bdashore3@proton.me>
2023-07-05 01:30:50 -04:00