mirror of
https://github.com/SillyTavern/SillyTavern.git
synced 2025-06-05 21:59:27 +02:00
Reverse CC prompt manager's injection order of "Order" to match World Info (#4004)
* Reverse CC injection "Order" to match World Info * Set CC injection order default to 100 * Update non-PM injects order + add hint * Update default order value on inject --------- Co-authored-by: Cohee <18619528+Cohee1207@users.noreply.github.com>
This commit is contained in:
@@ -765,12 +765,12 @@ async function populationInjectionPrompts(prompts, messages) {
|
||||
const wrap = false;
|
||||
|
||||
// Group prompts by priority
|
||||
const extensionPromptsOrder = '0';
|
||||
const extensionPromptsOrder = '100';
|
||||
const orderGroups = {
|
||||
[extensionPromptsOrder]: [],
|
||||
};
|
||||
for (const prompt of depthPrompts) {
|
||||
const order = prompt.injection_order || 0;
|
||||
const order = prompt.injection_order ?? 100;
|
||||
if (!orderGroups[order]) {
|
||||
orderGroups[order] = [];
|
||||
}
|
||||
@@ -778,7 +778,7 @@ async function populationInjectionPrompts(prompts, messages) {
|
||||
}
|
||||
|
||||
// Process each order group in order (b - a = low to high ; a - b = high to low)
|
||||
const orders = Object.keys(orderGroups).sort((a, b) => +a - +b);
|
||||
const orders = Object.keys(orderGroups).sort((a, b) => +b - +a);
|
||||
for (const order of orders) {
|
||||
const orderPrompts = orderGroups[order];
|
||||
|
||||
|
Reference in New Issue
Block a user