Commit Graph

3110 Commits

Author SHA1 Message Date
Kwaroran
ff4cfede65 Enable alert for copied text in chat 2024-11-27 07:56:24 +09:00
Kwaroran
2acbc00548 Improve chat copy 2024-11-27 07:53:35 +09:00
Kwaroran
2b50abc09c Add retranslate 2024-11-27 06:31:59 +09:00
Kwaroran
981ec3921e Add plenty of features 2024-11-27 06:01:42 +09:00
Kwaroran
73b7fd9156 Update LLM model provider from GoogleCloud to VertexAI 2024-11-27 04:48:30 +09:00
Kwaroran
9ab7dd3091 Remove AWS Claude check from BotSettings 2024-11-27 04:47:05 +09:00
Kwaroran
07fd36a811 Fix background embedding 2024-11-27 04:44:25 +09:00
Kwaroran
597c8879fc Add systemContentReplacement and Flags 2024-11-27 04:33:12 +09:00
kwaroran
cc8d753dc8 Rework custom API 2024-11-25 23:04:32 +09:00
kwaroran
8274fae180 Refactor model handling 2024-11-25 05:25:58 +09:00
kwaroran
cfc819f144 Add modellist (incomplete) 2024-11-24 22:13:44 +09:00
kwaroran
66dddbb20c Bump version to 139.2.0 2024-11-22 21:54:24 +09:00
kwaroran
6214388cc6 Add new model options for Mistral Large 2411 and Gemini Exp 1121 and Flash 002, fixes #666 2024-11-22 21:52:39 +09:00
kwaroran
a09b7827f0 Bump version to 139.1.0 2024-11-21 15:44:29 +09:00
kwaroran
ec03903372 Add OAI prediction 2024-11-21 15:44:14 +09:00
kwaroran
e895008814 Add 4o 1120 2024-11-21 15:38:04 +09:00
kwaroran
1102899c26 Enable experimental caching for Claude in WelcomeRisu component 2024-11-18 21:17:59 +09:00
kwaroran
ebbb9d9191 Add specific token ban 2024-11-18 20:08:34 +09:00
kwaroran
c361372de1 Fix macOS Asset Visibility Issue in Local Version of RisuAI (#665)
# PR Checklist
- [ ] Did you check if it works normally in all models? *ignore this
when it dosen't uses models*
- [x] Did you check if it works normally in all of web, local and node
hosted versions? if it dosen't, did you blocked it in those versions?
- [ ] Did you added a type def?

# Description
## Problem
This PR resolves an issue where assets were not visible on macOS when
using `asset://localhost/` URLs.

The problem occurred because **DOMPurify** was removing the `src`
attribute when its value started with `asset://localhost/`. This
behavior affected the visibility of assets on macOS for the Local
version of RisuAI.


## Solution
To address this, I chose to use `DOMPurify.addHook` to allow `src`
attributes starting with `asset://localhost/` for certain tags.

I also thought about another solution: passing `ALLOWED_URI_REGEXP` to
`DOMPurify.sanitize`. However, I decided not to use it because it would
require using regular expressions to check strings every time the method
is called, which might be less efficient in my opinion.


## Considerations
While this issue is specific to macOS and the Local version of RisuAI, I
opted not to include additional conditions for the following reasons:
1. The code change is simple and lightweight.
2. It doesn’t cause conflicts on other OSes or RisuAI versions.
3. Avoiding conditions improves readability and maintainability.

---

If you have any suggestions for a better approach, I’d be happy to hear
them!

---

## Linked Issue
This PR addresses and fixes #656
2024-11-17 23:38:18 +09:00
kwaroran
871b9ce367 Bump version to 139.0.0 2024-11-17 23:38:03 +09:00
kwaroran
342e4a83c9 Update Chinese translations 2024-11-17 23:37:41 +09:00
kwaroran
5f9b79816a Remove packageManager field from package.json 2024-11-17 23:21:00 +09:00
kwaroran
cd7c2e2086 Improve chinese 2024-11-17 23:20:27 +09:00
kwaroran
032da9c8b8 Update language 2024-11-17 23:18:05 +09:00
kwaroran
33b966af6e Merge branch 'main' of https://github.com/kwaroran/RisuAI 2024-11-17 23:03:26 +09:00
kwaroran
c2b5177c92 Improve welcome page and add gemini exp 2024-11-17 23:03:22 +09:00
poroyo
13fc50eb42 Fix macOS asset visibility issue 2024-11-17 03:07:47 +09:00
kwaroran
78a14eb10c Add text node rendering to custom HTML (#663)
# PR Checklist
- [ ] Did you check if it works normally in all models? *ignore this
when it dosen't uses models*
- [x] Did you check if it works normally in all of web, local and node
hosted versions? if it dosen't, did you blocked it in those versions?
- [ ] Did you added a type def?

# Description
## Summary

This PR updates the `renderChilds` function to properly handle
`TextNode` rendering. Previously, `renderChilds` only iterated over
`children`, which excluded `TextNode`s and rendered only `HTMLElement`s.
Now, the function iterates over `childNodes`, ensuring that:

1. **TextNodes**: Are rendered by displaying their `textContent`.
2. **ElementNodes**: Are rendered as before, using `renderGuiHtmlPart`.


## Context

Initially, I wondered whether the absence of `TextNode` rendering might
have been due to security considerations. However, since elements like
headings (`h1`), lists (`ul`, `li`), and strong text (`strong`) were
already being rendered, it seems likely that the exclusion of `TextNode`
rendering was an oversight rather than an intentional decision.

I believe that these elements are meaningful only when they include
text. For example, elements like `h1`, `h2`, `h3`, `p`, `li`, `strong`,
`em`, and `code` rely on text content to fulfill their intended purpose.


## Notes

If there was a specific reason for excluding `TextNode`s in the original
implementation (e.g., for security, intentional design choices, or other
constraints), please feel free to reject this PR. I completely
understand if this change conflicts with any design decisions or
requirements of the project.

Thank you for your time and consideration!
2024-11-16 21:24:56 +09:00
kwaroran
1778871dc2 Return null for missing cached items in AccountStorage 2024-11-16 20:54:33 +09:00
kwaroran
05135c8bf0 Fix dbsaveerror 2024-11-16 19:55:13 +09:00
kwaroran
bea14f22c1 Add JSON schema for Claude 2024-11-15 12:44:50 +09:00
poroyo
d3d7918e5a Fix missing text node rendering to custom HTML 2024-11-15 11:39:46 +09:00
kwaroran
6dd20be25c Add setup instructions for Claude API integration 2024-11-14 21:45:12 +09:00
kwaroran
f9c61bbfeb Merge branch 'main' of https://github.com/kwaroran/RisuAI 2024-11-14 21:42:58 +09:00
kwaroran
a862ffe0e3 Enhance chat setup options and improve UI responsiveness 2024-11-14 21:42:56 +09:00
kwaroran
262c13bf4e Improve Chinese Translation (#660)
# PR Checklist
- [/] Did you check if it works normally in all models? *ignore this
when it dosen't uses models*
- [Yes] Did you check if it works normally in all of web, local and node
hosted versions? if it dosen't, did you blocked it in those versions?
- [/] Did you added a type def?

# Description
Improve some Chinese translations and some outdated URLs
2024-11-12 21:52:03 +09:00
kwaroran
75efc36211 Bump version to 138.1.3 in configuration and related files 2024-11-12 21:50:58 +09:00
kwaroran
4627aacbf9 Refactor script caching functions to include mode parameter and improve background HTML parsing 2024-11-12 21:50:40 +09:00
heshiqi
1cbe505947 Improve Chinese Translation 2024-11-12 13:43:13 +08:00
kwaroran
c863f749b8 Merge branch 'main' of https://github.com/kwaroran/RisuAI 2024-11-11 20:45:29 +09:00
kwaroran
d0915db174 Fix sessions 2024-11-11 20:45:27 +09:00
kwaroran
be5dd7caea Fix AWS Claude Support (#659)
# PR Checklist
- [No] Did you check if it works normally in all models? *ignore this
when it dosen't uses models*
This only takes effect on AWS Claude models
- [Yes] Did you check if it works normally in all of web, local and node
hosted versions? if it dosen't, did you blocked it in those versions?
- [No] Did you added a type def?

# Description
AWS Claude model calling no longer supports direct calling, but supports
Cross-region inference instead. All Cross-region inference model profile
IDs equal to original model name with "us." in the beginning. Reference:
https://us-east-1.console.aws.amazon.com/bedrock/home?region=us-east-1#/inference-profiles
2024-11-09 15:35:38 +09:00
kwaroran
d7c4ea5db4 Fix {{role}} CBS support to custom HTML (#657)
# PR Checklist
- [ ] Did you check if it works normally in all models? *ignore this
when it dosen't uses models*
- [v] Did you check if it works normally in all of web, local and node
hosted versions? if it dosen't, did you blocked it in those versions?
- [v] Did you added a type def?

# Description
This pull request adds `{{role}}` support to the recently introduced
Custom HTML feature. Although documentation indicated that CBS was
supported in Custom HTML, the `{{role}}` CBS was returning `null`
instead of rendering the intended values.

## Changes
By passing `getCbsCondition()` as the second argument to
`risuChatParser`, `{{role}}` now renders as expected in Custom HTML,
allowing users to apply conditional logic based on roles.

If there is an alternative way to enable `{{role}}` support in Custom
HTML without this modification, feel free to close this PR. Thanks for
checking it out!
2024-11-09 15:35:15 +09:00
heshiqi
3bbb2ace7d Fix AWS Support
AWS Claude model calling no longer support direct calling, but support Cross-region inference instead. All Cross-region inference model profile IDs equal to original model name with "us." in the beginning.
Reference: https://us-east-1.console.aws.amazon.com/bedrock/home?region=us-east-1#/inference-profiles
2024-11-08 14:18:37 +08:00
poroyo
e0a015c476 Add role-cbs support to custom HTML 2024-11-07 03:19:32 +09:00
kwaroran
39a462ded4 Bump version to 138.1.2 2024-11-05 23:16:01 +09:00
kwaroran
a0c2c65a31 Fix background css breaking 2024-11-05 23:15:45 +09:00
kwaroran
67f6d99640 Bump version to 138.1.1 2024-11-05 20:15:35 +09:00
kwaroran
4f69bb8880 Add loggen related stuff and fix bugs 2024-11-05 20:15:17 +09:00
kwaroran
d02d17f177 Fix textarea reloading 2024-11-04 19:01:37 +09:00