kwaroran
598ffe302b
fix: Prevent error with loadLoreBooks() in short context length ( #857 )
...
# 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 a user uses short max context length and `reserve` is bigger than
the length, `loadLoreBooksMain` returns a `nil` but `loadLoreBooks`
tries to decode it as a JSON.
It will return a stringified empty array instead of a nil.
2025-05-24 20:23:15 +09:00
kwaroran
431a745cd3
feat: Allow more data to be readable from Lua in editDisplay step ( #854 )
...
# 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 ~~two~~ one function: ~~`getDescription()` for character
description, and~~ (See #852 )`getAuthorsNote()` for author's note.
It also removes `LuaSafeIds.has(id)` from most reader functions without
any side effects. Since `getFullChatMain()` has no such check already
and everything else should be lighter than `getFullChatMain()`, I think
it'll be fine.
2025-05-24 20:18:19 +09:00
enzi221
5e10607cb6
fix: Protect loadLoreBooks() from very short max context length
2025-05-21 13:58:43 +09:00
enzi221
8fdd8d3beb
feat: Allow more data to be readable from Lua
2025-05-21 13:58:16 +09:00
Joseph Kang
5e330424f4
Add getDescription function (was missing)
...
The `getDescription(triggerId)` function, documented at:
https://kwaroran.github.io/docs/srp/lua/#getdescriptiontriggerid
was missing from the codebase and has now been added.
2025-05-18 17:16:22 +09:00
kwaroran
e5fededc69
Merge branch 'main' into lualore
2025-05-17 01:09:37 +09:00
enzi221
a758b574f5
fix: Pluralize name
2025-05-16 03:37:54 +09:00
enzi221
40e91e59a7
feat: Return all lore books of same name without sort
2025-05-16 03:36:50 +09:00
enzi221
e44ac16b00
feat: Open persona name/desc access from Lua
2025-05-14 20:36:36 +09:00
enzi221
1b8a0762b1
fix: Return stringified false instead of literal false
2025-05-13 23:12:57 +09:00
enzi221
5a70dd1566
refactor: Get current character from db.characters like other functions
2025-05-13 16:16:27 +09:00
enzi221
953fc383f5
feat: Open read-only access to lorebooks from Lua
2025-05-13 14:58:16 +09:00
bangonicdd
0bd947fcde
feat: alertSelect for triggerlua
2025-05-07 22:47:35 +09:00
kwaroran
6db9bd08f1
Add more restrictions
2025-04-28 16:45:06 +09:00
kwaroran
f2839e66bb
fix: update request limit to 5 and use fetchNative for API calls
2025-04-28 16:41:30 +09:00
kwaroran
165e6741bd
feat: add request api with rate limiting and URL validation in Lua engine
2025-04-28 16:40:28 +09:00
bangonicdd
2d50935079
fix: makes more concise by removing one-used var
2025-04-09 18:09:02 +09:00
bangonicdd
dc753adf1f
fix: Lua factory init failure under concurrent display editing
2025-04-09 01:45:06 +09:00
Inha Hwang
31a480643b
feat: luascript getGlobal(Chat)Var support
...
setGlobal(Chat)Var needs to be studied too.
2025-04-08 06:01:12 +09:00
kwaroran
9e00c9b17a
Add gettokens API
2025-03-27 19:21:31 +09:00
bangonicdd
6446d4aa07
fix: Chat trigger on start
2025-03-14 15:58:22 +09:00
bangonicdd
71ee015f21
fix: lua chat functions
2025-03-09 19:58:08 +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
Bo26fhmC5M
fb941148e0
feat: add trigger effect RunAxLLM
2025-02-08 17:15:45 +09:00
bangonicdd
ad6f7e0be4
feat: charjs style button trigger
2025-02-04 09:04:55 +09:00
Kwaroran
5174082796
Add Gemini related features
2024-12-12 08:38:33 +09:00
kwaroran
e0f6c58540
Refactor HypaProcesser instantiation to remove hardcoded model name and add models and others
2024-12-07 00:58:09 +09:00
kwaroran
da907f4fc2
Move DBState to stores
2024-10-26 21:17:46 +09:00
kwaroran
e255199fcc
Change setDatabase and getDatabase to accessing dbState
2024-10-25 19:11:41 +09:00
kwaroran
b3fddb814e
Migrate all DataBase to DBState
2024-10-24 01:59:57 +09:00
kwaroran
2044d9b63b
Change DataBase inside svelte to DBState for performance
2024-10-23 23:46:32 +09:00
kwaroran
c7330719ad
Migrate to svelte 5
2024-10-23 02:31:37 +09:00
bangonicdd
906c8a9c22
fix: chat sync issue in lua engine
2024-10-09 21:57:55 +09:00
kwaroran
85609e890e
Change first message to chat dependent
2024-09-18 23:25:02 +09:00
kwaroran
c765cfabad
add hash function to lua
2024-08-27 16:57:38 +09:00
kwaroran
5b110ae632
rename changeGUI to updateDisplay and add id check
2024-07-29 01:15:25 +09:00
kwaroran
616a66db28
feat: add updateGUI
2024-07-29 01:10:09 +09:00
Sunho Kim
5b4a4f0e30
fix: add missing breaks
2024-07-15 21:12:14 -07:00
Sunho Kim
cb9514c508
fix: prevent lua engine getting killed and pool engines
2024-07-15 21:11:21 -07:00
Sunho Kim
7a542c14d6
Fix bug in lua low level access
2024-07-15 07:33:16 -07:00
Sunho Kim
73b46edd0c
Fix lua low level relatd bugs
2024-07-15 03:49:39 -07:00
kwaroran
dbdbeca49e
refactor: Remove console.log statements and error alerts in lua.ts
2024-07-01 08:16:03 +09:00
kwaroran
8c0420ba3d
fix: add nullish check
2024-07-01 08:11:20 +09:00
kwaroran
988665bc20
ref: change json lua
2024-07-01 06:41:28 +09:00
kwaroran
fa918b5436
feat: add old js related lua code
2024-07-01 06:25:22 +09:00
kwaroran
aba80667c8
fix: add editdisplay limit
2024-06-30 23:11:37 +09:00
kwaroran
5ea1f87f53
feat: add lua edits
2024-06-30 23:09:28 +09:00
kwaroran
a84f13e7ba
ref: lua
2024-06-30 22:28:20 +09:00
kwaroran
95452921fe
feat: add lua triggers
2024-06-29 05:19:39 +09:00