Skip to content

Commit 74ff407

Browse files
feat: add three new UI enhancement setting toggles
- Add liveActionConsoleStore (default: true) - Add diffApprovalStore (default: false) - Add visualContextIndicatorStore (default: true) - Add corresponding update functions for persistence
1 parent 2edb2ac commit 74ff407

1 file changed

Lines changed: 24 additions & 0 deletions

File tree

app/lib/stores/settings.ts

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -131,6 +131,9 @@ const SETTINGS_KEYS = {
131131
EVENT_LOGS: 'isEventLogsEnabled',
132132
PROMPT_ID: 'promptId',
133133
DEVELOPER_MODE: 'isDeveloperMode',
134+
LIVE_ACTION_CONSOLE: 'liveActionConsoleEnabled',
135+
DIFF_APPROVAL: 'diffApprovalEnabled',
136+
VISUAL_CONTEXT_INDICATOR: 'visualContextIndicatorEnabled',
134137
} as const;
135138

136139
// Initialize settings from localStorage or defaults
@@ -160,6 +163,9 @@ const getInitialSettings = () => {
160163
eventLogs: getStoredBoolean(SETTINGS_KEYS.EVENT_LOGS, true),
161164
promptId: isBrowser ? localStorage.getItem(SETTINGS_KEYS.PROMPT_ID) || 'default' : 'default',
162165
developerMode: getStoredBoolean(SETTINGS_KEYS.DEVELOPER_MODE, false),
166+
liveActionConsole: getStoredBoolean(SETTINGS_KEYS.LIVE_ACTION_CONSOLE, true),
167+
diffApproval: getStoredBoolean(SETTINGS_KEYS.DIFF_APPROVAL, false),
168+
visualContextIndicator: getStoredBoolean(SETTINGS_KEYS.VISUAL_CONTEXT_INDICATOR, true),
163169
};
164170
};
165171

@@ -171,6 +177,9 @@ export const autoSelectStarterTemplate = atom<boolean>(initialSettings.autoSelec
171177
export const enableContextOptimizationStore = atom<boolean>(initialSettings.contextOptimization);
172178
export const isEventLogsEnabled = atom<boolean>(initialSettings.eventLogs);
173179
export const promptStore = atom<string>(initialSettings.promptId);
180+
export const liveActionConsoleStore = atom<boolean>(initialSettings.liveActionConsole);
181+
export const diffApprovalStore = atom<boolean>(initialSettings.diffApproval);
182+
export const visualContextIndicatorStore = atom<boolean>(initialSettings.visualContextIndicator);
174183

175184
// Helper functions to update settings with persistence
176185
export const updateLatestBranch = (enabled: boolean) => {
@@ -198,6 +207,21 @@ export const updatePromptId = (id: string) => {
198207
localStorage.setItem(SETTINGS_KEYS.PROMPT_ID, id);
199208
};
200209

210+
export const updateLiveActionConsole = (enabled: boolean) => {
211+
liveActionConsoleStore.set(enabled);
212+
localStorage.setItem(SETTINGS_KEYS.LIVE_ACTION_CONSOLE, JSON.stringify(enabled));
213+
};
214+
215+
export const updateDiffApproval = (enabled: boolean) => {
216+
diffApprovalStore.set(enabled);
217+
localStorage.setItem(SETTINGS_KEYS.DIFF_APPROVAL, JSON.stringify(enabled));
218+
};
219+
220+
export const updateVisualContextIndicator = (enabled: boolean) => {
221+
visualContextIndicatorStore.set(enabled);
222+
localStorage.setItem(SETTINGS_KEYS.VISUAL_CONTEXT_INDICATOR, JSON.stringify(enabled));
223+
};
224+
201225
// Initialize tab configuration from localStorage or defaults
202226
const getInitialTabConfiguration = (): TabWindowConfig => {
203227
const defaultConfig: TabWindowConfig = {

0 commit comments

Comments
 (0)