Commit Graph

127 Commits

Author SHA1 Message Date
Cohee
96862be6b0 Fix tools-list 2024-10-06 13:01:14 +03:00
Wolfsblvt
56265540db sanitize HTML on html returns
- I had it in there for some time, I even tested it... likely gone during some commits
2024-10-01 01:23:34 +02:00
Cohee
d96bb3dcea Merge branch 'send-commands-return-value' of https://github.com/SillyTavern/SillyTavern into send-commands-return-value 2024-10-01 01:55:24 +03:00
Wolfsblvt
398ae6ba2e Update doReturn() API with objectToHtmlFunc
- Allow future commands to provide a different "object to HTML" converter func than "object to text", if need be
2024-10-01 00:53:19 +02:00
Cohee
d82dc4952b Merge branch 'staging' into send-commands-return-value 2024-10-01 01:52:33 +03:00
Wolfsblvt
7a1b43eb89 Refactor /classify-expressions, deprecating...
- Update /classify-expressions, deprecating the old "format"
- Fix some oversights
2024-10-01 00:37:21 +02:00
Wolfsblvt
697b3b2034 Refactor /listvar, deprecate its "format" arg
- Update /listvar
- Fix toasts not doing correct HMTL here
2024-10-01 00:23:00 +02:00
Wolfsblvt
62fd450c59 Refactor /listinjects, deprecate its "format" arg 2024-10-01 00:06:18 +02:00
Wolfsblvt
d8379edee7 Update return types as optional via named arg
- Update the modified slash commands for chat sending to use the named arg
- Add `slashCommandReturnHelper` for shared funcitonality on return type usage
2024-09-30 23:32:24 +02:00
Cohee
bed7df0038 Merge branch 'staging' into fix-math-commands 2024-09-30 23:26:04 +03:00
Cohee
bc05c8de15
Merge pull request #2923 from SillyTavern/fix-piping-split-unnamed-args
Fix piping not actually using/inputting an array for empty unnamed args
2024-09-30 23:25:20 +03:00
Wolfsblvt
4855f25419 Update /mul, /max and /min definition
- Update command definition for /mul, /max and /min to fit the actual code behind, split them too
- Add numbersAndVariables enum provider, to centralize
2024-09-30 20:45:39 +02:00
Wolfsblvt
140aeb2bb7 Fix piping not using array for empty unnamed args
- Lenny said if `splitUnnamedArgument` is enabled, the callback should always receive an array.
- It is intended that if no value was provided, it'll get an array with an empty string. Because.. if no argument was provided for a non-split arg, it'll receive an empty string too.
2024-09-30 20:22:44 +02:00
Wolfsblvt
0be48c567a /char-find command to get a specific unique char
- findChar utility function that does the heavy lifting of finding a specific char based on conditions
- Log/warn if multiple characters match
- Validation function for named args that should be arrays
2024-09-29 00:36:13 +02:00
Wolfsblvt
20a82fb242 Merge branch 'st-parser-accept-multiple-named' into char-find-and-sendas-extended 2024-09-28 22:40:22 +02:00
Wolfsblvt
22d8a654d9 Allow searching on /sendas via tag= 2024-09-28 22:22:44 +02:00
Wolfsblvt
d231b7f5f4 "acceptsMultiple" should always return array 2024-09-28 22:14:33 +02:00
Wolfsblvt
2444e9be43 STscript allow named arguments to be an array
- Use named args definition and "acceptsMultiple" to build arrays of values, if provided
- Add a debug warning if non-multiple named args are provided multiple times
2024-09-28 21:59:29 +02:00
Wolfsblvt
f6b240b294 Add Assistant to char enum provider 2024-09-10 22:15:56 +02:00
Wolfsblvt
fbcd546db2 Fix lint issues in enum providers 2024-09-10 22:08:36 +02:00
Cohee
bcac8c065b Add command for switching profiles 2024-09-07 13:58:46 +03:00
Cohee
6f85327078 Only convert variable if needed 2024-09-01 22:59:50 +03:00
Cohee
3746f08590 Add type conversion for /setvar commands with index 2024-08-29 12:55:54 +00:00
LenAnderson
98a1b99b14 anchor wildcard lookup 2024-07-28 08:33:33 -04:00
LenAnderson
ba840248eb order wildcard macros by index of wildcard for substitute 2024-07-27 15:31:23 -04:00
LenAnderson
cf42c4044e add missing start/end named arg index to /: 2024-07-27 12:50:30 -04:00
LenAnderson
50cba9622c check that debugController exists 2024-07-24 21:00:58 -04:00
LenAnderson
ed54ee1808 comments and cleanup 2024-07-24 17:50:57 -04:00
LenAnderson
971f2cacb9 fix DebugController retaining previous named and unnamed args 2024-07-24 17:22:00 -04:00
LenAnderson
590e1e39d8 hljs refinements 2024-07-23 20:49:29 -04:00
LenAnderson
4556684e76 there might not be a first or last value in the unnamed arg list 2024-07-20 16:41:01 -04:00
LenAnderson
bff5977f02 don't need regex symbol here 2024-07-20 12:01:00 -04:00
LenAnderson
7ab09c6432 fix unclosed block comment infinite loop 2024-07-20 12:00:50 -04:00
LenAnderson
4336253b2f fix whitespace variable to "0" 2024-07-20 11:59:52 -04:00
LenAnderson
0c04f06c59 Merge branch 'staging' into parser-followup-2 2024-07-18 18:08:10 -04:00
LenAnderson
a21deb4ed0 remove some red 2024-07-18 18:06:17 -04:00
LenAnderson
9226b14c88 substitute /break argument 2024-07-18 18:06:08 -04:00
LenAnderson
8b64dbc3ee we have _scope to get the pipe 2024-07-18 18:03:50 -04:00
Cohee
ff68956371 Add events to SlashCommandAbortController 2024-07-18 22:47:57 +03:00
LenAnderson
df19c98e9f add syntax highlight for pipes and pipe breaks 2024-07-16 16:27:51 -04:00
LenAnderson
4b5704896d more flexibililty for enums
custom mapping from enum value class to enum option class
2024-07-16 09:26:37 -04:00
LenAnderson
db1094e391 add block comments with shortcut and breakpoint shortcut 2024-07-14 18:58:13 -04:00
LenAnderson
b74600605c add syntax highlight for /import 2024-07-12 14:09:05 -04:00
LenAnderson
685e31b214 jsdoc 2024-07-12 13:54:41 -04:00
LenAnderson
3327be5468 Merge branch 'staging' into parser-followup-2 2024-07-12 08:33:28 -04:00
Wolfsblvt
240f3f2c49 fix linting issues in enum providers 2024-07-11 22:49:32 +02:00
Wolfsblvt
8cbb80f44f Change 'world' enum provider query field, not UI 2024-07-11 22:43:56 +02:00
LenAnderson
36265579a2 add makeSelectable 2024-07-10 22:39:04 -04:00
LenAnderson
182da4c466 fix startUnnamedArgs 2024-07-10 22:38:50 -04:00
LenAnderson
ec140f4a97 add makeSelectable 2024-07-10 22:38:37 -04:00