Commit Graph

222 Commits

Author SHA1 Message Date
ebolam c984f4412d Fix for web based model loading 2022-06-06 12:49:40 -04:00
ebolam 1e139594a9 Merge commit 'refs/pull/7/head' of https://github.com/ebolam/KoboldAI into HEAD 2022-06-06 09:49:46 -04:00
Gnome Ann ce4a785449 Allow clicking on userscripts to enable/disable them (mobile friendly) 2022-06-05 21:06:09 -04:00
Gnome Ann b9c6c0b3bd Out-of-bounds setting values are now shown in red 2022-05-28 19:14:26 -04:00
Gnome Ann 69a28210e9 Don't cap setting values when manually entered by user 2022-05-28 18:33:57 -04:00
Gnome Ann b1faca3686 Prevent the settings throttle from lagging the sliders 2022-04-26 21:14:44 -04:00
Henk 9cff8268b5 Lower slider latency for now 2022-04-27 00:53:55 +02:00
Gnome Ann 02e4e6be1e Fix author's note slider 2022-04-26 17:29:18 -04:00
Gnome Ann ee8ced2f5f Allow users to type in the values for the settings 2022-04-26 15:27:28 -04:00
Gnome Ann c7b03398f6 Merge 'nolialsea/patch-1' into settings without Colab changes 2022-04-17 12:15:36 -04:00
henk717 9ac47f6f54
Merge branch 'KoboldAI:main' into united 2022-04-10 09:05:31 +02:00
Henk b3fea7f526 Fix Android Keyboards 2022-04-10 09:04:31 +02:00
Gnome Ann 20e48b11d7 Typical sampling 2022-03-27 16:25:50 -04:00
Noli 076c6c8efa update slider value without waiting for socketio 2022-03-25 22:18:00 +01:00
Noli 72b74d9ab6 fix tabs 2022-03-25 20:46:08 +01:00
Noli 6aaa8d026f semicolon 2022-03-25 20:44:41 +01:00
Noli 8270d92073 fix wrong this scope 2022-03-25 20:44:25 +01:00
Noli 6ed50ee1e9 make the throttle timer a dict to keep track of which slider has been changed 2022-03-25 20:37:45 +01:00
nolialsea 1de4944d46
Add throttle closure for settings sliders
Adds a throttling closure to add a waiting time before calling a callback,
Uses this closure to throttle the event fired by socketio on slider value change
2022-03-25 20:08:56 +01:00
henk717 cf99f02ca5 Merge branch 'main' into united 2022-03-20 19:22:53 +01:00
henk717 20eab085dd Fix AutoSave Toggle 2022-03-20 19:12:11 +01:00
ebolam 8ae0a4a3e7 Online Services Working now (without a way to test as I don't have accounts) 2022-03-12 14:21:11 -05:00
ebolam 772ae2eb80 Added model info to show model load progress in UI 2022-03-11 11:31:41 -05:00
ebolam d1a64e25da Custom Model Load Fix 2022-03-07 18:44:37 -05:00
ebolam 70f1c2da9c Added stub for model name feedback 2022-03-07 14:20:25 -05:00
ebolam d0553779ab Bug Fix 2022-03-07 12:33:35 -05:00
ebolam c50fe77a7d Load Fix 2022-03-07 11:57:33 -05:00
ebolam 49fc854e55 Added saving of breakmodel values so that it defaults to it on next load 2022-03-07 11:49:34 -05:00
ebolam 123cd45b0e Breakmodel working now with the web UI 2022-03-07 11:27:23 -05:00
ebolam 5e00f7daf0 Next evolution of web ui model selection. Custom Paths not working quite right. 2022-03-06 20:55:11 -05:00
ebolam 2ddf45141b Initial UI based model loading. Includes all parameters except breakmodel chunks, engine # for OAI, and url for ngrok url for google colab 2022-03-06 19:51:35 -05:00
henk717 e033b04f87 Restore United 2022-03-02 11:40:50 +01:00
Gnome Ann d8e99b12f1 Re-enable the editor mutation observer 2022-02-28 19:00:26 -05:00
ebolam 0684a221cd Changed pin icon for re-dos to be a circular arrow that is not clickable to make it clear it is a redo action and cannot be cleared. 2022-02-03 08:08:43 -05:00
ebolam b0f1bdf2fd
Merge branch 'henk717:united' into united 2022-01-26 11:27:12 -05:00
Gnome Ann 3f18888eec Repetition penalty slope and range 2022-01-24 15:30:38 -05:00
ebolam a0100ff3cc Fixed error with redo action when a list of options is on screen sometimes causing the list to disappear entirely. 2022-01-24 15:15:45 -05:00
ebolam bd0732fbd6 Fix for redo with options.
Added debug menu
2022-01-24 12:54:44 -05:00
ebolam 8e2fab8eb0 whops. Missed a } 2022-01-22 08:48:32 -05:00
ebolam 2010e7b9bc Added saveas option for saving without metadata information
Fixed redo on an empty story erroring
Fixed redo when you're at the current end of a chain causing an error
2022-01-21 19:02:56 -05:00
ebolam d31fb278ce Working redo and pin options 2022-01-21 15:30:37 -05:00
Gnome Ann 3018322963 Detect and show properly when story is unsaved 2022-01-18 17:20:45 -05:00
Gnome Ann 1951ccd2ce Show author and SP length in soft prompt menu 2022-01-18 16:30:09 -05:00
Gnome Ann 54a587d6a3 Show confirmation dialog when navigating away from UI window 2022-01-17 12:11:06 -05:00
Gnome Ann 1627afa8c5 Merge branch 'united' into patch 2022-01-17 10:44:34 -05:00
Gnome Ann 33f9f2dc82 Show message when TPU backend is compiling 2022-01-16 21:09:10 -05:00
Gnome Ann 03b16ed920 Merge branch 'united' into patch 2022-01-16 00:36:55 -05:00
Gnome Ann f4eb896a69 Use original TPU backend if possible 2022-01-15 23:31:07 -05:00
Gnome Ann 43586c8f60 Fix some of the logic for generation aborting 2022-01-10 17:09:47 -05:00
Gnome Ann f718fdf65e Allow pressing send button again to stop generation 2022-01-10 16:36:15 -05:00
Gnome Ann 2fc0bdfcba Correct a typo in `restorePrompt()` 2022-01-04 14:41:31 -05:00
Gnome Ann b88d49e359 Make all WI commands use UIDs instead of nums 2021-12-31 21:22:51 -05:00
Gnome Ann f4c9f06c4e Set content type of Blobs in `downloadStory()` 2021-12-30 16:51:50 -05:00
Gnome Ann f9c1e38ee8 Disable "Download Story as Plaintext" when disconnected
This is to help avoid confusion for people who want to backup their
current story after being disconnected from the server.
2021-12-30 16:37:48 -05:00
Gnome Ann 44eaab8515 Disable most top menu actions when disconnected 2021-12-30 16:33:28 -05:00
Gnome Ann 3532a30ad4 Make the UI theme grey when not connected to server 2021-12-30 01:44:35 -05:00
Gnome Ann 276f24029e Author's Note Template 2021-12-29 23:43:36 -05:00
Gnome Ann 7573f64bf2 Add Memory box to Random Story dialog and "Random Story Persist" 2021-12-29 23:15:59 -05:00
Gnome Ann 1189781eac Show a text box for chat name when Chat Mode is enabled 2021-12-26 22:21:58 -05:00
henk717 d234f67a90 Chat Mode
The Initial commit for Chat Mode, the nickname part of the UI is missing other than that it should be fully functional. To use Chat Mode effectively you first input a small dialogue (Can be around 6 lines 3 of your own inputs and 3 of the character) formatted as Name : it will then automate the actions needed to chat properly. During this mode single line mode is forced on, and Trim Incomplete Sentences is forced off.
2021-12-26 01:51:32 +01:00
Gnome Ann 4a852d7f95 Fix `restorePrompt()` in application.js
When the prompt is deleted by the user, the topmost remaining chunk of
the story that has at most one non-whitespace character is now made the
new prompt chunk.

