137 Commits

Author SHA1 Message Date
Cohee
b8a9a55246 Fix group candidates fuzzy filter 2024-12-06 23:04:18 +02:00
Cohee
41a3035a2a Use filter order in group candidates list 2024-12-04 15:22:53 +00:00
Cohee
79700fd983 Add Kobold Lite chats import 2024-12-04 00:44:50 +02:00
Cohee
99220d6a88 Groups: add 'manual' reply strategy 2024-11-19 20:48:43 +02:00
Cohee
e6d8f0a33e unvendor: Replace Fuse 2024-10-16 22:15:38 +03:00
Cohee
912525fdd9 Add missing import 2024-10-06 19:13:01 +03:00
Yokayo
7f9023d3c2 Work on tl 2024-10-01 21:25:20 +07:00
Cohee
2f5e40691c Implement more smart textarea autosizes 2024-09-05 20:55:06 +03:00
Cohee
5c7b95cc15 Move CSS check up 2024-09-05 20:13:59 +03:00
Cohee
ac0c33eb76 Use CSS.supports to determine auto-fit validity 2024-09-05 20:00:45 +03:00
Cohee
8fe111cc71
Merge pull request #2469 from Esalarc/group_chat_queue_display
Adding display of queued speakers in group chat windows.
2024-07-04 20:34:41 +03:00
Cohee
8eda343aee Remove old field reference 2024-07-04 20:27:41 +03:00
Cohee
4c66588312 Reset queue order when opening another group chat 2024-07-04 20:23:27 +03:00
Cohee
9f485d3956 Fix code formatting 2024-07-04 20:16:13 +03:00
Cohee
3918192dee Prefer const variables 2024-07-04 20:06:44 +03:00
David Fedolfi
e097e42ff8 Tweaking activateNaturalOrder
Changes to activateNaturalOrder to try to keep silent characters silent.
2024-07-04 10:25:48 -04:00
David Fedolfi
2fccd83083 Group Chat Queue Display
- removing queue position from character object - storing in map in group_chat.js instead
- moving queue position to div
- moving '#' from js to css ::before
- adding option to settings
- cleaning up guards
2024-07-04 09:52:56 -04:00
David Fedolfi
f85b843b3e - Adding display of queued speakers in group chat windows. 2024-07-03 17:00:10 -04:00
Cohee
b6de77935b Fix quotes style 2024-07-02 07:29:14 +00:00
Wolfsblvt
52b64a823d validate group that all members exist 2024-07-02 02:00:39 +02:00
Cohee
b3f657bed5 Open group UI immediately on click 2024-07-01 00:59:51 +03:00
Wolfsblvt
54e111886b Improve logs (+add toasts) on save calls
- Fixes #2429
2024-06-28 03:28:16 +02:00
Wolfsblvt
4e7232f13e Move group chat popups to new popup 2024-06-26 05:56:15 +02:00
Cohee
45ae8d1060 Update group custom avatar to new cropper 2024-06-25 02:10:11 +03:00
Cohee
2012bb49d2 Make /member command indices 0-based to match autocomplete 2024-06-23 16:47:07 +03:00
Wolfsblvt
3ab5cc1766 Merge branch 'staging' into slash-command-enums 2024-06-21 20:07:19 +02:00
Cohee
56710fee39 Apply fix for group chats 2024-06-21 13:09:41 +00:00
Wolfsblvt
ffc84f5118 Merge branch 'staging' into slash-command-enums 2024-06-20 20:38:55 +02:00
Wolfsblvt
461b1a9d87 Even more enum refactorings (not done yet)
- Add common enum icons
- enum def for existing enum types, with color description
2024-06-20 20:33:45 +02:00
Wolfsblvt
d98d811cc1 Merge branch 'staging' into smol-tag-improvements 2024-06-08 21:13:11 +02:00
Wolfsblvt
cebaf2ee08 Fix /member-disable wrongfully stacking
Fixes #2347
2024-06-04 22:13:19 +02:00
Wolfsblvt
3a5dfadac5 Fix group tag list not updating 2024-05-23 02:45:23 +02:00
Cohee
b1c9fee29e #2188 Make first message not required 2024-05-21 15:46:41 +03:00
Cohee
7fbed26c26 #2245 Fix custom group avatar display 2024-05-16 00:49:26 +03:00
Len
1d75b98393
STscript Parser Rewrite (#1965)
* set isForced to true on input

* make floating auto-complete follow horizontal scrolling

* add callable closure vars

* changes to /let and /var for callable closures

* fix error message

* fix scope for closure arguments

* if should return the pipe result from closures

* use /run to call closures and no arguments on immediate closures

* throw exception from QRs window-function if no match

* when to show autocomplete vs info only

* autocomplete positioning

* autocomplete styling

* add theming to autocomplete (theme, dark, light)

* improve autocomplete show/hide logic and editor selection

* use blur tint color instead of chat tint color and use blur setting

* cleanup and docs

* use scope macros for QR args

* add enter to select autocomplete

* fix no executor found

* cleanup and comment

* fix alias list in help string

* fallback to empty string piped value if null or undefined

* fix typo

* blur textarea on ctrl+enter execute (and refocus after)

* stop executeSlashCommand if parser throws

* move /let and /var callbacks into functions

* switch textarea to monospace when value starts with slash

* add double pipe a pipe breaker

* fix /? slash

* remove some logging

* add "/:name" as shorthand for "/run name" after all

* move shit around

* fix error message

* use testRunShorthandEnd

* use parseQuotedValue and parseValue to determine name for "/:"

QR labels and set names can include spaces

* add some adjustments to make autocomplete work properly

some hint in there about "/:" would still be nice

* add autocomplete style  selector

* only strip quotes from subcommand if they are at both ends

* fix JSDoc

* escaping

* allow open quotes on dry run

* throwing shit at the wall for /: autocomplete

* escapes only for symbols

* clean up autocomplete

* improve performance

* fix scope macros

* remove unescaping of pipes

* fix macros in scope copy

* fix "/? slash"

* don't run parser for getNameAt if text has not changed

* fix options filter

* re-enable blur listener

* restore selection on non-replace select

* fix for escaping first character of value

* add support for {{pipe}} and {{var::}} closures

* add index support to var macro

* add scoped var macro to macro help

* more escape fixes

* reduce autocomplete render debounce

* cleanup

* restore old escape handling and parser flag for strict escaping

* fix "no match" autocomplete message

* add dummy commands for comments and parser flag

* fix type annotations

* somewhat safer macro replacements

* fix autocomplete select on blank / "no match"

* fix cutting off handled part in substitution

* add parser flag REPLACE_GETVAR

Replaces all {{getvar::}} and {{getglobalvar::}} macros with {{var::}}.
Inserts a series of command executors before the command with the macros that:
- save {{pipe}} to a var
- call /getvar or /getglobalvar to get the variable used in the macro
- call /let to save the retrieved variable
- return the saved {{pipe}} value

This helps to avoid double-substitutions when the var values contain text that could be interpreted as macros.

* remove old parser

* fix send on enter when no match

* deal with pipes in quoted values (loose escaping)

* add default parser flags to user settings

* allow quoted values in unnamed argument

* set parser flag without explicit state to "on"

* add click hint on parser error toast

* dirty more detailed cmd defs

* remove name from unnamed arg

* move autocomplete into class and floating with details

* replace jQuery's trigger('input') on #send_textarea with native events because jQuery does not dispatch the native event

* fix ctrl+space

* fix arrow navigation

* add comments

* fix pointer block

* add static fromProps

* fix up dummy commands

* migrate all commands to addCommandObject

* remove commented comment command

* fix alias in details

* add range as argument type

* switch to addCommandObject

* switch to addCommandObject

* fix height

* fix floating details position on left

* re-enable blur event

* use auto width for full details on floating autocomplete

* auto-size floating full details

* fix typo

* re-enable blur listener

* don't prevent enter when selected item is fully typed out

* add autocomplete details tooltips

* add language to slash command examples

* move makeItem into option and command and fix click select

* use autocomplete parts in /? slash

* fix alias formatting

* add language to slash command examples

* fix details position on initial input history

* small screen styles

* replace registerSlashCommand with detailed declarations

* put name on first line

* add missing returns

* fix missing comma

* fix alias display in autocomplete list

* remove args from help string

* move parser settings to its own section

* jsdoc

* hljs stscript lang

* add hljs to autocomplete help examples

* add missing import

* apply autocomplete colors to stscript codeblocks (hljs)

* add fromProps

* cache autocomplete elements

* towards generic autocomplete

* remove unused imports

* fix blanks

* add return types

* re-enable blur

* fix blank check

* Caption messages by id

* add aborting command execution

* fix return type

* fix chat input font reset

* add slash command progress indicator

* add missing return

* mark registerSlashCommand deprecated

* why??

* separate abort logic for commands

* remove parsing of quoted values from unnamed arg

* add adjustable autocomplete width

* revert stop button pulse

* add progress and pause/abort to QR editor

* add resize event on autocomplete width change

* add key= argument to all get vars

* refactoring

* introduce NamedArgumentAsignment

* add TODOs

* refactoring

* record start and end of named arg assignment

* refactoring

* prevent duplicate calls to show

* refactoring

* remove macro ac

* add secondary autocomplete and enum descriptions

* add syntax highlighting to QR editor

* add enum descriptions to /while

* add /let key=... to scope variable names

* add unnamed argument assignment class and unnamed argument splitting

* fix QR editor style

* remove dash before autocomplete help text

* add autocomplete for unnamed enums

* fix remaining dom after holding backslash

* fix for unnamed enums

* fix autocomplete for /parser-flag

* add parser-flag enum help

* fix type annotations

* fix autocomplete result for /:

* add colored autocomplete type icons

* collapse second line autocomplete help if empty

* mark optional named args in autocomplete

* fix when what

* remove duplicate debug buttons

* dispatch input on autocomplete select

* prevent grow from editor syntax layer

* add auto-adjust qr editor caret color

* remove text-shadow from autocomplete

* join value strings in /let and /var

* add /abort syntax highlight

* fix attempting secondary result when there is none

* rename settings headers and split autocomplete / stscript

* add parser flag tooltips

* add tooltips to chat width stops

* fix typo

* return clone of help item

* fix enum string

* don't make optional notice for autocomplete arguments smaller

* avoid scrollbar in chat input

* add rudimentary macro autocomplete

* strip macro from helptext

* finally remove closure delimiters around root

* cleanup

* fix index stuff for removed closure delimiters

* fix type hint

* add child commands to progress indicator

* include sub-separator in macro autocomplete

* remove all mentions of interruptsGeneration and purge

* remove unused imports

* fix syntax highlight with newline at end of input

* cleanup select pointer events

* coalesce onProgress call

* add regex to STscript syntax highlighting

* fix closure end

* fix autocomplete type icon alignment

* adjustments for small screens

* fix removing wrong element

* add missing "at=" arg to /sys, /comment, /sendas

* add font scale setting for autocomplete

* add target=_blank for parser flag links

* fix for searching enums

* remove REGEXP_MODE from hljs
just causes trouble

* fix autocomplete in closures

* fix typo

* fix type hint

* Get rid of scroll bar on load

* Add type hint for /send name argument. Fix 'at' types

* Add 'negative' arg hint to /sd command

* reenable blur event

* Allow /summarize to process any text

* Compact layout of script toggles

* Expand CSS by default

* fix double ranger indicator and adjust to narrow container

* make custom css input fill available vertical space

* reduce scroll lag

* use default cursor on scrollbar

* Clean-up module loading in index.html

* fix tab indent with hljs

---------

Co-authored-by: Cohee <18619528+Cohee1207@users.noreply.github.com>
2024-05-12 22:15:05 +03:00
Cohee
ef5499c8dc Remove disable attribute from send_textarea. It never worked. 2024-05-05 14:27:20 +03:00
Cohee
6ac6c7cfda #2159 Move debounce constants to a separate module 2024-04-28 19:47:53 +03:00
Wolfsblvt
d7ade487b8 Refactor common enum for debounce timeouts 2024-04-28 06:21:47 +02:00
Cohee
e832af9854 Insert group chat history with splice 2024-04-21 21:12:41 +03:00
Cohee
0594859fb9 #2046 Fix for undefined fields 2024-04-09 10:11:05 +03:00
Cohee
6e250eafcd Fix shrunken group wrapper controls 2024-04-08 15:18:08 +03:00
Wolfsblvt
40b3640fa2 Fix group join prefix/suffix controls state on render 2024-04-08 00:34:21 +02:00
Wolfsblvt
f4fcbff17e Fix spacing on field join for empty suffix/prefix 2024-04-07 21:23:45 +02:00
Wolfsblvt
4a4296127c Group chat-specific join prefix/suffix for char fields
- Add group chat setting fields for "prefix" and "suffix"
- Settings will be visible when any "join" setting is selected
- each part will be surrounded, which optional macro replacements on the prefix/suffix
2024-04-07 21:12:41 +02:00
Wolfsblvt
9c3f9f0ee1 Fix empty lines on group squashing of char fields 2024-04-07 03:57:58 +02:00
Cohee
0804843805 Add per-character and per-group overrides for external media 2024-04-05 00:39:54 +03:00
Cohee
8a0997c47b Allow auto-continue in group chats 2024-04-03 00:27:11 +03:00
Cohee
153f75cf1a Add role selection to Character's Note depth prompt 2024-03-30 23:12:01 +02:00
Cohee
5264e2b194 Emit events when a new group chat is created 2024-03-27 20:44:04 +02:00
Cohee
88075bde79 Update hotswap avatars when changing group members list 2024-03-16 23:05:16 +02:00