Spaces:
Sleeping
Sleeping
NeonClary Cursor commited on
Commit ·
de1db91
1
Parent(s): e661e91
fix(ui): honor disabled human in auto-select; rename Transparency to View Prompts
Browse filesAuto-select no longer prepends a human participant when they are turned
off in the sidebar, and buildStartPayload always filters by enabledMap
even when an override list is supplied.
Rename the Settings accordion header from Transparency to View Prompts.
Co-authored-by: Cursor <cursoragent@cursor.com>
- frontend/src/App.js +14 -7
- frontend/src/components/DevMenu.js +3 -3
frontend/src/App.js
CHANGED
|
@@ -563,8 +563,13 @@ export default function App() {
|
|
| 563 |
// selectedParticipants-derived list (used by the auto-select flow
|
| 564 |
// because the freshly-chosen list isn't in state yet when we need it).
|
| 565 |
const buildStartPayload = useCallback((theQuestion, participantsOverride) => {
|
| 566 |
-
|
| 567 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 568 |
const participants = baseList.map(p => ({
|
| 569 |
participant_id: p.participant_id,
|
| 570 |
kind: p.kind || (p.participant_id.startsWith('neon:') ? 'neon'
|
|
@@ -687,9 +692,11 @@ export default function App() {
|
|
| 687 |
|| p.model_id || p.default_model_id || '',
|
| 688 |
}));
|
| 689 |
try {
|
| 690 |
-
//
|
| 691 |
-
//
|
| 692 |
-
const
|
|
|
|
|
|
|
| 693 |
const llmTarget = Math.max(2, maxParticipants - humanReserved);
|
| 694 |
const result = await autoSelectParticipants({
|
| 695 |
question: theQuestion.trim(),
|
|
@@ -701,7 +708,7 @@ export default function App() {
|
|
| 701 |
const chosenLlms = chosenIds
|
| 702 |
.map(id => allCatalogParticipants[id])
|
| 703 |
.filter(Boolean);
|
| 704 |
-
resolvedParticipants = humanCatalogEntry
|
| 705 |
? [humanCatalogEntry, ...chosenLlms]
|
| 706 |
: chosenLlms;
|
| 707 |
if (resolvedParticipants.length < 2) {
|
|
@@ -879,7 +886,7 @@ export default function App() {
|
|
| 879 |
}, [
|
| 880 |
buildStartPayload, enabledSelectedCount, dailyLimit,
|
| 881 |
autoSelectMode, allCatalogParticipants, modelAssignments,
|
| 882 |
-
maxParticipants, orchestratorModel,
|
| 883 |
humanParticipant, humanCatalogEntry,
|
| 884 |
]);
|
| 885 |
|
|
|
|
| 563 |
// selectedParticipants-derived list (used by the auto-select flow
|
| 564 |
// because the freshly-chosen list isn't in state yet when we need it).
|
| 565 |
const buildStartPayload = useCallback((theQuestion, participantsOverride) => {
|
| 566 |
+
// Always honor the sidebar enabled toggles, including when
|
| 567 |
+
// auto-select supplies a participantsOverride list (which used to
|
| 568 |
+
// bypass enabledMap and always prepend a disabled human).
|
| 569 |
+
const sourceList = participantsOverride ?? selectedParticipants;
|
| 570 |
+
const baseList = sourceList.filter(
|
| 571 |
+
p => enabledMap[p.participant_id] !== false,
|
| 572 |
+
);
|
| 573 |
const participants = baseList.map(p => ({
|
| 574 |
participant_id: p.participant_id,
|
| 575 |
kind: p.kind || (p.participant_id.startsWith('neon:') ? 'neon'
|
|
|
|
| 692 |
|| p.model_id || p.default_model_id || '',
|
| 693 |
}));
|
| 694 |
try {
|
| 695 |
+
// Reserve a seat for the human only when they are enabled in
|
| 696 |
+
// the sidebar; a disabled human should not be auto-included.
|
| 697 |
+
const humanEnabled = humanParticipant
|
| 698 |
+
&& enabledMap[humanParticipant.participant_id] !== false;
|
| 699 |
+
const humanReserved = humanEnabled ? 1 : 0;
|
| 700 |
const llmTarget = Math.max(2, maxParticipants - humanReserved);
|
| 701 |
const result = await autoSelectParticipants({
|
| 702 |
question: theQuestion.trim(),
|
|
|
|
| 708 |
const chosenLlms = chosenIds
|
| 709 |
.map(id => allCatalogParticipants[id])
|
| 710 |
.filter(Boolean);
|
| 711 |
+
resolvedParticipants = humanEnabled && humanCatalogEntry
|
| 712 |
? [humanCatalogEntry, ...chosenLlms]
|
| 713 |
: chosenLlms;
|
| 714 |
if (resolvedParticipants.length < 2) {
|
|
|
|
| 886 |
}, [
|
| 887 |
buildStartPayload, enabledSelectedCount, dailyLimit,
|
| 888 |
autoSelectMode, allCatalogParticipants, modelAssignments,
|
| 889 |
+
maxParticipants, orchestratorModel, enabledMap,
|
| 890 |
humanParticipant, humanCatalogEntry,
|
| 891 |
]);
|
| 892 |
|
frontend/src/components/DevMenu.js
CHANGED
|
@@ -25,7 +25,7 @@ import {
|
|
| 25 |
* against a fast fallback and aggressively
|
| 26 |
* substitutes failed LLMs)
|
| 27 |
* - Display options (accordion — two toggles)
|
| 28 |
-
* -
|
| 29 |
* Catalog)
|
| 30 |
* - Advanced (single item: Conversation limits…)
|
| 31 |
*
|
|
@@ -340,12 +340,12 @@ export default function DevMenu({
|
|
| 340 |
|
| 341 |
<div className="dev-panel-divider" />
|
| 342 |
|
| 343 |
-
{/* ──
|
| 344 |
{/* No right-side chevrons on the rows themselves: these
|
| 345 |
buttons open a modal and don't expand a sub-panel, so a
|
| 346 |
row-level chevron would be misleading. */}
|
| 347 |
<SectionHeader
|
| 348 |
-
label="
|
| 349 |
open={openSections.transparency}
|
| 350 |
onToggle={() => toggleSection('transparency')}
|
| 351 |
/>
|
|
|
|
| 25 |
* against a fast fallback and aggressively
|
| 26 |
* substitutes failed LLMs)
|
| 27 |
* - Display options (accordion — two toggles)
|
| 28 |
+
* - View Prompts (accordion — Credential Summary, Prompt
|
| 29 |
* Catalog)
|
| 30 |
* - Advanced (single item: Conversation limits…)
|
| 31 |
*
|
|
|
|
| 340 |
|
| 341 |
<div className="dev-panel-divider" />
|
| 342 |
|
| 343 |
+
{/* ── View Prompts (accordion) ───────────────────────── */}
|
| 344 |
{/* No right-side chevrons on the rows themselves: these
|
| 345 |
buttons open a modal and don't expand a sub-panel, so a
|
| 346 |
row-level chevron would be misleading. */}
|
| 347 |
<SectionHeader
|
| 348 |
+
label="View Prompts"
|
| 349 |
open={openSections.transparency}
|
| 350 |
onToggle={() => toggleSection('transparency')}
|
| 351 |
/>
|