Commit Graph

496 Commits

Author SHA1 Message Date
Kwaroran
6ed005b733 feat: add local activation option in global lorebook settings 2025-03-05 05:41:04 +09:00
Bo26fhmC5M
1775591ef0 feat: add support for OpenAI-compatible embedding API 2025-02-27 23:27:50 +09:00
Kwaroran
5a4b7bbef2 Add anti server overload 2025-02-26 09:14:32 +09:00
Kwaroran
07717a7937 Merge branch 'main' of https://github.com/kwaroran/RisuAI 2025-02-25 05:27:24 +09:00
Kwaroran
6c72d78157 Add Sonnet 3.7 2025-02-25 05:25:34 +09:00
bangonicdd
abf4cdda9d fix: force refresh modules after closing menu 2025-02-23 20:35:39 +09:00
Kwaroran
94e23543dd Add ExperimentalGoogleTranslator 2025-02-20 04:06:35 +09:00
Kwaroran
6177957c64 feat: add return CSS error option and update related functionality 2025-02-19 11:12:12 +09:00
kwaroran
f085c1c496 Merge branch 'main' into patch-2 2025-02-16 19:15:48 +09:00
Kwaroran
825507fcaf Add V1 option and warning 2025-02-16 15:08:14 +09:00
Bo26fhmC5M
1562f0549f feat: add option to show translation loading 2025-02-16 08:53:41 +09:00
Kwaroran
4da60032d8 Add bulk enabling settings 2025-02-15 21:45:00 +09:00
Kwaroran
dcc7c56726 Merge branch 'main' of https://github.com/kwaroran/RisuAI 2025-02-15 21:32:11 +09:00
Kwaroran
d2fce340bb Add TriggerV2 2025-02-15 21:29:37 +09:00
bangonicdd
b783dc9874 feat: reintroduce module integration 2025-02-10 09:02:57 +09:00
Bo26fhmC5M
60118e6e8f Merge branch 'kwaroran:main' into patch-23 2025-02-08 14:48:56 +09:00
Bo26fhmC5M
2d455840a4 feat: add localization for HypaV3 settings and modal 2025-02-08 02:17:35 +09:00
Bo26fhmC5M
d36d8c8654 feat: set to default settings when selecting HypaV3 on OtherBotSettings 2025-02-07 23:43:20 +09:00
Bo26fhmC5M
6d79f45d32 feat: add doNotSummarizeUserChat option in HypaV3
- Add doNotSummarizeUserChat option to exclude user messages from summarization
- Add early return logic to prevent unnecessary similarity checks when summaries are empty
2025-02-07 21:08:50 +09:00
kwaroran
89c34dfdd7 fix: disable module before remove (#747)
# 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 fixes an issue where a removed module remains active until the
app is restarted if it was enabled at the time of deletion.
2025-02-07 20:34:41 +09:00
bangonicdd
b771105025 fix: disable module before remove 2025-02-07 01:26:21 +09:00
bangonicdd
ef6f671792 feat: custom toggles for modules 2025-02-06 19:45:55 +09:00
kwaroran
6daaa03f75 feat: display estimated max memory tokens ratio in HypaV3 settings (#737)
# 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/5cb0f8fd-9885-4e54-8ffe-f1298672a221)

# Description
This calculation provides users with an approximate maximum memory
tokens ratio, allowing users to choose appropriate maximum context size
or memory tokens ratio based on their specific needs and circumstances.

The maximum memory tokens ratio is calculated based on:

`maxMemoryRatio = (maxContextTokens - requiredTokens) /
maxContextTokens`
- where `requiredTokens = promptTemplateTokens + charTokens +
maxLoreTokens + (maxResponseTokens * 3)`
2025-02-02 07:51:47 +09:00
Kwaroran
25aa83877b Add reasoning effort 2025-02-01 09:05:07 +09:00
Bo26fhmC5M
dc6124d2ab feat: display estimated max memory tokens ratio in HypaV3 settings 2025-01-31 23:33:57 +09:00
Kwaroran
757a944686 Add inlayErrorResponse 2025-01-31 17:38:14 +09:00
Kwaroran
e8ec986f65 Add server backup 2025-01-30 13:50:16 +09:00
Kwaroran
338d1cfec2 Add models 2025-01-29 05:38:26 +09:00
Bo26fhmC5M
1c5ed2fe32 fix: remove instruct35 from HypaV3 supa model list
- Remove outdated model to improve summarization performance
2025-01-23 19:50:24 +09:00
Bo26fhmC5M
6f6e4b925a refactor: minor changes 2025-01-19 19:41:59 +09:00
Bo26fhmC5M
cd65eaf400 feat: add process regex script option in HypaV3 modal 2025-01-19 18:05:11 +09:00
kwaroran
e073d66bca feat: improve HypaV3 (#721)
# PR Checklist
- [x] 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
- feat: add translate button to HypaV3 modal
- feat: add dual-action translation (cached/regenerate) in HypaV3 modal
- Implements shift+click (desktop) and double tap (mobile) for
regenerating translations while maintaining regular click/tap for cached
translations.
- feat: improve ratio sliders interaction in HypaV3 settings
- feat: add lastSelectedSummaries property to store selected memory
indices
- feat: display next message to be summarized in HypaV3 modal
2025-01-17 22:54:08 +09:00
Bo26fhmC5M
6ffaa1257e feat: improve ratio sliders interaction in HypaV3 settings 2025-01-16 22:12:32 +09:00
poroyo
0f19952e2a feat: add navigation from prompt comparison tooltip overview to prompt lines 2025-01-16 17:23:11 +09:00
Bo26fhmC5M
a1158ebdb1 fix: adjust memory selection order 2025-01-13 14:09:18 +09:00
kwaroran
3fa199dbfa Improve prompt comparison functionality with usability enhancements (#716)
# 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
This PR introduces a couple of usability improvements to the prompt
comparison functionality.

1. If the two prompts are identical

Instead of showing the content right away, an alert is displayed saying
the two prompts are the same. Only when the user clicks "Yes" the
content will be shown. This avoids unnecessary confirmation of identical
prompts.

<img width="519" alt="a"
src="https://github.com/user-attachments/assets/bf48420e-bf69-4c8a-b700-754e1c38b6a6"
/>


2. If the two prompts are different

A summary of the number of modified, added, and removed lines is
displayed.

<img width="598" alt="b"
src="https://github.com/user-attachments/assets/c3269ee8-25e7-4ba9-957d-4e377d523795"
/>

When hovering over the summary, a quick overview of the changes appears.
When only a single word or character is modified, it was previously hard
to identify the line that was changed. Now, the overview improves
clarity, making it easier to understand the changes.

<img width="595" alt="e"
src="https://github.com/user-attachments/assets/1b55a3bc-70d2-43fa-ab4c-754e6fd4a85d"
/>

On mobile devices (tested on iOS 16.7), tapping on the 'Differences
detected. Please review the changes.' section will display the changes.

---

As a future improvement, it might be useful to display line numbers or
allow users to click and navigate to the specific parts of the
differences.

I hope these changes make it easier to use, but feel free to reject this
PR if you find it unnecessary or if the code feels too messy. I
completely understand and appreciate your feedback.

Thank you for your time!
2025-01-12 23:59:13 +09:00
Bo26fhmC5M
50361d7aa2 feat: Implement HypaV3 ratio-based memory 2025-01-12 11:05:18 +09:00
poroyo
2ee72ca86f feat: add tooltip for differences overview 2025-01-11 18:30:45 +09:00
poroyo
d9f4951c1c feat: add prompt comparison alert for identical prompts 2025-01-11 14:33:06 +09:00
Kwaroran
9fc8978d1d Add GeminiBlockOff 2025-01-07 00:05:20 +09:00
Kwaroran
2ec13a4550 Modify some parts of PR 2025-01-06 00:30:33 +09:00
kwaroran
7d1e9dc9bd feat: add prompt comparison feature (#704)
# 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
This PR adds a **prompt comparison feature** to the prompt preset
interface. Now, users can compare two different prompts to identify
differences.

## How to Use
1. Open the prompt preset window.
2. Click the diff button (next to the copy button) for the first prompt
to use as the baseline. The button will turn green, indicating
selection.
<img width="487" alt="c"
src="https://github.com/user-attachments/assets/c2dcf5fa-c4ee-4b3f-8e52-3f0866b12bc4"
/>

3. Click the diff button for the second prompt to compare against the
baseline. A diff view will appear.
4. Clicking the same diff button twice will clear the selection.

## Diff Display Details
- Line-level comparison
- Modified lines: blue vertical line.
- Deleted content: red text on red background with red vertical line.
- Added content: green text on light green background with green
vertical line.

<img width="597" alt="b"
src="https://github.com/user-attachments/assets/0d026e9e-a7a0-4a17-9b80-a2b57c74d7f9"
/>


- If the prompt content is identical, the following message will be
displayed at the top

<img width="600" alt="a"
src="https://github.com/user-attachments/assets/dd5f36f2-9e96-4279-9f9f-79a17f9e4c89"
/>


## Implementation Details
1. `handleDiffMode` manages prompt selection and clearing.
2. `checkDiff` compares prompts and uses `highlightChanges` to mark
differences.
3. Special characters are escaped with `escapeHtml` to ensure the text
is displayed as-is.
4. `resultHtml` is rendered via `alertMd`.

## Notes
- This feature uses the `jsdiff` library to compare prompts efficiently.
- The comparison includes the role, type1, and type2 fields (e.g., ##
system; plain; main). Even if the prompts' text is identical,
differences in these fields will be treated as a mismatch.
- The rendering process in `alertMd` appears to sanitize potentially
dangerous content. However, additional escaping is applied to ensure
that the text is displayed as-is.
- `botpreset.svelte` grew significantly due to this feature;
modularization was considered but not implemented.
- The reason for using the "Prompt Preset" window instead of the "Prompt
Preview" feature is that "Prompt Preview" displays the final form with
CBS processing applied. Even if the content in "Prompt Preview" appears
identical, the actual prompts can differ significantly.

If this feature, its implementation, or any other issue doesn't fit the
project's vision, feel free to reject this PR! Thank you for reviewing!
2025-01-06 00:10:51 +09:00
Bo26fhmC5M
bb93e04961 fix: replace unsupported Hrkt unicode property to Hira and Kana 2025-01-05 19:32:31 +09:00
poroyo
495163c9cf style: improve readability for added and removed lines with border-left 2025-01-05 16:11:00 +09:00
poroyo
8ba4417065 feat: add prompt comparison feature 2025-01-05 14:20:20 +09:00
Kwaroran
cd092a5a01 feat: add translation feature and ban character set functionality 2024-12-29 04:03:21 +09:00
Kwaroran
c5f5786af7 fix: update image source reference in bot presets to use preset.image 2024-12-26 07:44:18 +09:00
Kwaroran
2672195d92 Add preset related features 2024-12-26 04:29:14 +09:00
Kwaroran
28d8bfdd22 Fix nativeFetch and comfy 2024-12-25 21:06:52 +09:00
Kwaroran
027a591424 Remove V1 Plugin 2024-12-24 23:14:49 +09:00