Also fixed issues in Chromium-based browsers (desktop and Android) where
selecting all text in the story, typing some new text to replace the
entire story and then defocusing causes the editor to break.
2021-12-23 15:43:32 -05:00
Gnome Ann 7e06c25011 Display icons for active userscripts and softprompts
Also fixes the userscript menu so that the active userscripts preserve
the previously selected order as was originally intended.
2021-12-22 23:33:27 -05:00
Gnome Ann fc04ff3a08 World info folders can now be collapsed by clicking on the folder icon 2021-12-22 13:12:35 -05:00
Gnome Ann 452b46146b Messages should be hidden on loading a save, softprompt or script 2021-12-22 12:19:36 -05:00
Gnome Ann 341b153360 Lua API fixes
* `print()` and `warn()` now work correctly with `nil` arguments
* Typo: `gpt-neo-1.3M` has been corrected to `gpt-neo-1.3B`
* Regeneration is no longer triggered when writing to `keysecondary` of
  a non-selective key
* Handle `genamt` changes in generation modifier properly
* Writing to `kobold.settings.numseqs` from a generation modifier no
  longer affects
* Formatting options in `kobold.settings` have been fixed
* Added aliases for setting names
* Fix behaviour of editing story chunks from a generation modifier
* Warnings are now yellow instead of red
* kobold.logits is now the raw logits prior to being filtered, like
  the documentation says, rather than after being filtered
