# PR Checklist
- [ ] Have you checked if it works normally in all models? *Ignore this
if it doesn't use models.*
- [ ] Have you checked if it works normally in all web, local, and node
hosted versions? If it doesn't, have you blocked it in those versions?
- [ ] Have you added type definitions?
# Description
Fixed a bug where, when using Custom Models with the Claude format, the
API key specified in the Custom Models settings was ignored. Instead,
the global 'Claude API Key' from the Chat Bot tab was incorrectly being
used unless a proxy was configured.
The logic has been updated to correctly prioritize API keys:
1. Use the API key provided in Custom Models settings `arg.key` if it
exists.
2. Perform the proxy check.
3. Use the global 'Claude API Key' as a fallback if the conditions above
are not met.
Let me know if you'd like any adjustments! Good luck with your PR! 😊
# PR Checklist
- [ ] Have you checked if it works normally in all models? *Ignore this
if it doesn't use models.*
- [ ] Have you checked if it works normally in all web, local, and node
hosted versions? If it doesn't, have you blocked it in those versions?
- [ ] Have you added type definitions?
# Description
- Separated right-click menu functions from main trigger component
- Added dynamic positioning to prevent context menu from going
off-screen
- Context menu now adjusts direction based on click position
# PR Checklist
- [ ] Have you checked if it works normally in all models? *Ignore this
if it doesn't use models.*
- [x] Have you checked if it works normally in all web, local, and node
hosted versions? If it doesn't, have you blocked it in those versions?
- [x] Have you added type definitions?
# Description

When an user is not logged in and anytime any dialog is about to open,
undefined property access of `message` event happens, opening error
dialog, which causes another undefined property access, and so forth.
This does not stop so it blocks even log in itself.
This PR mitigates it by simply converting those accesses to optional
chaining.
# PR Checklist
- [ ] Have you checked if it works normally in all models? *Ignore this
if it doesn't use models.*
- [x] Have you checked if it works normally in all web, local, and node
hosted versions? If it doesn't, have you blocked it in those versions?
- [x] Have you added type definitions?
# Description
When dividers within a group becomes many, it would throw.
Found out that the divider was referencing the whole list of toggles
(root level), not `items` (items of a group it belongs), as divider
development happened before the group. It caused out of index array
access and `prevToggle.type` would throw because `prevToggle` can be
`undefined`.
# PR Checklist
- [ ] Have you checked if it works normally in all models? *Ignore this
if it doesn't use models.*
- [x] Have you checked if it works normally in all web, local, and node
hosted versions? If it doesn't, have you blocked it in those versions?
- [x] Have you added type definitions?
# Description
I can't find the history but `onclick` is always `undefined`, never
assigned. But it's being called in an `onclick`. This blocks all types
of exports. I just removed it.
# PR Checklist
- [ ] Have you checked if it works normally in all models? *Ignore this
if it doesn't use models.*
- [x] Have you checked if it works normally in all web, local, and node
hosted versions? If it doesn't, have you blocked it in those versions?
- [x] Have you added type definitions?
# Description
Getting one single chat at a specified index would help lighten Lua
scripts in certain scenarios such as "get the second last chat".
Currently I have to iterate (in `getFullChatMain`) the whole chat by
`getFullChat(id)` and then `fullChat[#fullChat - 1]`. With this PR, it
is simplified as `getChat(id, -2)`
Returns `nil` when no chat exists in the index.
# PR Checklist
- [ ] Have you checked if it works normally in all models? *Ignore this
if it doesn't use models.*
- [ ] Have you checked if it works normally in all web, local, and node
hosted versions? If it doesn't, have you blocked it in those versions?
- [ ] Have you added type definitions?
# Description
Standardize variable name display color to yellow
# PR Checklist
- [ ] Have you checked if it works normally in all models? *Ignore this
if it doesn't use models.*
- [ ] Have you checked if it works normally in all web, local, and node
hosted versions? If it doesn't, have you blocked it in those versions?
- [ ] Have you added type definitions?
# Description
Add null check for scroll element to prevent runtime errors
Sorry for not catching this earlier - added proper validation to prevent
crashes.
# PR Checklist
- [ ] Have you checked if it works normally in all models? *Ignore this
if it doesn't use models.*
- [ ] Have you checked if it works normally in all web, local, and node
hosted versions? If it doesn't, have you blocked it in those versions?
- [ ] Have you added type definitions?
# Description
Implements scroll position preservation functionality for RisuAI's
Trigger V2 menuMode 0. When users navigate away from menuMode 0 and then
return, the scroll position is now automatically restored to where they
left off.
Changes:
- Saves scroll position when leaving menuMode 0
- Restores saved scroll position when returning to menuMode 0
- Improves user experience by maintaining navigation context"
This enhancement provides a smoother user experience by eliminating the
need to manually scroll back to previous positions after navigation.
# PR Checklist
- [ ] Have you checked if it works normally in all models? *Ignore this
if it doesn't use models.*
- [ ] Have you checked if it works normally in all web, local, and node
hosted versions? If it doesn't, have you blocked it in those versions?
- [ ] Have you added type definitions?
# Description
This PR adds a back button functionality and improves textarea
components in Trigger V2.
## Changes Made
- Added back button for better navigation
- Updated textarea components for improved user experience
- Enhanced UI/UX in Trigger V2 section
This is my first pull request to this project. I would greatly
appreciate thorough review and feedback from maintainers. Please let me
know if any changes or improvements are needed.
Thank you for your time and consideration!



# PR Checklist
- [ ] Have you checked if it works normally in all models? *Ignore this
if it doesn't use models.*
- [x] Have you checked if it works normally in all web, local, and node
hosted versions? If it doesn't, have you blocked it in those versions?
- [x] Have you added type definitions?
# Description
For Lua scripts triggered by button clicks, `lowLevelAccess` flag is not
respecting module level settings, only character's.
This PR allows modules with low level access set run low level functions
in `onButtonClick`.
# PR Checklist
- [ ] Have you checked if it works normally in all models? *Ignore this
if it doesn't use models.*
- [ ] Have you checked if it works normally in all web, local, and node
hosted versions? If it doesn't, have you blocked it in those versions?
- [ ] Have you added type definitions?
# Description
In my previous PR #822 there's an issue where the module lore sort was
not saving properly. I believe this PR will fix that. I appreciate your
time.
# PR Checklist
- [ ] Have you checked if it works normally in all models? *Ignore this
if it doesn't use models.*
- [x] Have you checked if it works normally in all web, local, and node
hosted versions? If it doesn't, have you blocked it in those versions?
- [ ] Have you added type definitions?
# Description
While tracking down the error "The first argument must be one of type
string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type
undefined" that occurs during ComfyUI image generation, I found an issue
in the `fetchNative` function.
## Issue
When sending GET or DELETE requests, the `realBody` variable is set to
`undefined`, but it's directly passed to `Buffer.from()` without null
checking, causing the error.
## Fix
Added a simple null check to prevent the error:
```typescript
// Before
body: Buffer.from(realBody).toString('base64'),
// After
body: realBody ? Buffer.from(realBody).toString('base64') : '',
# PR Checklist
- [ ] Have you checked if it works normally in all models? *Ignore this
if it doesn't use models.*
- [ ] Have you checked if it works normally in all web, local, and node
hosted versions? If it doesn't, have you blocked it in those versions?
- [ ] Have you added type definitions?
# Preview

# Description
This PR introduces following:
- Add memory selection metrics to HypaV3