Commit Graph

64 Commits

Author SHA1 Message Date
RossAscends
26b55d47b4 WI Entry restyle; fix colorpicker loc for mobile 2023-07-05 20:55:39 +09:00
Cohee
6770ccbe91 Fix Chub embedded lorebooks import 2023-07-04 14:47:48 +03:00
Cohee
13deac2527 Don't insert a newline on empty WI 2023-07-03 11:34:15 +03:00
Cohee
3b4f8811e7 Add probability of activation to WI 2023-07-01 21:02:03 +03:00
Cohee
c134aed9f5 Fix budget cutting in WI 2023-06-30 17:42:33 +03:00
Cohee
5af6874b5f Restyle Global WI selector 2023-06-29 18:22:14 +03:00
RossAscends
d66542e88e fix: MovingUI breaking, typos, WI selector scroll 2023-06-28 20:40:29 +09:00
kingbri
2f2f88dedd World Info: Fix array splice method
Character lore layers used array.splice() in the wrong way. Somehow
this passed my testing through sheer luck. Rewrite for using indicies
to splice and for more efficiency with iteration.

Signed-off-by: kingbri <bdashore3@proton.me>
2023-06-27 21:04:04 -04:00
Cohee
69fdb9090f Add Chub downloader for characters and lorebooks 2023-06-27 18:39:08 +03:00
kingbri
3e30fb5d14 World Info: Fix lorebook loading error
charLore isn't always present, so make optional calls to it.

Signed-off-by: kingbri <bdashore3@proton.me>
2023-06-26 20:19:21 -04:00
kingbri
45047fc6b2 World Info: Fix entries being improperly appended
Entries were being added to the prompt in an inconsistent way. WI
before and after character were using newline formatting while AN
was using array joins. This caused some issues with insertion order
in the prompt.

Fix this by making each injection use an array and unshift elements
into them. Then, join them into a string that preserves insertion
order.

The reason why unshift is used is because higher insertion orders
translate to a higher priority during scanning. This prevents the
need to reverse arrays which is a more costly function depending
on how many entries are in them.

Signed-off-by: kingbri <bdashore3@proton.me>
2023-06-26 14:32:24 -04:00
kingbri
9d5af39682 World Info: Add rename and delete hooks to char layers
If a world info is renamed or deleted, update that in the character
lore section of settings as well.

Signed-off-by: kingbri <bdashore3@proton.me>
2023-06-26 14:32:24 -04:00
kingbri
b6fbe41f93 World Info: Add support for character layering
Some characters have different cards depending on what the user wants
from the character. However, maintaining multiple lorebooks for different
personas of the same character can be difficult. In addition, there
is redundancy, overlap, and possiblities to miss information when
creating separate lorebooks with the same base info.

Therefore, add a "DLC"/layering system of sorts for characters.
This works the same way as multi-global world info where character
lorebooks added as needed. The only catch is that a base character
book must be tied to a card before selecting any extra info.

Signed-off-by: kingbri <bdashore3@proton.me>
2023-06-26 14:32:24 -04:00
Cohee
9532ad4e5a Enable selection in WI editor 2023-06-25 23:24:22 +03:00
Cohee
7984e3b818 Add contextual Character WI button 2023-06-25 18:40:13 +03:00
Cohee
26ac519c55 User persona management block. Persona descriptions. Dummy personas. Change persona avatar 2023-06-25 16:46:23 +03:00
Cohee
951e22ac8e Fix scrolling and width of global WI 2023-06-25 12:43:37 +03:00
kingbri
c0286150ed World Info: Add optimizations and fixes
Use a switch instead of if/else chain, fix un-needed addition
when determining token counts, and remove newline spacing for AN
WI formatting.

Signed-off-by: kingbri <bdashore3@proton.me>
2023-06-25 01:00:47 -04:00
kingbri
fc9c90c4ee World Info: Add global multi-selection/merging
Global world info always involved some kind of merging leading to
extremely large lorebook files that took a long time to import.

This commit adds the ability to select more than one world info file
and they will be merged together along with character world info.
In short, multiple worlds can be meshed together to further contribute
to context.

You can also use this for world "DLCs" of sorts. Let's say someone
else has more information to add regarding a world, but doesn't
want to use a large world file. The JSONs can now be merged.

