Commit Graph

896 Commits

Author SHA1 Message Date
LenAnderson 09d410ec48 populate parser flag doclinks 2024-05-13 08:04:58 -04:00
Cohee 5b7bfbaa98 Merge branch 'staging' into default-content 2024-05-12 23:48:49 +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 9ed6ee2161 Sample Character browser to onboarding 2024-05-12 16:43:09 +03:00
kingbri 6804e4c679 Index: Expose min_tokens for TabbyAPI
Now supports the minimum amount of tokens to generate.

Signed-off-by: kingbri <bdashore3@proton.me>
2024-05-10 23:19:57 -04:00
Wolfsblvt e18d554489 Refactor select2 choice click event to utils 2024-05-09 23:30:18 +02:00
Wolfsblvt f4bb4fe51e Merge branch 'staging' into wi-regex-keys 2024-05-09 04:23:14 +02:00
Wolfsblvt eb273a1873 WI key dropdown templating shows all keys
- Cache all keys for the loaded lorebook
- Key selection dropdown shows all keys and how often they are used already
- More templating changes
2024-05-08 20:34:53 +02:00
Cohee 10fda0b220
Merge pull request #2191 from bdashore3/example-wi
mesExamples anchor for World Info
2024-05-08 15:33:45 +03:00
Cohee 61d5dde497 Fix line break 2024-05-08 15:13:12 +03:00
Cohee edc33584da Fix extra & in title 2024-05-08 15:12:31 +03:00
Cohee 852bc15a94 Update title and i18n 2024-05-08 14:10:34 +03:00
Cohee c43ddd9d62
Merge pull request #2178 from Yokayo/staging
Localization enhancements
2024-05-08 13:59:52 +03:00
Cohee c851961234 Update movingUI i18n attr 2024-05-08 13:58:54 +03:00
kingbri 01aacb9280 World Info: Add example messages insertion point
Allow insertion above and below mesExamples (also known as the
"examples of dialogue") box.

