Commit Graph

2938 Commits

Author SHA1 Message Date
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
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
kwaroran
b714e01aba Implement cache size limit for script caching 2024-11-04 18:55:50 +09:00
kwaroran
df614954b8 Fix background 2024-11-04 18:50:50 +09:00
kwaroran
52e93b9b20 Bump version to 138.1.0 across configuration files 2024-11-04 16:29:52 +09:00
kwaroran
9b3232d5dc Add lorebook debug 2024-11-04 16:27:00 +09:00
kwaroran
106ddd61d7 fix typo disableHighlight 2024-11-04 15:30:52 +09:00
kwaroran
911ff7fd8b Add compression-streams-polyfill and integrate CompressionStream support 2024-11-04 15:26:17 +09:00
kwaroran
40b890cd42 Bump version to 138.0.3 2024-11-03 23:28:04 +09:00
kwaroran
76dfa5dcdf Refactor moduleUpdate function to move lastModuleIds check to the end 2024-11-03 23:27:19 +09:00
kwaroran
bb37ee4af0 Remove debug logging from moduleUpdate function 2024-11-03 23:26:49 +09:00
kwaroran
c22f6b789a Improve performance 2024-11-03 23:16:51 +09:00
kwaroran
b51bbad838 Fix background embedding 2024-11-03 22:26:20 +09:00
kwaroran
4f41461f86 Remove cache only save 2024-11-03 22:06:07 +09:00
kwaroran
0fc41e2e44 update version to 138.0.2 2024-11-02 23:56:34 +09:00
kwaroran
03e2390006 Temp fix textarea 2024-11-02 23:55:48 +09:00
kwaroran
5b975948b7 bump version to 138.0.1 2024-11-02 23:18:46 +09:00
kwaroran
ab9180c7a9 fix textareainput 2024-11-02 23:18:21 +09:00
kwaroran
24c1a8fd9b fix moduleupdate 2024-11-02 23:14:07 +09:00
kwaroran
e631b8fb51 Revert textareainput 2024-11-02 22:56:13 +09:00
kwaroran
b4d08b1f7d fix save lag 2024-11-02 22:52:54 +09:00
kwaroran
db54124e7a Fix autotranslate 2024-11-02 17:41:22 +09:00
kwaroran
28f41b499d Fix binded persona 2024-11-02 17:12:48 +09:00
kwaroran
5dcb934069 Fix welcome page freezing 2024-11-02 16:48:17 +09:00