mirror of
https://github.com/SillyTavern/SillyTavern.git
synced 2025-02-02 20:36:49 +01:00
Move sortable delay into configuration
This commit is contained in:
parent
b0158bd72d
commit
0084ea2461
@ -2,7 +2,7 @@ import {callPopup, event_types, eventSource, is_send_press, main_api, substitute
|
||||
import { is_group_generating } from "./group-chats.js";
|
||||
import {TokenHandler} from "./openai.js";
|
||||
import {power_user} from "./power-user.js";
|
||||
import { debounce, getSortableDelay, waitUntilCondition } from "./utils.js";
|
||||
import { debounce, waitUntilCondition } from "./utils.js";
|
||||
|
||||
function debouncePromise(func, delay) {
|
||||
let timeoutId;
|
||||
@ -172,7 +172,7 @@ function PromptManagerModule() {
|
||||
strategy: 'global',
|
||||
dummyId: 100000
|
||||
},
|
||||
draggable: true,
|
||||
sortableDelay: 30,
|
||||
warningTokenThreshold: 1500,
|
||||
dangerTokenThreshold: 500,
|
||||
defaultPrompts: {
|
||||
@ -1569,7 +1569,7 @@ PromptManagerModule.prototype.getFormattedDate = function() {
|
||||
*/
|
||||
PromptManagerModule.prototype.makeDraggable = function () {
|
||||
$(`#${this.configuration.prefix}prompt_manager_list`).sortable({
|
||||
delay: getSortableDelay(),
|
||||
delay: this.configuration.sortableDelay,
|
||||
items: `.${this.configuration.prefix}prompt_manager_prompt_draggable`,
|
||||
update: ( event, ui ) => {
|
||||
const promptOrder = this.getPromptOrderForCharacter(this.activeCharacter);
|
||||
|
@ -47,7 +47,7 @@ import {
|
||||
import {
|
||||
delay,
|
||||
download,
|
||||
getFileText,
|
||||
getFileText, getSortableDelay,
|
||||
getStringHash,
|
||||
parseJsonFile,
|
||||
stringFormat,
|
||||
@ -341,7 +341,7 @@ function setupChatCompletionPromptManager(openAiSettings) {
|
||||
containerIdentifier: 'completion_prompt_manager',
|
||||
listIdentifier: 'completion_prompt_manager_list',
|
||||
toggleDisabled: ['main'],
|
||||
draggable: true,
|
||||
sortableDelay: getSortableDelay(),
|
||||
defaultPrompts: {
|
||||
main: default_main_prompt,
|
||||
nsfw: default_nsfw_prompt,
|
||||
|
Loading…
x
Reference in New Issue
Block a user