* feat: enhance asset management with extension categories
Co-authored-by: Copilot <copilot@github.com>
* fix: enhance extension name validation in server endpoints
* feat: display extension author in the extensions list
* fix: unify server error response format
Co-authored-by: Copilot <copilot@github.com>
* feat: add splash on installing third-party for the first time
* fix: add URL format validation, unify validation error messages
Co-authored-by: Copilot <copilot@github.com>
* fix: apply object freeze to EMPTY_AUTHOR value
Co-authored-by: Copilot <copilot@github.com>
* fix: typecheck extensionName in API requests
Co-authored-by: Copilot <copilot@github.com>
* feat: add feature flag guard to extensions endpoints
Co-authored-by: Copilot <copilot@github.com>
* fix: parse URL before checking
Co-authored-by: Copilot <copilot@github.com>
* fix: use case insensitive regex check
* fix: make debug log more useful
Co-authored-by: Copilot <copilot@github.com>
* fix: add pre-validation of URL format and protocol
Co-authored-by: Copilot <copilot@github.com>
* fix: leaner installation success toast
* fix: settings data loss when extensions are disabled
* fix: don't try to auto-focus elements that don't exist
Co-authored-by: Copilot <copilot@github.com>
* fix: set Popup.defaultResult to negative
Co-authored-by: Copilot <copilot@github.com>
* revert: restore undefined default result
---------
Co-authored-by: Copilot <copilot@github.com>
* refactor: ♻️ Replace deprecated code defined within this repository
- Replace ““/public/scripts.js” > `callPopup`” with ““/public/scripts/popup.js” > `callGenericPopup`”.
- Replace ““/public/scripts/tokenizers.js” > `getTokenCount`” with ““/public/scripts/tokenizers.js” > `getTokenCountAsync`”.
- Replace ““/public/scripts/extensions/assets/index.js” > `executeSlashCommands`” with ““/public/scripts/extensions/assets/index.js” > `executeSlashCommandsWithOptions`”.
* refactor: ♻️ Replace deprecated code from standard library
1. Replace set of deprecated `escape` and deprecated `unescape` functions with `encodeURIComponent` and `decodeURIComponent` functions.
2. Replace set of `encodeURIComponent` and deprecated `unescape` functions with a custom `convertTextToBinaryString` function.
* refactor: ♻️ Replace deprecated code imported from external library
All of them is from jQuery.
1. Replace `$(document).ready(() => { ... })` → `jQuery(() => { ... })`.
2. Replace event type direct calls.
1) Change
- `$('...').change(function () { ... })` → `$('...').on('change', function () { ... })`.
2) Click
- `$('...').click(function () { ... })` → `$('...').on('click', function () { ... })`.
- `$('...').click()` → `$('...').trigger('click')`.
3) Focus
- `$('...').focus(function () { ... })` → `$('...').on('focus', function () { ... })`.
- `$('...').focus()` → `$('...').trigger('focus')`.
4) Blur
- `$('...').blur(function () { ... })` → `$('...').on('blur', function () { ... })`.
5) Keyup
- `$('...').keyup(function () { ... })` → `$('...').on('keyup', function () { ... })`.
* refactor(Attachment): ♻️ Merge `convertTextToBinaryString` and `convertTextToBase64`
`convertTextToBase64` function use `Uint8Array.prototype.toBase64` if supported by the Browser and use a combination of `Window.btoa` and `String.fromCharCode` as fallback.
* fix: 🐛 Fix Bind World Info to Character Card
Using the new `Popup` class.
* fix: 🐛 Fix Bind World Info to Character Card
Using the new `Popup` class.
* refactor: 🐛 Refactor and fix Character World Info popup
Add singleton back and some optimization.
- **🛡️ Singleton Pattern:** Implemented a singleton pattern using the `characterWorldPopup` variable. This prevents multiple instances of the popup from being created, ensuring a clean and predictable UI. If the popup is already open, it will be brought into focus instead of creating a duplicate.
- **♻️ Improved Readability:** The event handling logic has been extracted into clearly named functions (`handlePrimaryWorldSelect`, `handleExtrasWorldSelect`), making the `Popup` constructor cleaner and the overall code more readable and maintainable.
- **⚙️ Optimized Performance:** The new implementation caches frequently accessed values and jQuery selectors, reducing redundant DOM lookups and improving performance.
---
* refactor(Chat): ♻️ Modernize chat deletion confirmation
Replaces the deprecated `callPopup` with the modern `callGenericPopup` for the chat deletion confirmation dialog.
* Fix /delchat command
* Remove unused code
* Fix type. Change value to debug log
* Remove value logs
* Remove singleton pattern for openCharacterWorldPopup
---------
Co-authored-by: Cohee <18619528+Cohee1207@users.noreply.github.com>