Smudge groups depth prompts in Join mode.

This commit is contained in:
Cohee
2023-10-26 00:39:11 +03:00
parent 8dcfe57888
commit 5cdc3d1d18
3 changed files with 82 additions and 8 deletions

View File

@@ -1383,12 +1383,16 @@ async function checkWorldInfo(chat, maxContext) {
// Add the depth or AN if enabled
// Put this code here since otherwise, the chat reference is modified
if (extension_settings.note.allowWIScan) {
let depthPrompt = getExtensionPromptByName("DEPTH_PROMPT")
if (depthPrompt) {
textToScan = `${depthPrompt}\n${textToScan}`
for (const key of Object.keys(context.extensionPrompts)) {
if (key.startsWith('DEPTH_PROMPT')) {
const depthPrompt = getExtensionPromptByName(key)
if (depthPrompt) {
textToScan = `${depthPrompt}\n${textToScan}`
}
}
}
let anPrompt = getExtensionPromptByName(NOTE_MODULE_NAME);
const anPrompt = getExtensionPromptByName(NOTE_MODULE_NAME);
if (anPrompt) {
textToScan = `${anPrompt}\n${textToScan}`
}