mirror of
https://github.com/stackblitz-labs/bolt.diy
synced 2025-05-02 03:14:11 +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
|
// 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);
|
||||||
}
|
}
|
||||||
|
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