3760 Commits

Author SHA1 Message Date
3256dc4395 feat(BUG): Azure CosmosDB Integration 2025-06-03 02:41:26 +09:00
Kwaroran
f6d77c8c9b Merge branch 'main' of https://github.com/kwaroran/RisuAI 2025-06-02 22:54:23 +09:00
Kwaroran
dd97137bf9 Add python work - WIP 2025-06-02 22:54:06 +09:00
Kwaroran
9a44084e96 Add claude 1 hour caching 2025-06-02 21:48:54 +09:00
kwaroran
da34c27f96 Merge branch 'main' of https://github.com/kwaroran/RisuAI 2025-05-30 11:21:39 +09:00
kwaroran
05992acebf Update airisu 2025-05-30 11:21:30 +09:00
kwaroran
c3425a68dc Fix: API key priority for Custom Models with Claude format (#882)
# 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! 😊
2025-05-29 03:08:16 +09:00
kwaroran
280f116939 Improve Trigger V2 context menu positioning and code organization (#876)
# 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
2025-05-29 03:07:44 +09:00
cubicj
94253d3ca8 fix custom models apikey 2025-05-28 21:50:07 +09:00
cubicj
1fb4a0a9f8 set clickPos condition 2025-05-26 12:00:42 +09:00
cubicj
7bb6d9ee60 add style in contextMenuLoc 2025-05-26 11:44:53 +09:00
cubicj
4d1c0f32e8 add clickPos 2025-05-26 11:37:01 +09:00
cubicj
9b420fad98 separate ContextMenu func 2025-05-26 11:27:14 +09:00
Kwaroran
7b46c90035 Merge branch 'main' of https://github.com/kwaroran/RisuAI 2025-05-26 02:16:58 +09:00
Kwaroran
fc4f753df9 chore: update version to 161.3.0 in configuration and related files 2025-05-26 02:16:04 +09:00
Kwaroran
0153f29949 Add lorebook folder 2025-05-26 02:15:45 +09:00
kwaroran
6599ccb22a fix: Guest account can't access alerts properly (#875)
# 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


![image](https://github.com/user-attachments/assets/55d468e2-4af7-42bb-81db-a13208a2be1a)

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.
2025-05-25 22:48:06 +09:00
Kwaroran
c577f448fb Add caching to check 2025-05-25 22:00:05 +09:00
Kwaroran
4ed88a91bf Add claude 1 hour caching 2025-05-25 21:59:32 +09:00
enzi221
7eab920d78 fix: Guest account can't access account page 2025-05-25 21:00:09 +09:00
enzi221
a5fbc43be4 fix: Guest account can't access alerts properly 2025-05-25 20:53:26 +09:00
Kwaroran
4d54a35373 chore: update version to 161.2.0 in configuration files 2025-05-25 20:26:32 +09:00
kwaroran
bbc1ea7ab2 fix: Divider toggles should reference within group (#873)
# 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`.
2025-05-25 20:25:45 +09:00
kwaroran
425a68f940 fix: Undefined property access in AlertComp (#874)
# 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.
2025-05-25 20:25:25 +09:00
enzi221
c6f6833028 fix: Remove onclick access in AlertComp 2025-05-25 20:11:04 +09:00
enzi221
d728f9885d fix: Snippet should reference its items, not whole toggle list 2025-05-25 19:30:57 +09:00
Kwaroran
b740eeb103 chore: update version to 161.0.0 in configuration files 2025-05-25 18:23:35 +09:00
Kwaroran
445595ea54 Merge branch 'main' of https://github.com/kwaroran/RisuAI 2025-05-25 18:22:38 +09:00
kwaroran
94d7bbcc0e feat: Allow getting one chat at an index (#871)
# 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.
2025-05-25 18:22:05 +09:00
kwaroran
6b60ad7376 Fix: variable name color inconsistency (#872)
# 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
2025-05-25 18:21:33 +09:00
kwaroran
4e62fbfa1d Fix: v2trigger scroll null error (#870)
# 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.
2025-05-25 18:21:20 +09:00
kwaroran
2df1cb7318 feat: Add 'divider' and 'group'/'groupEnd' type toggle (#856)
# 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

## Dividers

| Before | After |
| --- | --- |

|![image](https://github.com/user-attachments/assets/9d6281fe-3be6-4b51-8ca1-dab20c666945)
|
![image](https://github.com/user-attachments/assets/3cec282c-29ed-4a9e-af03-9ee1f1ed4fab)|

Instead of pseudo-dividers with unwanted checkboxes, this allows
creators to define a "divider" *toggle*.


![image](https://github.com/user-attachments/assets/e22c9dda-673f-4981-9c5d-3810089e57b4)

Dividers are created by keyless `=name=divider`, or keyless valueless
`==divider`.

```
=My Module=divider
==divider
```

Multiple dividers with equal label will merge into one to prevent too
many dividers from multiple modules covering everything up.


![image](https://github.com/user-attachments/assets/7fc41a8f-02f2-4937-8d4c-ede0f41c8ac3)

```
// these won't merge
==divider
=K=divider
// these will merge
==divider
==divider
```

## Groups


![image](https://github.com/user-attachments/assets/fc3be4de-8e23-404e-b7f3-2b9d80ffc4de)

Groups are opened by keyless `=name=group` and closed by keyless
valueless `==groupEnd`. Nesting is not supported.

| Opened groups | MobileGUI |
|---|---|
|
![image](https://github.com/user-attachments/assets/8ec05169-07bd-4e20-bf04-47b1736059b5)
|
![image](https://github.com/user-attachments/assets/aa19be6c-0951-43a5-8175-4c96ade2913d)
|
2025-05-25 18:21:11 +09:00
Kwaroran
0b3a45e41e Add claude batching 2025-05-25 18:20:54 +09:00
cubicj
d90a9b1bf5 change var name color yellow 2025-05-25 13:24:46 +09:00
enzi221
c3fa0a70bd feat: Allow getting one chat at an index 2025-05-25 00:57:41 +09:00
enzi221
ade370e35d refactor: Use predefined collapsible component 2025-05-25 00:25:23 +09:00
enzi221
129389b9c0 fix: Smaller padding than anticipated 2025-05-25 00:19:12 +09:00
enzi221
932ce2646f feat: Apply mobileGUI justify-end to other toggles 2025-05-25 00:19:12 +09:00
enzi221
3f68238c9a feat: Add 'group' and 'groupEnd' type toggle 2025-05-25 00:19:12 +09:00
enzi221
ab485543b8 feat: Add 'divider' type toggle 2025-05-25 00:19:09 +09:00
cubicj
2b28c86485 fix scroll null error 2025-05-24 23:14:57 +09:00
Kwaroran
d2bc3c4210 Merge branch 'main' of https://github.com/kwaroran/RisuAI 2025-05-24 20:39:53 +09:00
kwaroran
6f3abd385a Feature: Preserve scroll position in menuMode 0 navigation (Trigger V2) (#868)
# 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.
2025-05-24 20:38:10 +09:00
kwaroran
0c2ec7d445 Feature: Trigger V2 Improvements (#867)
# 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!


![image](https://github.com/user-attachments/assets/593b8390-c609-4f2f-b247-cf40cf82ff79)


![image](https://github.com/user-attachments/assets/0ae54a4f-20f3-4e11-a19d-81176a7b27bf)


![image](https://github.com/user-attachments/assets/52a04014-0e23-4090-b7ff-595b06d3be10)
2025-05-24 20:37:29 +09:00
kwaroran
f12652b805 fix: Respect module lowLevelAccess for Lua button triggers (#866)
# 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`.
2025-05-24 20:36:46 +09:00
kwaroran
b2061cfd02 feat: aws claude 4 && fix: module lore sort properly (#865)
# 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.
2025-05-24 20:36:17 +09:00
kwaroran
acf97b7fb1 fix: prevent Buffer.from(undefined) error in native fetch for GET/DELETE requests (#862)
# 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') : '',
2025-05-24 20:36:08 +09:00
kwaroran
206d509482 feat: add memory selection metrics to HypaV3 (#861)
# 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

![preview](https://github.com/user-attachments/assets/8b805ff5-6242-401b-a1c2-ca3ca17355d6)

# Description
This PR introduces following:
- Add memory selection metrics to HypaV3
2025-05-24 20:35:47 +09:00
Kwaroran
66288c50ba Force web to not use promptInfoInsideChat 2025-05-24 20:34:29 +09:00
Kwaroran
50b59b5b87 Merge branch 'main' of https://github.com/kwaroran/RisuAI 2025-05-24 20:26:54 +09:00