Commit Graph

162 Commits

Author SHA1 Message Date
Wolfsblvt 298baed59f Open popups should block all default hotkeys
- Fixes #2570
2024-08-18 03:16:29 +02:00
Cohee 8df27254fd
Merge pull request #2640 from edk208/release
Adding Block Entropy API endpoints for chat, image, and video generation
2024-08-11 16:19:14 +03:00
Edward Kim b9857eb315 Added block entropy endpoints for chat and image 2024-08-08 00:08:03 -04:00
NearEDGE ea76ec89de Removed quick regenerate button
Response to change request.
2024-08-03 16:56:43 -04:00
NearEDGE 4f76e9e10f Added quick Regenerate and Impersonate buttons
Additional buttons mimic the behavior of the continue button.
2024-08-02 08:17:29 -04:00
Wolfsblvt d30fc5d165 Fix lint issues 2024-07-25 00:23:02 +02:00
Succubyss b40012973e humanizedDateTime zero-pads month & day 2024-07-24 16:58:06 -05:00
Succubyss 5d7c204678 sendTextArea: the same but prettier
and also no jQuery
2024-07-12 14:17:13 -05:00
Cohee 63ddb81ef7 Don't autofit immediately if a scrollbar is visible at max height 2024-07-12 21:01:15 +03:00
Cohee 3acd60fcab Switch back to regular debounce 2024-07-12 16:03:43 +00:00
Cohee 684ce999f3 Remove getComputedStyle calls 2024-07-12 16:01:20 +00:00
Cohee c4aed23cf7 Don't overextend input textarea height on autofit 2024-07-11 21:18:26 +03:00
Cohee 542a13a01b More Safari weirdness cope 2024-07-03 22:28:42 +03:00
Cohee a3031d7986 Reinforce iOS check 2024-07-02 13:47:02 +00:00
Cohee e98f38b6da Final(?) iOS cope 2024-06-28 21:27:48 +03:00
Cohee b62cbdeebd Merge branch 'staging' into DarokCx/release 2024-06-28 19:09:12 +03:00
DarokCx 29ff0876a7 Added additional headers 2024-06-28 08:20:15 -04:00
Cohee cf56bfb6a9 Add 01.AI as a chat completion source 2024-06-28 00:51:09 +03:00
Wolfsblvt d737c0f285 Update Regenerate popup to use input control 2024-06-27 02:40:47 +02:00
Wolfsblvt ec58d9272a Move ctrl+enter regenerate to new popup 2024-06-26 05:46:34 +02:00
Wolfsblvt a5baa3605f Fix closing popup sometimes being stuck via Escape 2024-06-20 21:43:13 +02:00
Wolfsblvt e2089b1e44 Dozens new keyboard interactables
- Made dozens of existing controls keyboard interactable
- Tweaked styling so the keyboard focus looks more pleasant
2024-06-06 02:48:06 +02:00
RossAscends 9b1a254553 scale MUI on window resize 2024-05-21 13:55:00 +09:00
RossAscends 56d0ffc1fd fix MovingUI infinite loop on resize to Y edge 2024-05-21 09:55:56 +09:00
RossAscends 67381cf493 fix zoomedAvatar resize and movement 2024-05-20 12:18:30 +09:00
Cohee aa845b4727 Cancel message deletion with Escape 2024-05-14 22:06:38 +03:00
Cohee 64500bfb37 Add rounding to textarea autofit 2024-05-13 16:48:35 +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 181b5aff97 Add Groq as chat completion source 2024-05-05 18:53:12 +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 70c4e82b89 Merge branch 'staging' into neo-server 2024-04-20 21:10:43 +03:00
Cohee 1e0b76f4fc Unblock Ctrl+1-9 keystrokes 2024-04-20 20:25:21 +03:00
Cohee b3bbec83b6 Merge branch 'staging' into neo-server 2024-04-20 02:56:05 +03:00
Cohee 2a2a63c52c Add Perplexity as Chat Completion source 2024-04-20 00:09:38 +03:00
Cohee 022c180b62 Lint and clean-up 2024-04-15 00:39:15 +03:00
Cohee 1c4bad35b2 #2085 Implement async token counting 2024-04-13 21:05:31 +03:00
Cohee 9c218455c4 [chore] Run ESLint 2024-04-12 14:22:12 +03:00
Cohee 16cabb38ad Fix init order in RA mods 2024-04-11 22:47:28 +03:00
Cohee d2ac782c3c Fix broken HTML and code style 2024-04-11 19:21:59 +03:00
Yokayo 0486fe0126
Bind strings to locale 2024-04-11 14:58:07 +07:00
Cohee 9838ba8044 #1994 Add Cohere as a Chat Completion source 2024-04-02 00:20:17 +03:00
Wolfsblvt 9005d3f790 Merge remote-tracking branch 'upstream/staging' into improve-bulk-edit-and-fixes 2024-03-29 02:42:27 +01:00
Cohee 55d855b655 Autofit immediately if input value is empty 2024-03-27 22:18:20 +02:00
Wolfsblvt 4547e68497 Fix tag display issues (char create, auto load)
- Fix tags not working on new character dialog
- Fix display of tags for auto-loaded character on enabled auto load
2024-03-27 08:33:32 +01:00
LenAnderson 3debc06372 fix for jQuery input event not triggering real input event 2024-03-26 12:32:23 -04:00
LenAnderson d9022db7d9 debounce saving of user input in send_textarea 2024-03-26 12:11:15 -04:00
LenAnderson 69d195ef31 improve send_textarea autofit performance
- only expand immediately
- shrink debounced
2024-03-26 12:11:00 -04:00
LenAnderson e567aa2c31 replace debounce with other performance improvements
- remove debounce from processHotkey
- replace dom-queries in conditions with vars
- replace some jQuery in conditions with vanilla JS
2024-03-26 12:09:26 -04:00
LenAnderson 92ec45af4b call processHotkeys debounced 2024-03-25 18:16:18 -04:00