Commit Graph

325 Commits

Author SHA1 Message Date
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
Cohee
1ad57e6ff6
Merge pull request #2568 from SillyTavern/wi-apply-sorting-order-fix
Fix apply WI sorting to order field
2024-07-27 21:44:02 +03:00
Wolfsblvt
5e2e48c84d More sensible UI WI entries sorting
- Use same secondary/tertiary sorting for all sortings
- Refactor and streamline code
2024-07-27 19:56:14 +02:00
Wolfsblvt
ad65fbc1fc Fix apply WI sorting to order field
- Fix using wrong values because of displayIndex
- Expand it to take any current sorting, not just the "custom" one
2024-07-27 19:27:55 +02:00
Cohee
256f0a58db
Merge pull request #2542 from SillyTavern/wi-slash-commands-performance-improvements
World Info: slash commands performance improvements
2024-07-22 22:51:53 +03:00
Cohee
1e2293713d Clone WI cache only on get 2024-07-22 22:34:53 +03:00
Cohee
8777526f8a Unasync getWorldEntry 2024-07-22 15:21:07 +00:00
Wolfsblvt
d57e43df54 Remove not needed await on global context 2024-07-22 09:22:02 +02:00
Wolfsblvt
7cbaa15aad Fix double cloning and unnecessary await 2024-07-22 09:11:37 +02:00
Wolfsblvt
4acf68cc30 Explicitly use async for saveWorldInfo 2024-07-22 04:23:05 +02:00
Wolfsblvt
0975843f1d WI entry update slash commands use debounced
- WI entry updates utilize debounced save
- Trade-off between consistency of possible data loss and performance issues in STscript loops that update multiple things in a WI file are not worth it.
2024-07-22 03:22:20 +02:00
Wolfsblvt
731d2864de Proper caching for loaded WI
- Implement StructurecCloneMap, which is a map that provides structured clones on both get and set
- Don't delete WI cache on save, but update the cache
- Ensure that cache is updated immediately, so any future get will load the new saved data already
- Still be consistent with clones, so requested cache data that wasn't saved isn't taken into account
2024-07-22 03:17:06 +02:00
Wolfsblvt
41c709e291 WI slash only reload world if it was selected 2024-07-22 02:11:11 +02:00
Wolfsblvt
5ef6315b25 Allow values below entry count, just warn 2024-07-22 01:42:54 +02:00
Wolfsblvt
8e3f3e9331 WI update "Order" from custom sorting button
- Adds a button that automatically updates the "Order" values of entries based on the custom sorting order ("displayIndex")
- Shows popup to choose starting value, because it's descending (default: 100)
- shows warnings/errors if any issues appear with the value
- warning inside popup if more than 100 entries exist, and a higher value has to be chosen
- Implements #2533
2024-07-22 01:30:08 +02:00
Cohee
3c059d19ef #2529 Prioritize disabled for UI entry state 2024-07-19 01:54:49 +03:00
Cohee
42bc8af6f4 Add decorators to typedef 2024-07-14 23:13:19 +03:00
Cohee
2c1720d4f7 Merge staging 2024-07-14 23:04:54 +03:00
Cohee
d2ca90bb2c Merge branch 'staging' into wi-processing-refactoring 2024-07-14 22:50:04 +03:00
Cohee
3fb83e47ec Run eslint 2024-07-14 14:07:23 +03:00
Cohee
c90a25e0cd Fix import syntax 2024-07-12 01:19:34 +03:00
kwaroran
3b0e07d093 move decorators effect right before constant 2024-07-12 06:43:19 +09:00