Commit Graph

2586 Commits

Author SHA1 Message Date
Cohee
c63cd87cc0 lint: Require semicolons 2023-12-02 21:11:06 +02:00
Cohee
2ec14a59ee
Merge pull request #1433 from valadaptive/singlequote
Require single quotes
2023-12-02 20:56:10 +02:00
Cohee
9faa1e34b0 Merge branch 'staging' into singlequote 2023-12-02 20:43:41 +02:00
Cohee
a28c23d295 Wait for generation unlock before running continue or trigger 2023-12-02 20:12:36 +02:00
valadaptive
a37f874e38 Require single quotes 2023-12-02 13:04:51 -05:00
Cohee
a06f1e8ad6
Merge pull request #1431 from valadaptive/eslint-fixes-3
ESLint fixes part 3 - more significant changes
2023-12-02 19:55:54 +02:00
Cohee
a367285ac2
Merge pull request #1430 from valadaptive/eslint-fixes-2
ESLint fixes, part 2 - bulky changes
2023-12-02 19:43:11 +02:00
Cohee
0477f6a553 Use best match API tokenizers for Text Completion sources 2023-12-02 19:42:15 +02:00
valadaptive
518bb58d5a Enable no-unused-vars lint
This is the big one. Probably needs thorough review to make sure I
didn't accidentally remove any setInterval or fetch calls.
2023-12-02 12:11:19 -05:00
valadaptive
39bbef376f Enable no-undef lint
I'm not sure where run_edit is supposed to go or if any logic is
missing. I just made my best guess.
2023-12-02 12:11:19 -05:00
valadaptive
14afa1575b Enable no-redeclare lint 2023-12-02 12:11:19 -05:00
valadaptive
66f704bdda Refactor prompt itemization to not redeclare vars 2023-12-02 12:11:19 -05:00
valadaptive
45ad0683d9 Remove characterName silliness
If mes.name is name1, we set it to name1. Otherwise, we set it to
mes.name. It's always mes.name.
2023-12-02 12:10:31 -05:00
valadaptive
c893e2165e Enable no-prototype-builtins lint 2023-12-02 12:10:31 -05:00
Cohee
c98b23ee72 #1405 Don't add formality for unsupported languages 2023-12-02 19:08:21 +02:00
Cohee
6be07e5ea5
Merge pull request #1429 from valadaptive/eslint-fixes-1
ESLint fixes, part 1
2023-12-02 18:50:51 +02:00
Cohee
a91694ebbc Change audio format check 2023-12-02 18:41:54 +02:00
valadaptive
b023312117 Enable no-useless-escape lint 2023-12-02 10:32:26 -05:00
valadaptive
97c49a405b Enable no-extra-boolean-cast lint 2023-12-02 10:32:26 -05:00
valadaptive
0a27275772 Enable no-extra-semi lint 2023-12-02 10:32:26 -05:00
valadaptive
27e63a7a77 Enable no-case-declarations lint 2023-12-02 10:32:26 -05:00
valadaptive
a665a4897d Enable no-unused-labels lint
I'm not sure why "esversion: 6" was at the top of the file. My best
guess is that whoever initially created it was using jshint, which says
"use 'esversion: 6'" if used to lint a file which contains ES6 code.
Even then, the proper syntax would be a comment.
2023-12-02 10:32:07 -05:00
valadaptive
1c121f1ba5 Enable use-isnan lint 2023-12-02 10:32:07 -05:00
valadaptive
9204a31d32 Enable no-self-assign lint 2023-12-02 10:32:07 -05:00
valadaptive
c05aee8e72 Enable no-unsafe-negation lint
This actually fixes a bug--the old code was negating "audioData.type"
2023-12-02 10:32:07 -05:00
valadaptive
7def71aef7 Only enable no-constant-condition for non-loops
"while (true)" is a useful pattern that eslint doesn't really need to
flag as a problem.
2023-12-02 10:32:07 -05:00
valadaptive
60ac1aa1c7 Enable no-empty lint 2023-12-02 10:32:07 -05:00
valadaptive
367f3dba27 Enable no-unsafe-finally lint 2023-12-02 10:32:07 -05:00
valadaptive
e7ae1c4787 Enable no-dupe-keys lint 2023-12-02 10:32:07 -05:00
valadaptive
8c89f373fa Enable no-irregular-whitespace lint
A couple comments contained non-breaking spaces (I think), which I
replaced with regular spaces.
2023-12-02 10:32:07 -05:00
valadaptive
12cdb76a20 Enable no-regex-spaces lint
I noticed the old code was replacing two spaces with one space, over and
over. Instead, I changed it to remove all consecutive strings of spaces
just once, using the "+" quantifier. This should behave the same but is
nicer to read and faster.
2023-12-02 10:32:07 -05:00
valadaptive
7c3dd75e6a Enable no-fallthrough lint 2023-12-02 10:32:07 -05:00
Cohee
4c475afc91
Merge pull request #1428 from valadaptive/eslint-initial
Initial ESLint setup
2023-12-02 17:14:04 +02:00
Cohee
bac43a2131 Add CORS proxy placeholder 2023-12-02 16:04:30 +02:00
valadaptive
ec0e4026d8 Initial ESLint setup
This sets up ESLint and its config, and disables a bunch of recommended
lints that currently do not pass. Later PRs/commits will fix those lints
and re-enable them.
2023-12-02 09:02:57 -05:00
Cohee
4f05d872f4
Merge pull request #1423 from bdashore3/staging
Fix the CORS proxy again
2023-12-02 16:00:35 +02:00
Cohee
a1754c7192
Update server.js 2023-12-02 15:32:09 +02:00
Cohee
249f9f649f Escape QR button labels 2023-12-02 15:19:44 +02:00
Cohee
1e4471a9b5
Merge pull request #1425 from valadaptive/kobold-classic-api-url 2023-12-02 13:59:47 +02:00
Cohee
3f924f8b11
Merge pull request #1426 from valadaptive/fix-temp-label 2023-12-02 13:58:29 +02:00
valadaptive
cadf5163ad Fix temperature slider label 2023-12-02 05:37:27 -05:00
valadaptive
4c4e4caeb7 Pass in Kobold Classic API server url from client 2023-12-02 04:45:20 -05:00
kingbri
641cd614c8 Server: Fix CORS proxy with POST requests and status codes
POST requests always sent an undefined body without the bodyParser
middleware which isn't included with express by default. Add this
as a new dependency and inject it into the express app. This middleware
will also be useful for any other middleware that we might create.

Also properly send status codes and messages to the client so they
can be handled properly.

Signed-off-by: kingbri <bdashore3@proton.me>
2023-12-02 01:43:09 -05:00
Cohee
04ef9fba54 Disable context stop strings on pull but enable for new installs 2023-12-02 02:19:32 +02:00
Cohee
690c058a46 Fix boolean comparison 2023-12-02 00:04:38 +02:00
Cohee
a2f293b6af Make context stop strings togglable 2023-12-01 23:06:37 +02:00
Cohee
9ad42025e5 Add depth to entry template 2023-12-01 22:09:13 +02:00
Cohee
07962e0e4e Add /setentryfield command 2023-12-01 21:51:49 +02:00
Cohee
69659e79e3 Add chat start and example separator as stop sequences 2023-12-01 19:01:06 +02:00
Cohee
6b348f6128 Fix trailing stopping strings removal 2023-12-01 18:55:11 +02:00