Signed-off-by: kingbri <bdashore3@proton.me>
2024-05-07 21:55:26 -04:00
Wolfsblvt fda0e886e4 WI custom styling for regex keys
- WI custom style for regex keys
- moved select2 styling to its own file
2024-05-07 05:44:18 +02:00
Wolfsblvt 70a2f71e33 WI switch key controls to multi input
- Switch key/secondarykey controls to select2 input
- Custom tokenizer for regex parsing, allowing comma in regex
- Keep mobile-compatibility by switching to textarea
- select2 utility method to pre-fill options
- New inline display mode of select2 multi to save space
2024-05-07 02:01:54 +02:00
Cohee 542018cecb Fix group weight clamping 2024-05-06 22:55:31 +03:00
Cohee 7063fce2af Selectable openrouter providers 2024-05-06 19:26:20 +03:00
Cohee 83c77c1f18 Split group weight and trigger% 2024-05-06 17:00:42 +03:00
Cohee 181b5aff97 Add Groq as chat completion source 2024-05-05 18:53:12 +03:00
Cohee 31f1b34911 Add Perplexity L3-sonar models 2024-05-05 18:21:58 +03:00
Cohee 39a54d158d Per-entry group scoring 2024-05-05 00:42:33 +03:00
Cohee 2bf9869e5f Add WI group scoring mode 2024-05-04 23:51:28 +03:00
Cohee de1bb90c23 #2180 Add critical style tag 2024-05-04 15:36:25 +03:00
Cohee d972ed5a2b #2180 Add preload for style 2024-05-04 14:02:53 +03:00
RossAscends 932d3dc10c fix tabby sampler viz, clarify grammar title 2024-05-04 15:10:47 +09:00
Cohee 7bfd666321 Add llama 3 tokenizer 2024-05-03 23:59:39 +03:00
Cohee ed65ddf981 Add Open Mixtral 8x22b model 2024-05-03 20:22:17 +03:00
Cohee 6b2b849a26 Add server history connect missing attributes 2024-05-03 20:05:42 +03:00
Cohee 7b87f44518 Clean-up API-specific settings 2024-05-03 20:02:13 +03:00
sasha0552 2bd239fe81
Initial vLLM support 2024-05-02 22:40:40 +00:00
Cohee 9f1c306920 I really have to spell it out 2024-05-01 23:42:50 +03:00
Wolfsblvt b4aa7831e7 Scored search sorting for char list 2024-04-30 04:30:39 +02:00
Wolfsblvt d1cdd60883 Scored search sorting for personas 2024-04-30 02:27:44 +02:00
Wolfsblvt a850352eab Scored search sorting for world info 2024-04-30 01:39:47 +02:00
Cohee f632888b4c Move scripts init at the end of HTML page 2024-04-27 23:44:08 +03:00
Cohee 0d310c434d Update FontAwesome 2024-04-27 23:25:35 +03:00
Cohee 404d9db359
Merge pull request #2147 from Wolfsblvt/wi-entry-inclusion-prio
World Info inclusion group prio toggle
2024-04-27 21:09:43 +03:00
Cohee 5dcfda0514 Cut UI labels. Add expand to custom CSS 2024-04-27 20:02:30 +03:00
Cohee 413cec8a9f Merge branch 'staging' into wi-entry-inclusion-prio 2024-04-27 18:00:00 +03:00
Cohee 8e7ffab793
Merge pull request #2149 from Wolfsblvt/duplicate-wi-entries
Button to duplicate WI entries
2024-04-27 17:57:59 +03:00
Wolfsblvt b64b0e3362 Button to duplicate WI entries
- Add an option to duplicate a WI entry, copying everything besides UID
- moved UI move action on new WI entry to the UI function, not inside utility
2024-04-27 06:18:26 +02:00
RossAscends f8ca73265b userSettings expandables get borders 2024-04-27 13:13:54 +09:00
RossAscends 1f7614af33 re-order/style User Settings Panel 2024-04-27 12:50:33 +09:00
Wolfsblvt dcb042681d Change group prio name, add default value set 2024-04-27 04:40:35 +02:00
Wolfsblvt 8db39a58fb World Info inclusion group prio toggle 2024-04-27 02:23:37 +02:00
Cohee b06e09c030
Merge pull request #2131 from Yokayo/staging
Localization enhancements
2024-04-26 23:05:55 +03:00
Cohee bb2bcdbf61 The dot went MIA 2024-04-26 23:04:11 +03:00
RossAscends e59a5b4449 toggle to hide chat avatars 2024-04-25 12:51:56 +09:00
Yokayo d65f068310
More localizable strings 2024-04-24 20:58:24 +07:00
Yokayo b1c199e650
Add more localizable strings 2024-04-24 19:02:00 +07:00
Cohee 4370db6bdc Implement World Info activation using Vector Storage 2024-04-23 03:09:52 +03:00
Cohee 70c4e82b89 Merge branch 'staging' into neo-server 2024-04-20 21:10:43 +03:00
RossAscends cee1774554 TC/kobold/novel sampler panel layout shuffle 2024-04-21 00:37:03 +09:00
Cohee b3bbec83b6 Merge branch 'staging' into neo-server 2024-04-20 02:56:05 +03:00
Cohee 3ff5884112 Forbid external media by default 2024-04-20 01:11:37 +03:00
Cohee 2a2a63c52c Add Perplexity as Chat Completion source 2024-04-20 00:09:38 +03:00
Cohee 88637adfe2 Merge branch 'staging' into neo-server 2024-04-17 19:39:57 +03:00
Cohee 8ce6872d6f #2091 Extend custom OAI API type input caps 2024-04-15 02:04:41 +03:00
Cohee 2b12d3f8e8 Merge branch 'staging' into neo-server 2024-04-15 01:23:36 +03:00
Cohee f7eb57082a
Merge pull request #2090 from Dakraid/feature/zoomed-avatar-tweaks
Adjust style and add magnification to zoomed avatar
2024-04-15 00:44:27 +03:00
Cohee 0263be8c1f Merge branch 'staging' into neo-server 2024-04-15 00:26:52 +03:00
Cohee 4a553e1fc8 Merge branch 'release' into staging 2024-04-15 00:26:43 +03:00
Kristan Schlikow 54eec3e215
Separate handling for closing for mobile and desktop
Clicking on the image only closes on desktop now, while on mobile the close button has to be pressed as touch is used for the magnification
2024-04-14 22:17:38 +02:00
Cohee 23ac23010d Fix the rest of mobile cases 2024-04-14 21:17:18 +03:00
Cohee 607e85639c Code clean-up 2024-04-14 19:31:38 +03:00
Kristan Schlikow 835d6c71fa
Add option to toggle magnification behaviour 2024-04-14 17:00:10 +02:00
Cohee 9cb777a4e9 Increase default avatar size 400x600 => 512x768 2024-04-14 17:36:48 +03:00
Kristan Schlikow ec76742d0e
Fix positioning of the drag icon
Image still gets magnified when the icon is grabbed, but that is a minor aesthetic bug without influence on the functionality
2024-04-14 03:10:08 +02:00
Kristan Schlikow 0c4da602ab
Adjust style and add magnification to zoomed avatar 2024-04-14 02:58:23 +02:00
Ondřej Sakala 5ce625fb6b added a web-search toggle for Cohere API 2024-04-14 02:25:11 +02:00
Cohee 31ba3cf039 Merge branch 'staging' into neo-server 2024-04-11 21:47:10 +03:00
Cohee ee62f77e96
Merge pull request #2063 from kingbased/goog
Gemini system prompt support
2024-04-11 19:49:20 +03:00
Cohee d2ac782c3c Fix broken HTML and code style 2024-04-11 19:21:59 +03:00
Yokayo f6b80c021a
Localize more strings 2024-04-11 14:52:26 +07:00
based 4ac6bbd515 thought it looked a little strange 2024-04-11 17:01:19 +10:00
based 34bca69950 system prompt support for gemini 1.5 2024-04-11 16:38:20 +10:00
Cohee bd4d8847ce Merge branch 'staging' into neo-server 2024-04-10 21:41:03 +03:00
Cohee 53baa7aae7 #2051 #2031 Selectable prompt converter for custom OAI type 2024-04-10 21:12:57 +03:00
Cohee a9a3d91e4f Fix char management dropdown on rectangular avatars 2024-04-10 20:31:38 +03:00
Cohee b5d7d0a73f
Merge pull request #2050 from Dakraid/feature/new-avatar-tag-layout
Update layout for avatar tags and controls
2024-04-10 20:27:31 +03:00
Cohee 9b97294799 Denser layout 2024-04-10 20:27:06 +03:00
Kristan Schlikow b811d69068
Fix sizing on smaller resolutions 2024-04-10 19:10:15 +02:00
Cohee 91e93958b8
Merge pull request #2055 from kingbased/turbo
new turbo model
2024-04-10 14:30:06 +03:00
Kristan Schlikow 7d4e689bec
Update layout for avatar tags and controls 2024-04-10 12:15:51 +02:00
Cohee 75857ae18c #2041 Fix WI checkboxes missing in localizations 2024-04-10 12:17:35 +03:00
based 62ed8faef0 didn't really make sense to have these i guess 2024-04-10 14:33:38 +10:00
based 540cddf300 new turbo model 2024-04-10 14:24:43 +10:00
Cohee 497f38111f Merge branch 'staging' into neo-server 2024-04-09 20:26:03 +03:00
LenAnderson 0e2a82ce00 add generic popups with their own elements 2024-04-08 18:42:33 -04:00
Cohee 72792ae9f9 Basic account management 2024-04-08 02:38:20 +03: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
Cohee 495cf5d9ca Move context formatting help link 2024-04-06 15:47:11 +03:00
Cohee b1c2617b0d Only init scroll height of WI keys when first opening the drawer 2024-04-05 13:53:39 +03:00
Cohee 3a0ceae80a Optimize scroll height resets on WI entry render, remove silly logs 2024-04-05 13:45:28 +03:00
Cohee 0804843805 Add per-character and per-group overrides for external media 2024-04-05 00:39:54 +03:00
Cohee 6cc73c2a0b Add instruct last system sequence 2024-04-04 22:27:08 +03:00
Cohee 42138ca09b Add command-r-plus 2024-04-04 20:38:34 +03:00
Cohee d8fa692774 Unify API connect UI positioning 2024-04-03 01:45:38 +03:00