mirror of
https://github.com/SillyTavern/SillyTavern.git
synced 2025-06-05 21:59:27 +02:00
Replace goofy comment
This commit is contained in:
@@ -5406,9 +5406,7 @@ export async function moveWorldInfoEntry(sourceName, targetName, uid) {
|
||||
}
|
||||
|
||||
entryToMove.uid = newUid;
|
||||
// Reset displayIndex or let it be recalculated based on target book's sorting?
|
||||
// For simplicity, let's assign a high index initially, assuming it might be sorted later.
|
||||
// Or maybe better, find the max displayIndex in target and add 1?
|
||||
// Place the entry at the end of the target lorebook
|
||||
const maxDisplayIndex = Object.values(targetData.entries).reduce((max, entry) => Math.max(max, entry.displayIndex ?? -1), -1);
|
||||
entryToMove.displayIndex = maxDisplayIndex + 1;
|
||||
|
||||
|
Reference in New Issue
Block a user