mirror of
https://github.com/stackblitz-labs/bolt.diy
synced 2025-03-09 21:50:36 +00:00
fix: bug fix New UI / Feature tab - Default values hard-coded
It was not possible to change "Context Optimization" and "Prompt Library".
This commit is contained in:
commit
294adfdd1b
@ -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);
|
||||
}
|
||||
|
15163
pnpm-lock.yaml
15163
pnpm-lock.yaml
File diff suppressed because it is too large
Load Diff
Loading…
Reference in New Issue
Block a user