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
|
// Enable features by default on first load
|
||||||
React.useEffect(() => {
|
React.useEffect(() => {
|
||||||
// Force enable these features by default
|
// Only set defaults if values are undefined
|
||||||
enableLatestBranch(true);
|
if (isLatestBranch === undefined) {
|
||||||
enableContextOptimization(true);
|
enableLatestBranch(true);
|
||||||
setAutoSelectTemplate(true);
|
}
|
||||||
setPromptId('optimized');
|
|
||||||
|
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) {
|
if (eventLogs === undefined) {
|
||||||
setEventLogs(true);
|
setEventLogs(true);
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user