This commit is contained in:
RossAscends
2023-05-13 02:42:01 +09:00
10 changed files with 151 additions and 29 deletions

View File

@@ -1339,11 +1339,13 @@ function cleanGroupMessage(getMessage) {
}
function getAllExtensionPrompts() {
return substituteParams(Object
const value = Object
.values(extension_prompts)
.filter(x => x.value)
.map(x => x.value.trim())
.join('\n'));
.join('\n');
return value.length ? substituteParams(value) : '';
}
function getExtensionPrompt(position = 0, depth = undefined, separator = "\n") {
@@ -1359,7 +1361,9 @@ function getExtensionPrompt(position = 0, depth = undefined, separator = "\n") {
if (extension_prompt.length && !extension_prompt.endsWith(separator)) {
extension_prompt = extension_prompt + separator;
}
extension_prompt = substituteParams(extension_prompt);
if (extension_prompt.length) {
extension_prompt = substituteParams(extension_prompt);
}
return extension_prompt;
}