Skip to content

Commit

Permalink
feat(settings): make autorun setting true by default
Browse files Browse the repository at this point in the history
  • Loading branch information
Pkcarreno committed Jan 1, 2025
1 parent b09375d commit 99b5301
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions src/features/editor/stores/settings/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ export interface SettingsState {
const _useSettingsStore = create<SettingsState>()(
persist(
(set) => ({
auto_run: false,
auto_run: true,
auto_run_timeout: 1500,
loop_safeguard_threshold: 1000,
loop_safeguard_timeout: 30000,
Expand All @@ -51,13 +51,16 @@ const _useSettingsStore = create<SettingsState>()(
}),
{
name: 'settings-storage',
version: 1,
version: 2,
migrate: (persistedState, version) => {
if (version === 0) {
(persistedState as SettingsState).vimMode = false;
(persistedState as SettingsState).debugMode = false;
(persistedState as SettingsState).loop_safeguard_threshold = 1000;
}
if (version === 1) {
(persistedState as SettingsState).auto_run = true;
}

return persistedState;
},
Expand Down

0 comments on commit 99b5301

Please sign in to comment.