Commit Graph

3040 Commits

Author SHA1 Message Date
Cohee 44ac2ca4e6 Avoid returning 401 as API response code 2023-12-09 15:11:35 +02:00
valadaptive 3cfc32c16d Refactor error handling
Remove the StreamingProcessor.hook method and use a try-catch block to
await the generator promise and set the generator, handling errors with
onError if it fails.
2023-12-08 18:40:17 -05:00
valadaptive d735b12399 Refactor event stream parsing
I was really overcomplicating this before; this is simpler and faster.
Passes my existing test suite.
2023-12-08 15:05:57 -05:00
valadaptive 699c369443 Remove ignoreBOM
Apparently the ignoreBOM option actually means "include the BOM". I've
added a test for this in my own repository, and will also be submitting
a pull request to MDN to clarify this in their documentation.
2023-12-07 23:15:55 -05:00
Cohee b0e7b73a32 Fix streaming processor error handler hooks 2023-12-08 02:01:08 +02:00
valadaptive 055d6c4337 Properly forward status codes from streams 2023-12-07 18:06:17 -05:00
valadaptive 5569a63595 Remove legacy_streaming setting
This was a workaround for older versions of Slaude that implemented SSE
improperly. This was fixed in Slaude 7 months ago, so the workaround can
be removed.
2023-12-07 18:00:36 -05:00
valadaptive cdcd913805 Don't stream events if the API returned a 4xx code 2023-12-07 18:00:36 -05:00
valadaptive 5540c165cf Refactor server-sent events parsing
Create one server-sent events stream class which implements the entire
spec (different line endings, chunking, etc) and use it in all the
streaming generators.
2023-12-07 18:00:36 -05:00
Cohee 6f610204d6
Merge pull request #1488 from LenAnderson/add-index-argument-to-setvar-/-setglobalvar
Add index argument to setvar / setglobalvar
2023-12-08 00:40:14 +02:00
Cohee 2607e787ff Put comment command on hold 2023-12-08 00:38:13 +02:00
Cohee e2f886d796 Revert pipe caching 2023-12-08 00:33:27 +02:00
Cohee 32ac8d3b2c
Merge pull request #1492 from valadaptive/backgrounds-endpoint
Move backgrounds endpoints into their own module
2023-12-07 23:27:18 +02:00
Cohee 7f7ad6f523 Merge branch 'staging' into backgrounds-endpoint 2023-12-07 23:16:33 +02:00
Cohee 404b1562e5
Merge pull request #1491 from valadaptive/stats-endpoint
Move stats endpoints into their own module
2023-12-07 23:11:12 +02:00
valadaptive c0a7472fe9 Move background file instead of copying+deleting 2023-12-07 15:28:04 -05:00
valadaptive e7dce9b107 Remove response_dw_bg 2023-12-07 15:24:05 -05:00
valadaptive 32c86c1e95 Move backgrounds endpoints into separate file 2023-12-07 15:24:05 -05:00
valadaptive 2367f4f38f Rename backgrounds API endpoints 2023-12-07 15:17:19 -05:00
LenAnderson 65f2cc1952 add a comment slash commend /#
for commenting longer ST scripts
2023-12-07 18:29:28 +00:00
LenAnderson d52b5fb947 pass prev pipeResult through if result undefined 2023-12-07 18:28:58 +00:00
LenAnderson 5a719d635a use isArray instead of instanceof 2023-12-07 18:27:11 +00:00
LenAnderson 7bfed3fca1 /addvar on array to push 2023-12-07 18:12:05 +00:00
Cohee c84b6a5101 Add WI inclusion groups 2023-12-07 20:06:06 +02:00
valadaptive eb1d4aed4d Move stats helpers into stats endpoint 2023-12-07 13:04:54 -05:00
valadaptive afe0dfe913 Move stats endpoints into separate file 2023-12-07 13:00:34 -05:00
valadaptive 26ebb417f4 Rename stats API endpoints 2023-12-07 13:00:34 -05:00
valadaptive d6f5e63d85 Move (re)creation of stats to its own function 2023-12-07 13:00:34 -05:00
Cohee e804f27368 Convert value to string for echo. Fix return value 2023-12-07 19:37:55 +02:00
LenAnderson 2ee57afe2a add helpString for index in setvar 2023-12-07 16:51:45 +00:00
LenAnderson db6f782e0f add index to /setvar and /setglobalvar 2023-12-07 16:48:24 +00:00
Cohee b1f68d886c Fix WI field access for UID = 0 2023-12-07 18:45:34 +02:00
Cohee 72adb4c8aa Fix window.ai streaming 2023-12-07 17:42:06 +02:00
Cohee 990f958f4f #1484 Consolidate chat name template 2023-12-07 16:59:53 +02:00
Cohee 2417ae9d87 #1484 Display version on close chat 2023-12-07 16:57:47 +02:00
Cohee bb1c278899
Merge pull request #1487 from LenAnderson/st-object-vars
Better handling of array / object variables
2023-12-07 16:48:09 +02:00
Cohee 785be22e51 Merge branch 'staging' into st-object-vars 2023-12-07 16:46:02 +02:00
Cohee e9a49b7997
Merge pull request #1485 from LenAnderson/qr-expand-editor
Add expand button to QR textareas
2023-12-07 15:31:01 +02:00
Cohee b506a17260 Fix expand after drag 2023-12-07 15:29:40 +02:00
LenAnderson afd32d1f4d better handling of array / object vars 2023-12-07 12:56:28 +00:00
LenAnderson 0290916035 stop expanding textarea 2023-12-07 12:29:00 +00:00
Cohee 0da8973836
Merge pull request #1486 from LenAnderson/qr-custom-title
Add custom titles (tooltips) to QR buttons
2023-12-07 14:23:38 +02:00
LenAnderson a1bfca78b3 add custom titles (tooltips) to QR buttons 2023-12-07 12:20:02 +00:00
LenAnderson d62ef8badc add expand button for QR textareas 2023-12-07 12:04:39 +00:00
Cohee 3b364916df
Merge pull request #1481 from SrJuggernaut/feat/slash-commands-missing-args
add missing args to some slash commands
2023-12-07 13:55:03 +02:00
Cohee 75abc6101a /input input => /input default 2023-12-07 13:44:49 +02:00
Cohee 0e6802c9d9 Too much lint 2023-12-07 13:35:48 +02:00
Cohee 25db4b6fde Merge branch 'staging' into feat/slash-commands-missing-args 2023-12-07 13:19:15 +02:00
Cohee 969c1ffefb
Merge pull request #1480 from valadaptive/worldinfo-endpoint
Move worldinfo endpoints into their own module
2023-12-07 13:17:57 +02:00
Cohee 8082144c5a Merge branch 'staging' into worldinfo-endpoint 2023-12-07 12:58:57 +02:00