mirror of
https://github.com/stackblitz-labs/bolt.diy
synced 2025-03-10 06:00:19 +00:00
Default settings feature tab
This commit is contained in:
parent
7f3b5f6628
commit
10af7c9835
@ -123,23 +123,23 @@ export default function FeaturesTab() {
|
|||||||
React.useEffect(() => {
|
React.useEffect(() => {
|
||||||
// Only set defaults if values are undefined
|
// Only set defaults if values are undefined
|
||||||
if (isLatestBranch === undefined) {
|
if (isLatestBranch === undefined) {
|
||||||
enableLatestBranch(true);
|
enableLatestBranch(false); // Default: OFF - Don't auto-update from main branch
|
||||||
}
|
}
|
||||||
|
|
||||||
if (contextOptimizationEnabled === undefined) {
|
if (contextOptimizationEnabled === undefined) {
|
||||||
enableContextOptimization(true);
|
enableContextOptimization(true); // Default: ON - Enable context optimization
|
||||||
}
|
}
|
||||||
|
|
||||||
if (autoSelectTemplate === undefined) {
|
if (autoSelectTemplate === undefined) {
|
||||||
setAutoSelectTemplate(true);
|
setAutoSelectTemplate(true); // Default: ON - Enable auto-select templates
|
||||||
}
|
}
|
||||||
|
|
||||||
if (promptId === undefined) {
|
if (promptId === undefined) {
|
||||||
setPromptId('optimized');
|
setPromptId('default'); // Default: 'default'
|
||||||
}
|
}
|
||||||
|
|
||||||
if (eventLogs === undefined) {
|
if (eventLogs === undefined) {
|
||||||
setEventLogs(true);
|
setEventLogs(true); // Default: ON - Enable event logging
|
||||||
}
|
}
|
||||||
}, []); // Only run once on component mount
|
}, []); // Only run once on component mount
|
||||||
|
|
||||||
|
@ -155,11 +155,11 @@ const getInitialSettings = () => {
|
|||||||
};
|
};
|
||||||
|
|
||||||
return {
|
return {
|
||||||
latestBranch: getStoredBoolean(SETTINGS_KEYS.LATEST_BRANCH, true),
|
latestBranch: getStoredBoolean(SETTINGS_KEYS.LATEST_BRANCH, false),
|
||||||
autoSelectTemplate: getStoredBoolean(SETTINGS_KEYS.AUTO_SELECT_TEMPLATE, true),
|
autoSelectTemplate: getStoredBoolean(SETTINGS_KEYS.AUTO_SELECT_TEMPLATE, true),
|
||||||
contextOptimization: getStoredBoolean(SETTINGS_KEYS.CONTEXT_OPTIMIZATION, true),
|
contextOptimization: getStoredBoolean(SETTINGS_KEYS.CONTEXT_OPTIMIZATION, true),
|
||||||
eventLogs: getStoredBoolean(SETTINGS_KEYS.EVENT_LOGS, true),
|
eventLogs: getStoredBoolean(SETTINGS_KEYS.EVENT_LOGS, true),
|
||||||
localModels: getStoredBoolean(SETTINGS_KEYS.LOCAL_MODELS, true),
|
localModels: getStoredBoolean(SETTINGS_KEYS.LOCAL_MODELS, false),
|
||||||
promptId: isBrowser ? localStorage.getItem(SETTINGS_KEYS.PROMPT_ID) || 'default' : 'default',
|
promptId: isBrowser ? localStorage.getItem(SETTINGS_KEYS.PROMPT_ID) || 'default' : 'default',
|
||||||
developerMode: getStoredBoolean(SETTINGS_KEYS.DEVELOPER_MODE, false),
|
developerMode: getStoredBoolean(SETTINGS_KEYS.DEVELOPER_MODE, false),
|
||||||
};
|
};
|
||||||
|
Loading…
Reference in New Issue
Block a user