fix(webui): preserve session drag contracts

This commit is contained in:
Xubin Ren
2026-08-06 19:11:05 +08:00
parent f44a766f98
commit 9af6bb91c7
4 changed files with 40 additions and 3 deletions
+5 -1
View File
@@ -221,7 +221,11 @@ export const ChatList = memo(function ChatList({
const targetIndex = reordered.indexOf(targetKey);
if (targetIndex < 0) return;
reordered.splice(targetIndex + (edge === "after" ? 1 : 0), 0, draggedSessionKey);
onReorderSessions(reordered);
const groupedKeys = new Set(keys);
onReorderSessions([
...reordered,
...sessionOrder.filter((key) => !groupedKeys.has(key)),
]);
};
return (