Signed-off-by: kingbri <bdashore3@proton.me>
2023-06-25 00:49:42 -04:00
Cohee
09eea3c8cd Add caching layer to WI save/load 2023-06-24 23:57:44 +03:00
Cohee
747f7829fd Import Risu lorebooks 2023-06-24 23:34:36 +03:00
Cohee
f360706227 Post-activation sorting of WI entries 2023-06-24 20:54:56 +03:00
Cohee
9f0530f422 Export characters with world info embeds. 2023-06-23 22:50:16 +03:00
Cohee
97e1585152 Import Agnai memory book JSON 2023-06-23 21:43:14 +03:00
Cohee
01b4e1dae3 Import Novel PNG lorebooks 2023-06-23 19:20:58 +03:00
Cohee
2302785242 #502 Import Novel Lorebooks (JSON-based) 2023-06-23 18:43:11 +03:00
RossAscends
ad779129d3 /world to set/unset active world 2023-06-23 16:51:15 +09:00
Cohee
2f497cf25b Drag-sortable WI entries. 2023-06-22 20:11:29 +03:00
Cohee
4d299916be Convert and import v2 character book embeds 2023-06-21 18:50:34 +03:00
Cohee
012f0237db Don't change active WI selection on import 2023-06-21 12:23:14 +03:00
Cohee
3723ae840f Use proportional WI budget. Add None option for WI editor. 2023-06-20 22:11:01 +03:00
Cohee
df184bd46a Split WI editor and global WI select 2023-06-20 17:52:40 +03:00
Cohee
2663a8370f (Internal refactor) Decouple world info editor from global WI selector 2023-06-20 13:47:34 +03:00
RossAscends
3b66310dd2 fix WI2AN insertions 2023-06-20 17:59:01 +09:00
Cohee
f51af31850 Fix duplicating entries if char and global WI are the same 2023-06-19 02:19:42 +03:00
Cohee
7e975e9df0 (WIP) Assign World Info to a character. [Out of spec] 2023-06-19 01:59:09 +03:00
RossAscends
58a6ccd4a5 WI-to-AN for real this time. 2023-06-18 18:17:43 +09:00
RossAscends
75090c4fa4 WorldInfo can now be routed into Author's Note 2023-06-18 08:27:24 +09:00
RossAscends
db7578be8e toggle for hiding WI Entry memo input box 2023-06-16 23:00:02 +09:00
RossAscends
7686ac0b28 fix WI open/close buttons + entries start closed 2023-06-16 19:24:24 +09:00
kingbri
8b8bf645eb World Info: Allow disabling recursion on entries
Recursive scanning is a very great tool used to create a tree hierarchy
of entries. However, some entries should not be included in recursion
due to possible conflicts and resulting leakage in chats.

Add an individual opt-out toggle to exclude the entry from recursive
scanning if the main option is enabled.

Signed-off-by: kingbri <bdashore3@proton.me>
2023-06-14 23:00:37 -04:00
Cohee
74c676d6d8 Adjust saving and token counting debouncing rates of World Info 2023-06-14 00:44:57 +03:00
Cohee
dbad870d98 #386 Match whole word option for world info 2023-06-08 22:03:49 +03:00
SillyLossy
285d3e3d4a Fix LLAMA tokenization. Add case-sensitive WI matching 2023-05-21 00:40:13 +03:00
SillyLossy
1253d04561 Merge branch 'main' into dev 2023-05-21 00:10:26 +03:00
SillyLossy
299b9a04bc Replace info popups with toasts 2023-05-20 23:59:39 +03:00
Sanskar Tiwari
e58360a4b4 subsitute user and char variable in world info keywords 2023-05-21 02:03:09 +05:30
RossAscends
c3fe796059 World Selector&Editor Combined/Lockable/Swappable 2023-05-15 09:27:03 +09:00
RossAscends
c5d53f9134 fix heights for WI 2ndary / SD prefix/neg inputs 2023-05-07 00:09:02 +09:00
RossAscends
f1f150e5d1 -fix WI entry 2ndary key height
-initHeight and resetHeight functions moved from WI to utils
2023-05-06 21:28:24 +09:00