Commit Graph

346 Commits

Author SHA1 Message Date
Cohee ef980a67fb add export to the getworldentry function 2024-10-14 00:16:30 +03:00
Honey Tree 3e9bad6845 Preserving the entry extensions field through v2 char exports and imports 2024-10-12 12:30:15 -03:00
Cohee 6f4e98024a [chore] Add a log on force activation 2024-10-11 22:10:25 +03:00
Cohee b65da795ef [chore] Fix comments/logs 2024-10-11 21:59:55 +03:00
Cohee a82dce7c87 Merge branch 'staging' into world_info_force_activate_expansion 2024-10-11 21:52:55 +03:00
Honey Tree 61ba579fe2 Moving check down for spec adherence 2024-10-10 12:03:26 -03:00
Honey Tree 0d1e96cc17 Map.get returns undefined and not null on empty 2024-10-10 11:44:13 -03:00
Khreed efb63c7f24 Re-evaluate world info entry - simplified priority sort order
Changed priority primarySort ternary to check disabled first, then constant, then normal.
2024-10-10 10:19:16 -04:00
Honey Tree 7fd798b854 Typing fixes to avoid breaking any APIs 2024-10-10 10:12:19 -03:00
Honey Tree 6efa36bdbf Expand WORLD_INFO_FORCE_ACTIVATE API to allow for dynamically modified Lorebook entries 2024-10-10 09:52:54 -03:00
Khreed 28861660ef Fix Priority Sort
Corrected and expanded priority sort logic to sort by:

First constant, then normal, then disabled, then by comment.
2024-10-09 19:17:42 -04:00
Cohee 9016985827 Undo second substitution #2874 2024-09-19 15:17:11 +00:00
steve green 8edc999854
Second macro evaluation of WI for all positions
- The first macro evaluation occurs when the entry is activated.
- The second macro evaluation occurs after the regex replacement 
  * and only when the entry is before or after the char definition