* Some erroneous comments and error messages have been corrected
* These parts of the API have now been implemented properly:
    * `compute_context()` methods
    * `kobold.authorsnote`
    * `kobold.restart_generation()`
2021-12-19 20:18:28 -05:00
Gnome Ann 12718dbe24 Try long-polling first, then try websocket
This makes it so that SocketIO uses long polling to set up the
connection before switching to websocket, instead of immediately using
websocket.

This seems to resolve issues where the browser sometimes can't connect
to the websocket server until the window has been open for a minute.
2021-12-17 13:18:47 -05:00
henk717 6d9063fb8b No Prompt Gen
Allow people to enter a prompt without generating anything by the AI. Combined with the always add prompt this is a very useful feature that allows people to write world information first, and then do a specific action. This mimics the behavior previously seen in AI Dungeon forks where it prompts for world information and then asks an action and can be particularly useful for people who want the prompt to always be part of the generation.
2021-12-16 12:47:44 +01:00
Gnome Ann 338d437ea3 Use eventlet instead of gevent-websocket 2021-12-13 17:19:04 -05:00
Gnome Ann a06cc3d37b Make sure the "Lua error" GUI message is always visible 2021-12-13 03:21:08 -05:00
Gnome Ann d2f5544468 Add Userscripts menu into GUI 2021-12-13 01:03:26 -05:00
Gnome Ann 6d8517e224 Fix some minor coding errors 2021-12-05 11:39:59 -05:00
Gnome Ann 1393eac882 Add indentation to WI folder contents 2021-12-05 03:29:13 -05:00
Gnome Ann d46ef8550b Fix WI sortable handle events not being bound correctly
This fixes a problem where WI entries/folders are sometimes able to be
dragged into places they shouldn't be. Steps to reproduce:

1. Start a blank story
2. Refresh the browser
3. Open the W Info screen
4. Add a world info folder
5. Add a world info entry into that folder
6. Drag that world info entry
2021-12-05 03:04:45 -05:00
Gnome Ann 85aa180a90 Put safeguards on dragging and dropping into invalid positions 2021-12-05 02:50:42 -05:00
Gnome Ann 3e0b1a9e63 Fix scrolling problems with WI entries with long names/comments 2021-12-05 01:39:42 -05:00
Gnome Ann 08992dec7e Use a green horizontal line as the drag-and-drop placeholder 2021-12-05 00:34:44 -05:00
Gnome Ann b99ac92a52 WI folders and WI drag-and-drop 2021-12-04 23:59:28 -05:00
henk717 b926170fb0
Merge branch 'KoboldAI:main' into united 2021-11-19 00:05:21 +01:00
Gnome Ann bb51198f40 Fix some editor issues in Firefox and possibly mobile browsers
When Firefox 93.0 was released, they broke the ability to edit text
across multiple chunks or across multiple paragraphs. If you tried,
nothing would happen.

