File tree Expand file tree Collapse file tree 1 file changed +22
-1
lines changed Expand file tree Collapse file tree 1 file changed +22
-1
lines changed Original file line number Diff line number Diff line change @@ -6840,7 +6840,28 @@ function initPromptSelect(
68406840 'input[type="checkbox"]',
68416841 );
68426842 const checked = Array.from(checkboxes).filter((cb) => cb.checked);
6843- const count = checked.length;
6843+
6844+ // Determine count: if Select All mode is active, use the stored allPromptIds
6845+ const selectAllInput = container.querySelector(
6846+ 'input[name="selectAllPrompts"]',
6847+ );
6848+ const allIdsInput = container.querySelector(
6849+ 'input[name="allPromptIds"]',
6850+ );
6851+
6852+ let count = checked.length;
6853+ if (
6854+ selectAllInput &&
6855+ selectAllInput.value === "true" &&
6856+ allIdsInput
6857+ ) {
6858+ try {
6859+ const allIds = JSON.parse(allIdsInput.value);
6860+ count = allIds.length;
6861+ } catch (e) {
6862+ console.error("Error parsing allPromptIds:", e);
6863+ }
6864+ }
68446865
68456866 // Rebuild pills safely - show first 3, then summarize the rest
68466867 pillsBox.innerHTML = "";
You can’t perform that action at this time.
0 commit comments