mirror of
https://github.com/SillyTavern/SillyTavern.git
synced 2025-02-12 10:00:36 +01:00
Prefer const variables
This commit is contained in:
parent
49d0d9f557
commit
883da48762
@ -3325,18 +3325,18 @@ export async function Generate(type, { automatic_trigger, force_name2, quiet_pro
|
||||
// Make quiet prompt available for WIAN
|
||||
setExtensionPrompt('QUIET_PROMPT', quiet_prompt || '', extension_prompt_types.IN_PROMPT, 0, true);
|
||||
const chatForWI = coreChat.map(x => `${x.name}: ${x.mes}`).reverse();
|
||||
let { worldInfoString, worldInfoBefore, worldInfoAfter, worldInfoExamples, worldInfoDepth } = await getWorldInfoPrompt(chatForWI, this_max_context, dryRun);
|
||||
const { worldInfoString, worldInfoBefore, worldInfoAfter, worldInfoExamples, worldInfoDepth } = await getWorldInfoPrompt(chatForWI, this_max_context, dryRun);
|
||||
setExtensionPrompt('QUIET_PROMPT', '', extension_prompt_types.IN_PROMPT, 0, true);
|
||||
|
||||
// Add message example WI
|
||||
for (const example of worldInfoExamples) {
|
||||
let exampleMessage = example.content;
|
||||
const exampleMessage = example.content;
|
||||
|
||||
if (exampleMessage.length === 0) {
|
||||
continue;
|
||||
}
|
||||
|
||||
let formattedExample = baseChatReplace(exampleMessage, name1, name2);
|
||||
const formattedExample = baseChatReplace(exampleMessage, name1, name2);
|
||||
const cleanedExample = parseMesExamples(formattedExample);
|
||||
|
||||
// Insert depending on before or after position
|
||||
|
Loading…
x
Reference in New Issue
Block a user