mirror of
https://github.com/stackblitz-labs/bolt.diy
synced 2025-03-09 21:50:36 +00:00
Update FeaturesTab.tsx
Bug fix : Preserve Settings FeatureTab
This commit is contained in:
parent
a0ea69fd74
commit
79ea72ad74
@ -121,13 +121,23 @@ export default function FeaturesTab() {
|
||||
|
||||
// Enable features by default on first load
|
||||
React.useEffect(() => {
|
||||
// Force enable these features by default
|
||||
enableLatestBranch(true);
|
||||
enableContextOptimization(true);
|
||||
setAutoSelectTemplate(true);
|
||||
setPromptId('optimized');
|
||||
// Only set defaults if values are undefined
|
||||
if (isLatestBranch === undefined) {
|
||||
enableLatestBranch(true);
|
||||
}
|
||||
|
||||
if (contextOptimizationEnabled === undefined) {
|
||||
enableContextOptimization(true);
|
||||
}
|
||||
|
||||
if (autoSelectTemplate === undefined) {
|
||||
setAutoSelectTemplate(true);
|
||||
}
|
||||
|
||||
if (promptId === undefined) {
|
||||
setPromptId('optimized');
|
||||
}
|
||||
|
||||
// Only enable event logs if not explicitly set before
|
||||
if (eventLogs === undefined) {
|
||||
setEventLogs(true);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user