Commit Graph

63 Commits

Author SHA1 Message Date
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
ef7aa3941b Extensions: Add regex engine
Regex is a method that is commonly used to find and replace parts
of a string using a single pattern. Add support for using regex in
SillyTavern which allows users to dynamically change various aspects
of the chatting experience.

Users are able to choose where a given regex script should apply
(both invasive and non-invasive options!). Invasive options alter
chat history while non-invasive alters markdown display for the
entire chat.

A new variable called {{match}} is added in regex scripts which
substitutes in the found match from the original find regex script.

There is a lot more that can be added to this extension, but for now,
this is enough.

Signed-off-by: kingbri <bdashore3@proton.me>
2023-07-05 01:30:49 -04:00
Cohee
22a5def618 Add option to auto-adjust number of chroma messages to keep / query based on context size. 2023-06-18 16:29:23 +03:00
RossAscends
58a6ccd4a5 WI-to-AN for real this time. 2023-06-18 18:17:43 +09:00
kingbri
346d5cfb3a Author's Notes: Add per-character author's note
Adds the option to override the chat's author's note with one set
for each character. This saves the pain of having to copy and paste
author's notes for every chat.

Signed-off-by: kingbri <bdashore3@proton.me>
2023-06-14 23:00:28 -04:00
Cohee
094f2c571d Hide extension menu button if all menu elements are invisible 2023-06-13 14:12:20 +03:00
Cohee
65ee58d383 Hide wand if no extensions with menu button are active 2023-06-12 17:13:56 +03:00
RossAscends
3dc6936002 improve options&extensions menu display..again.. 2023-06-12 03:41:21 +09:00
RossAscends
c4e2480212 fix options menu hide/show & iOS blur 2023-06-10 23:21:23 +09:00
kingbri
cf2660074d Expressions: Add sprite aliasing for single chats
Duplicate characters get handled by the system, so why not sprites?
If a sprite is duplicated, users can specify the folder name that
the changed sprites are located in.

This commit only adds support for single person chats and breaks
compatibility with group chats. Another commit is required to fix
group sprite functionality.

Signed-off-by: kingbri <bdashore3@proton.me>
2023-06-03 21:51:29 -04:00
kingbri
36ea41f0a6 Extras: Add API authentication support
An API key is extremely important for ST-Extras servers that are
exposed to the internet.

Add an API key field below where the user enters the extras URL. For
convenience, this key is persisted whenever the user refreshes the
page.

Also modify the fetch requests to always include API keys if present.

See ST-Extras for more information on how this works.

Signed-off-by: kingbri <bdashore3@proton.me>
2023-06-03 00:00:38 -04:00
RossAscends
ae1a3f1d36 add Quick Replies extension 2023-06-02 15:11:08 +09:00
SillyLossy
6bc520f800 Save metadata debounced for extensions 2023-06-01 16:51:35 +03:00
SillyLossy
5b446af6dc Speed-up extensions loading. Add tracking of response times 2023-06-01 14:34:40 +03:00
Cohee
8b4a53b293 Merge pull request #415 from ouoertheo/ouoertheo/objectives1
Objective Extension - Agent based AI inspired by BabyAGI and AutoGPT
2023-06-01 00:32:46 +03:00
SillyLossy
ef90c31643 Add slash command for dice rolls. Create class for worker wrappers 2023-05-31 13:57:08 +03:00
ouoertheo
4cf0e18d76 First commit of Objective extension 2023-05-30 17:35:14 -05:00
SillyLossy
219fd4f643 Hide extensions dropdown on load 2023-05-29 21:58:25 +03:00
SillyLossy
d093cca125 Skip extras autoconnect on load 2023-05-29 11:42:06 +03:00
SillyLossy
f6070084d1 (beta) Message translate plugin 2023-05-28 13:42:06 +03:00
Mark Ceter
3dcff11354 Merge remote-tracking branch 'upstream/dev' into feature/chromadb 2023-05-21 10:01:27 +00:00
Maya
1cac439d32 Merge remote-tracking branch 'upstream/dev' into sd-horde 2023-05-17 19:25:21 +00:00
RossAscends
661b4fec9a allow dice even without Extras connection 2023-05-18 04:23:19 +09:00
Maya
5a95fed134 Add Karras and hiding of SD buttons 2023-05-17 19:17:44 +00:00
Mark Ceter
d2803f6451 [WIP} infinity context 2023-05-17 17:58:58 +00:00
RossAscends
9156e7f43d ~_~_~MAGIC_~_~_~ 2023-05-18 02:29:22 +09:00
RossAscends
3951049e03 move input bar extensions button into menu 2023-05-18 01:15:49 +09:00
SillyLossy
5bfd3787fa Add event emitter subsystem. 2023-05-16 16:28:38 +03:00
SillyLossy
4e8effda11 Do not duplicate disabled extensions 2023-05-12 13:50:06 +03:00
SillyLossy
ce4d7dc90e Optimize auto-connect of extensions 2023-05-05 20:36:53 +03:00
SillyLossy
437cf59a48 Add more options to SD plugin 2023-05-03 23:49:57 +03:00
SillyLossy
6615d94051 Rename character as a group member.
Unify CSRF headers usage in fetch request.
2023-04-30 22:36:18 +03:00
RossAscends
2bed84fb7a - Manage Extns. Enable/Disable obviously clickable
- reduce Fav borders to 2px
2023-04-29 19:24:06 +09:00
ouoertheo
5d142f499a generalized tts settings 2023-04-23 12:43:59 -05:00
SillyLossy
99d924bb2b Merge branch 'main' into dev.
Reformat all notes
2023-04-22 23:00:08 +03:00
SillyLossy
371e1c6f2d Fix 2023-04-22 19:13:44 +03:00
ouoertheo
f2fabca869 fix extension registration 2023-04-21 08:06:28 -05:00
SillyLossy
795e59aba0 Remove hard coded list in extensions 2023-04-18 12:56:20 +03:00
SillyLossy
b78d5be176 Add character backgrounds plugin #82 2023-04-17 21:32:36 +03:00
ouoertheo
49a3787780 first commit 2023-04-16 02:41:13 -05:00
SillyLossy
25ae214c12 Remove TODOs 2023-04-13 12:37:29 +03:00
SillyLossy
9aeeda3602 Migrate author's note to chat metadata 2023-04-07 21:17:24 +03:00
SillyLossy
ddb7eee3fb Move poe API to main block 2023-04-04 16:04:27 +03:00
SillyLossy
12bc1e7ae4 Add poe extension 2023-03-30 16:53:15 +03:00
SillyLossy
b71d7006ab Display optional modules for extensions 2023-03-27 23:48:13 +03:00
SillyLossy
9944d729f8 Expressions offline mode 2023-03-26 16:29:55 +03:00
SillyLossy
006ffec1f9 Fix security from upstream + console error messages 2023-03-19 20:23:18 +02:00
SillyLossy
6b623cead9 Allow setting floating prompt for each chat. Add extensions management 2023-03-18 23:55:13 +02:00
SillyLossy
4bfd6ded89 Fix extensions loader for firefox 2023-03-18 13:58:44 +02:00
SillyLossy
165cad1549 Copy extensions from extras project to main 2023-03-16 00:33:26 +02:00