Also, we are no longer using Mutation Observers to detect when a chunk
is modified. We are now using the beforeinput event.
2021-11-18 13:18:18 -05:00
henk717 c2371cf801
Merge pull request #23 from VE-FORBRYDERNE/scan-test
Dynamic world info scan
2021-11-10 03:31:42 +01:00
henk717 bc0f9c8032 Allow remote mode to load from client-side story files
(cherry picked from commit a1345263df)
2021-11-06 11:48:20 -04:00
Gnome Ann 7a0b0b0d2d Remove debug logging from application.js 2021-11-04 19:36:45 -04:00
Gnome Ann 7c099fe93c Allow remote mode to load from client-side story files 2021-11-04 19:33:17 -04:00
Gnome Ann 0a91ea27b3 Make the dynamic world info scan toggleable 2021-11-03 12:18:48 -04:00
Gnome Ann 4e3cc93020 Merge branch 'united' into sp 2021-10-23 11:45:03 -04:00
henk717 7b73d7cfdd Single Line Mode
Adds Single Line mode, optimized for things like chatbot testing and other cases where you want to have control over what happens after a paragraph.

This can also be used as a foundation for a chatbot optimized interface mode.
2021-10-23 17:30:48 +02:00
Gnome Ann 9e82ce34a6 HTML-escape strings in the soft prompt selection menu 2021-10-22 14:25:25 -04:00
Gnome Ann 1f449a9dda Soft prompt support (6B Colabs not supported yet) 2021-10-22 14:18:10 -04:00
Gnome Ann fdbe730a1f Fix an incorrect document.queryCommandSupported call 2021-10-13 12:51:31 -04:00
Gnome Ann 99d26c44e0 Handle CRLF newlines properly when pasting 2021-10-13 12:43:45 -04:00
Gnome Ann 718af6f7fa Pasting fallback for browsers with no execCommand support 2021-10-13 12:41:43 -04:00
Gnome Ann 407d8f7419 Also apply the enter patch to pasted text 2021-10-13 12:05:15 -04:00
Gnome Ann aaa0c3374e Fix problems with stories that end in newlines
Today I learned that the editor only works properly when the last
<chunk> tag has a <br> inside it at the end.  This last <br> is
invisible and is automatically created by all major browsers when you
use the enter key to type a newline at the end of a story to "prevent
the element from collapsing".  When there's more than one <br> at the
end of the last <chunk>, only the last of those <br>s is invisible, so
if you have three <br>s, they are rendered as two newlines.  This only
applies to the last <chunk>, so if the second last <chunk> has three
<br>s at the end, they are still rendered as three newlines.  Since
the browser is really insistent on doing this, this commit mostly deals
with dynamically creating and deleting <br> tags at the ends of <chunk>
tags as needed to provide a consistent experience, and making sure
that all <br> tags actually go inside of <chunk> tags to prevent
breaking the editor.  The latter behaviour was exhibited by Chrome and
caused a bug when you added a newline at the end of your story using
the editor.
2021-10-13 00:42:03 -04:00
Gnome Ann b3d33cc852 Fix enter key behaviour in the editor when not using Firefox 2021-10-12 00:09:02 -04:00
Gnome Ann e69e15bec7 Move using_webkit_patch to earlier in the code
I don't know it this or help or not but I hope it does.
2021-09-30 22:58:54 -04:00
Gnome Ann d7893a0b52 Check for WebKit after connecting to the server
For some reason the original way only works in Safari after pressing the
refresh button. It did not work if you typed the URL into the address
bar in Safari without refreshing afterwards.
2021-09-30 19:00:15 -04:00
Gnome Ann 00c1f49ca1 Fix slow typing speed on mobile devices 2021-09-30 17:52:35 -04:00
Gnome Ann a923b3bfa7 Safari compatibility
Only tested on macOS so far, not iOS.
2021-09-30 14:13:54 -04:00
Gnome Ann e325197748 Fix for submitting memory/AN when memory is empty 2021-09-30 10:57:29 -04:00
Gnome Ann 9ab1d182ac Guard against empty prompts 2021-09-28 19:48:43 -04:00