mirror of
https://github.com/SillyTavern/SillyTavern.git
synced 2025-06-05 21:59:27 +02:00
Merge pull request #999 from StefanDanielSchwarz/roleplay-context
Return of the Roleplay Context
This commit is contained in:
@ -20,7 +20,11 @@ import {
|
||||
groups,
|
||||
resetSelectedGroup,
|
||||
} from "./group-chats.js";
|
||||
import { loadInstructMode } from "./instruct-mode.js";
|
||||
import {
|
||||
instruct_presets,
|
||||
loadInstructMode,
|
||||
selectInstructPreset,
|
||||
} from "./instruct-mode.js";
|
||||
|
||||
import { registerSlashCommand } from "./slash-commands.js";
|
||||
import { tokenizers } from "./tokenizers.js";
|
||||
@ -193,7 +197,7 @@ let power_user = {
|
||||
|
||||
let themes = [];
|
||||
let movingUIPresets = [];
|
||||
let context_presets = [];
|
||||
export let context_presets = [];
|
||||
|
||||
const storage_keys = {
|
||||
fast_ui_mode: "TavernAI_fast_ui_mode",
|
||||
@ -920,6 +924,15 @@ function loadContextSettings() {
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
// Select matching instruct preset
|
||||
for (const instruct_preset of instruct_presets) {
|
||||
// If instruct preset matches the context template
|
||||
if (instruct_preset.name === name) {
|
||||
selectInstructPreset(instruct_preset.name);
|
||||
break;
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user