Spaces:
Sleeping
Sleeping
NeonClary Cursor commited on
Commit ·
6cac4f0
1
Parent(s): 6a3a7e1
settings: drop Response Priority, make dev panel scrollable
Browse filesRemoves the "Prioritize model choice / Prioritize conversation
speed" toggle from the settings menu (and its plumbing in App.js
and the speedPriority/setSpeedPriority handlers) - the racing logic
is no longer surfaced as a user choice.
Caps the settings dropdown at calc(100vh - 80px) with overflow-y:
auto so the menu always fits in the viewport and long content
scrolls inside the panel instead of bleeding off the bottom.
Co-authored-by: Cursor <cursoragent@cursor.com>
- frontend/src/App.js +1 -11
- frontend/src/components/DevMenu.js +0 -19
- frontend/src/styles/components.css +7 -0
frontend/src/App.js
CHANGED
|
@@ -11,7 +11,7 @@ import PromptCatalogModal from './components/PromptCatalogModal';
|
|
| 11 |
import {
|
| 12 |
fetchModels, fetchPersonas, fetchDemoQuestions,
|
| 13 |
startChat, continueChat, getOrchestrator, setOrchestrator,
|
| 14 |
-
|
| 15 |
exportChat, exportApiLog, fetchTableView, fetchCredentials,
|
| 16 |
fetchConversationLimitsDefaults,
|
| 17 |
autoSelectParticipants,
|
|
@@ -50,7 +50,6 @@ export default function App() {
|
|
| 50 |
const [demoQuestions, setDemoQuestions] = useState([]);
|
| 51 |
|
| 52 |
// Display options
|
| 53 |
-
const [speedPriority, setSpeedPriorityState] = useState(false);
|
| 54 |
const [showResponseTime, setShowResponseTime] = useState(false);
|
| 55 |
const [showChatStats, setShowChatStats] = useState(false);
|
| 56 |
|
|
@@ -123,7 +122,6 @@ export default function App() {
|
|
| 123 |
setOrchestratorModelState(d.model_id);
|
| 124 |
}
|
| 125 |
}).catch(() => {});
|
| 126 |
-
getSpeedPriority().then(d => setSpeedPriorityState(!!d.enabled)).catch(() => {});
|
| 127 |
getAuthStatus().then(setAuth).catch(() => {});
|
| 128 |
getRateLimitStatus().then(d => {
|
| 129 |
if (d?.daily_limit) setDailyLimit(d.daily_limit);
|
|
@@ -191,12 +189,6 @@ export default function App() {
|
|
| 191 |
const handleSummarizerChange = useCallback((modelId) => {
|
| 192 |
setSummarizerModelState(modelId || null);
|
| 193 |
}, []);
|
| 194 |
-
const handleSpeedPriorityChange = useCallback(async (enabled) => {
|
| 195 |
-
try {
|
| 196 |
-
await setSpeedPriority(enabled);
|
| 197 |
-
setSpeedPriorityState(enabled);
|
| 198 |
-
} catch (err) { console.error('Failed to set speed priority:', err); }
|
| 199 |
-
}, []);
|
| 200 |
const handleMaxParticipantsChange = useCallback((n) => {
|
| 201 |
const clamped = Math.max(3, Math.min(9, n));
|
| 202 |
setMaxParticipants(clamped);
|
|
@@ -662,8 +654,6 @@ export default function App() {
|
|
| 662 |
onOrchestratorChange={handleOrchestratorChange}
|
| 663 |
summarizerModel={summarizerModel}
|
| 664 |
onSummarizerChange={handleSummarizerChange}
|
| 665 |
-
speedPriority={speedPriority}
|
| 666 |
-
onSpeedPriorityChange={handleSpeedPriorityChange}
|
| 667 |
showResponseTime={showResponseTime}
|
| 668 |
onShowResponseTimeChange={setShowResponseTime}
|
| 669 |
showChatStats={showChatStats}
|
|
|
|
| 11 |
import {
|
| 12 |
fetchModels, fetchPersonas, fetchDemoQuestions,
|
| 13 |
startChat, continueChat, getOrchestrator, setOrchestrator,
|
| 14 |
+
getAuthStatus,
|
| 15 |
exportChat, exportApiLog, fetchTableView, fetchCredentials,
|
| 16 |
fetchConversationLimitsDefaults,
|
| 17 |
autoSelectParticipants,
|
|
|
|
| 50 |
const [demoQuestions, setDemoQuestions] = useState([]);
|
| 51 |
|
| 52 |
// Display options
|
|
|
|
| 53 |
const [showResponseTime, setShowResponseTime] = useState(false);
|
| 54 |
const [showChatStats, setShowChatStats] = useState(false);
|
| 55 |
|
|
|
|
| 122 |
setOrchestratorModelState(d.model_id);
|
| 123 |
}
|
| 124 |
}).catch(() => {});
|
|
|
|
| 125 |
getAuthStatus().then(setAuth).catch(() => {});
|
| 126 |
getRateLimitStatus().then(d => {
|
| 127 |
if (d?.daily_limit) setDailyLimit(d.daily_limit);
|
|
|
|
| 189 |
const handleSummarizerChange = useCallback((modelId) => {
|
| 190 |
setSummarizerModelState(modelId || null);
|
| 191 |
}, []);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 192 |
const handleMaxParticipantsChange = useCallback((n) => {
|
| 193 |
const clamped = Math.max(3, Math.min(9, n));
|
| 194 |
setMaxParticipants(clamped);
|
|
|
|
| 654 |
onOrchestratorChange={handleOrchestratorChange}
|
| 655 |
summarizerModel={summarizerModel}
|
| 656 |
onSummarizerChange={handleSummarizerChange}
|
|
|
|
|
|
|
| 657 |
showResponseTime={showResponseTime}
|
| 658 |
onShowResponseTimeChange={setShowResponseTime}
|
| 659 |
showChatStats={showChatStats}
|
frontend/src/components/DevMenu.js
CHANGED
|
@@ -21,8 +21,6 @@ export default function DevMenu({
|
|
| 21 |
onOrchestratorChange,
|
| 22 |
summarizerModel,
|
| 23 |
onSummarizerChange,
|
| 24 |
-
speedPriority,
|
| 25 |
-
onSpeedPriorityChange,
|
| 26 |
showResponseTime,
|
| 27 |
onShowResponseTimeChange,
|
| 28 |
showChatStats,
|
|
@@ -180,23 +178,6 @@ export default function DevMenu({
|
|
| 180 |
);
|
| 181 |
})}
|
| 182 |
|
| 183 |
-
<div className="dev-panel-divider" />
|
| 184 |
-
<div className="dev-panel-label">Response priority</div>
|
| 185 |
-
<button
|
| 186 |
-
className={`dev-panel-choice ${!speedPriority ? 'dev-panel-choice-active' : ''}`}
|
| 187 |
-
onClick={() => onSpeedPriorityChange(false)}
|
| 188 |
-
>
|
| 189 |
-
{!speedPriority ? <CheckSquare size={16} className="dev-check-icon" /> : <Square size={16} className="dev-check-icon" />}
|
| 190 |
-
Prioritize model choice
|
| 191 |
-
</button>
|
| 192 |
-
<button
|
| 193 |
-
className={`dev-panel-choice ${speedPriority ? 'dev-panel-choice-active' : ''}`}
|
| 194 |
-
onClick={() => onSpeedPriorityChange(true)}
|
| 195 |
-
>
|
| 196 |
-
{speedPriority ? <CheckSquare size={16} className="dev-check-icon" /> : <Square size={16} className="dev-check-icon" />}
|
| 197 |
-
Prioritize conversation speed
|
| 198 |
-
</button>
|
| 199 |
-
|
| 200 |
<div className="dev-panel-divider" />
|
| 201 |
<div className="dev-panel-label">Display options</div>
|
| 202 |
<button
|
|
|
|
| 21 |
onOrchestratorChange,
|
| 22 |
summarizerModel,
|
| 23 |
onSummarizerChange,
|
|
|
|
|
|
|
| 24 |
showResponseTime,
|
| 25 |
onShowResponseTimeChange,
|
| 26 |
showChatStats,
|
|
|
|
| 178 |
);
|
| 179 |
})}
|
| 180 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 181 |
<div className="dev-panel-divider" />
|
| 182 |
<div className="dev-panel-label">Display options</div>
|
| 183 |
<button
|
frontend/src/styles/components.css
CHANGED
|
@@ -747,6 +747,13 @@
|
|
| 747 |
top: 100%;
|
| 748 |
margin-top: 4px;
|
| 749 |
min-width: 220px;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 750 |
background: var(--card-bg);
|
| 751 |
border: 1px solid var(--border-primary);
|
| 752 |
border-radius: 10px;
|
|
|
|
| 747 |
top: 100%;
|
| 748 |
margin-top: 4px;
|
| 749 |
min-width: 220px;
|
| 750 |
+
/* Cap the panel at a bit less than the viewport so it never extends
|
| 751 |
+
past the bottom of the window; long content scrolls within. The
|
| 752 |
+
16px subtraction leaves a comfortable gap for shadow + breathing
|
| 753 |
+
room beneath the header. */
|
| 754 |
+
max-height: calc(100vh - 80px);
|
| 755 |
+
overflow-y: auto;
|
| 756 |
+
overscroll-behavior: contain;
|
| 757 |
background: var(--card-bg);
|
| 758 |
border: 1px solid var(--border-primary);
|
| 759 |
border-radius: 10px;
|