this may cause confusion for users.
I'm not sure if this is the right thing to do, but it's one way I can think of to make all this make more sense.
2024-09-19 10:16:42 +08:00
Wolfsblvt c45e42ce7d Fix WI joiner/mather not being at the start 2024-09-16 05:18:37 +02:00
Wolfsblvt 984790f53c Fix eslint + reset level on toggle 2024-09-15 22:31:29 +02:00
Wolfsblvt eeed072ebb Add UI element for delay recursion level
- Tied and only visible to the "delay until recursion" toggle
- Will set it to a numerical value if used, otherwise keeps true/false state of the toggle
2024-09-15 22:15:24 +02:00
Wolfsblvt 413f6a0379 Expand logging for WI and scan states 2024-09-15 20:28:03 +02:00
Wolfsblvt f0a3886b42 Reset scan state to recursion on more available 2024-09-15 17:02:48 +02:00
Wolfsblvt 609439def1 WI delay until recursion levels 2024-09-15 16:56:21 +02:00
Cohee f1f74217cc Move joiner into constant 2024-09-14 21:50:58 +03:00
steve green 96fe4c4ab6
join chatlog with `\x01` 2024-09-14 10:05:30 +08:00
Cohee 34b2707895 Try to preserve old hashes 2024-09-13 10:52:35 +03:00
Cohee 7a7673432a Calculate entry hash before replacing macros
Fixes #2762
2024-09-13 10:47:25 +03:00
Cohee 75c6bee350
Filter inclusion groups by timed effects (#2765)
* Filter inclusion groups by timed effects
Closes #2762

* Skip group scoring check if sticky entries are present

* Optimize sticky checks
2024-09-05 21:15:45 +03:00
Cohee a82617be5b
Merge pull request #2773 from SillyTavern/fix-wi-sticky-on-recursion
Fix WI sticky possibly not sticking with delay until recursion when inclusion group is set too
2024-09-05 10:10:19 +03:00
LenAnderson c6404a6401 should look for both .regex-highlight and .item for plaintext 2024-09-04 21:44:37 -04:00
Wolfsblvt 0284698428 Fix WI sticky possibly not sticking on recursion
- When a WI entry has sticky, and inclusion group and "delay until recursion" set, another entry from the same group might prevent the sticky from activating. This is fixed here.
2024-09-04 22:39:32 +02:00
LenAnderson 0619552dbb fix WI fancy key click target 2024-09-04 11:04:18 -04:00
Wolfsblvt a70b5af0c4 Prefer stickied WI for budget-limited cases
- Instead of processing entries by default sorting (based on order and books (char first, etc)), sticky will now be the first to process. This will make sure that stickied entries will reach the prompt, even in budget-limited scenarios.
2024-09-03 21:14:44 +02:00
Wolfsblvt b08e55b9f6 WI highlight/log on automatic setting change 2024-08-31 22:20:35 +02:00
honey-tree a276dbdd44
Implements max recursion depth for lorebooks (#2698)
* Include slider for Max Recursion Depth

* Implement Behavior for Max Recursion Depth

* Title message correction

* Disabling min activations when max recursion depth is disabled and vice versa

* Feature renamed to Max Recursion Steps

* Added warnings that min activations and max recursion steps disable each other

* Revert "Added warnings that min activations and max recursion steps disable each other"

This reverts commit 8c7efd09c5.

* Revert "Feature renamed to Max Recursion Steps"

This reverts commit f043fe6b60.

* Revert "Disabling min activations when max recursion depth is disabled and vice versa"

This reverts commit a3a28874bf.

* Renames the feature to Max Recursion Steps and disables it when Min Activations are enabled

* Combine info-warnings, log stop condition

---------

Co-authored-by: Your Name <you@example.com>
Co-authored-by: Cohee <18619528+Cohee1207@users.noreply.github.com>
2024-08-23 21:34:18 +03:00
Wolfsblvt 550feddf82 Improve WI Character Filter description 2024-08-19 23:37:10 +02:00
Cohee 41a3a97925 Clean-up commented code 2024-08-11 00:10:17 +03:00
RossAscends d7d99fa94c add tooltip, efficient-ify class toggling 2024-08-10 17:53:02 +09:00
RossAscends 0dce445375 fix toggle logic and cursors 2024-08-10 13:07:07 +09:00
RossAscends 704058ac36 re-divorce entry active state from trigger strategy 2024-08-10 12:48:47 +09:00
Wolfsblvt ed3f028a36 consistent template names 2024-08-06 11:30:17 +02:00
steve02081504 02c5a40b98 Crate WorldInfoKeywordHeaders.html 2024-08-06 11:20:19 +08:00
Cohee 0baca3b7d3 Merge branch 'staging' into wi-go-brrrrrr-too 2024-08-06 00:29:24 +03:00
RossAscends 64e716bb62 async for resetScrollHeight, slightly faster WI/AF panel loads 2024-08-05 12:03:46 +09:00
Wolfsblvt 34767e5ce3 Improve performance by half on WI book load 2024-08-05 02:05:27 +02:00
Wolfsblvt 3523ec334d Improve performance on fancy key selector init 2024-08-05 01:06:37 +02:00
Cohee 664447d585 Stop propagation on WI entry delete 2024-08-03 00:00:15 +03:00
Wolfsblvt c9acea8522 fix WI sorting error 2024-08-02 22:44:21 +02:00
Wolfsblvt dee4ad8794 Make 'sortWorldInfoEntries' custom sortable 2024-08-02 20:57:55 +02:00
Wolfsblvt c0039111dd Update delete WI entry to new popup 2024-08-02 20:51:12 +02:00
Wolfsblvt 3897b8c082 Export and doc most of wi functions 2024-08-02 20:42:53 +02:00
steve green ba9b16191f
Update 'zh-cn' translation (#2583)
* Update world-info.js

- make the rename button is also available in case of WIbook corruption.
- make the WI engine doesn't crash when certain entrys with `content === null`.

* Update zh-cn.json

* Part revert "Update world-info.js"

This part reverts commit 0693c9c400.
2024-07-30 17:20:10 +03:00
Wolfsblvt 968133dee9 Fix WI reloading on slash commands 2024-07-28 11:58:23 +03:00
Wolfsblvt d46fd9d174 Fix WI reloading on slash commands 2024-07-28 04:17:45 +02:00