Commit Graph

929 Commits

Author SHA1 Message Date
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
15a2a61615 Merge pull request #633 from mweldon/dev
Add retroactive bookmarking
2023-07-05 17:21:09 +03:00
Cohee
5c39327450 Display Claude tokenizer in the UI if Claude model is used 2023-07-05 14:49:45 +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
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
b362dba726 Regex: Fix edit message hook
The only way to distinguish between a user and AI is if the is_user
property is changed.

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
kingbri
6bc9535040 Popups: Allow substitution of primary button
This allows for more flexible popups with options rather than
implementing a brand new popup just to change button text.

Signed-off-by: kingbri <bdashore3@proton.me>
2023-07-05 01:30:01 -04:00
BlipRanger
4e0cbdfbb3 Add the ability to avoid spoilers 2023-07-05 01:08:09 -04:00
Mike Weldon
7ceb936337 Fix bug with Save bookmark from menu 2023-07-04 18:35:05 -07:00
Mike Weldon
d3c3614147 Add retroactive bookmarking 2023-07-04 18:13:22 -07:00
Cohee
27ab509caf Split help command into pages 2023-07-05 01:06:24 +03:00
RossAscends
19502492c6 Merge branch 'dev' of https://github.com/Cohee1207/SillyTavern into dev 2023-07-04 23:00:13 +09:00
RossAscends
3426f80656 Impervious MovingUI 2023-07-04 23:00:10 +09:00
Cohee
c922f17f09 Fix main_api default value 2023-07-04 11:49:46 +03:00
Cohee
9e3c55805f Better chat completion continue 2023-07-03 18:22:12 +03:00
Cohee
9ab7265053 Touch chat window to cancel auto scroll on mobile 2023-07-03 18:17:10 +03:00
RossAscends
d566be077d Merge branch 'dev' of https://github.com/Cohee1207/SillyTavern into dev 2023-07-03 13:20:14 +09:00
RossAscends
7fe2ea31b9 better /api explainer text 2023-07-03 13:20:12 +09:00
Cohee
d153488690 More continue copium 2023-07-03 03:45:13 +03:00
Cohee
a61a8f9495 More safeties for swipes 2023-07-03 01:53:19 +03:00
Cohee
a904260614 Fix old message left swipe 2023-07-03 01:42:40 +03:00
Cohee
5e24beef58 Merge pull request #613 from BlipRanger/feature/swipe_info
Feature/swipe info
2023-07-03 01:36:16 +03:00
Cohee
47e4d5925b Merge pull request #618 from 50h100a/kobold-streaming-req
Cancel KoboldAI generation if streaming option conflicts.
2023-07-03 01:35:29 +03:00
Cohee
1fe2e4032a Fix JSON data shift on newly created characters 2023-07-03 01:14:13 +03:00
50h100a
4afd616099 kAI streamin mismatch Warning -> Error 2023-07-02 17:19:53 -04:00
50h100a
44bf31e602 Block generation if streaming option conflicts. 2023-07-02 17:04:21 -04:00
Cohee
6d33e44519 Fix "continue" as a slash command 2023-07-02 23:59:33 +03:00
Cohee
0c3f3f952d Toggle for space trimming 2023-07-02 23:47:33 +03:00
Cohee
7a33042ea9 Add slash commands for chat styles and continue 2023-07-02 22:40:38 +03:00
Cohee
549fb19676 continue copium for Poe 2023-07-02 20:23:37 +03:00
Cohee
8eb82cdcd9 Continue 2023-07-02 20:21:42 +03:00
Cohee
c156e32ec7 Merge pull request #611 from bdashore3/dev
Add AI reply prefixes for prompt construction
2023-07-02 18:00:00 +03:00
RossAscends
229ec5f255 +"/cut N" for targeted mes deletion,
+ toggle to show mesIDs in chat
2023-07-02 17:32:48 +09:00
kingbri
990a5faf7d Generate: Move reply prefix call to common function
Helps pass down user biases to OpenAI's prompt builder.

Signed-off-by: kingbri <bdashore3@proton.me>
2023-07-01 20:12:19 -04:00
kingbri
080ecec5f2 Chat: Add AI reply prefixes
Experimentation yields that prefixing a reply with something drives
the AI to possibly produce more targeted and meaningful conversation.

The example I used is showing an AI's "thoughts" in a message via
the use of backticks. By automatically prefixing {{char}}'s thoughts,
the AI generates an internal monologue that the user can also use
for their own responses.

This feature is stable, but in an experimental state for now in terms
of expansion.

Signed-off-by: kingbri <bdashore3@proton.me>
2023-07-01 20:12:19 -04:00
BlipRanger
715a6f1bff Cleanup 2023-07-01 18:35:47 -04:00
BlipRanger
e01a2c3bcf Store metadata for swipes, pull it back 2023-07-01 18:32:51 -04:00
Cohee
596cd1762f #609 Export JSONL chat with octet-stream type 2023-07-01 23:55:53 +03:00
Cohee
63bd4cd499 Fix selecting personas with quick reply 2023-07-01 19:25:04 +03:00
Cohee
822e4b88f5 #606 Support multiline curly bias 2023-07-01 17:24:55 +03:00
Cohee
fe8db4ded8 #605 JB prompt override for Poe. 2023-06-30 19:32:07 +03:00
Cohee
8cda073d00 Fix sticky bias 2023-06-30 18:38:15 +03:00
Cohee
32441aa33e [chore] Copy-paste example id fix 2023-06-30 12:11:38 +03:00
RossAscends
e6761f7293 Zoomed Avatars back to reg. mobile 🦀 2023-06-30 12:59:40 +09:00
Cohee
0da4bce378 Use select2 for character lore selector 2023-06-29 20:27:08 +03:00
Cohee
8687932896 Customizable samplers order for KoboldAI 2023-06-29 20:15:48 +03:00