Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion app/lib/runtime/action-runner.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ import { validateCode } from './code-validator';

const logger = createScopedLogger('ActionRunner');

export type ActionStatus = 'pending' | 'running' | 'complete' | 'aborted' | 'failed';
export type ActionStatus = 'pending' | 'running' | 'complete' | 'aborted' | 'failed' | 'awaiting-approval';

export type BaseActionState = BoltAction & {
status: Exclude<ActionStatus, 'failed'>;
Expand Down
24 changes: 24 additions & 0 deletions app/lib/stores/settings.ts
Original file line number Diff line number Diff line change
Expand Up @@ -131,6 +131,9 @@ const SETTINGS_KEYS = {
EVENT_LOGS: 'isEventLogsEnabled',
PROMPT_ID: 'promptId',
DEVELOPER_MODE: 'isDeveloperMode',
LIVE_ACTION_CONSOLE: 'liveActionConsoleEnabled',
DIFF_APPROVAL: 'diffApprovalEnabled',
VISUAL_CONTEXT_INDICATOR: 'visualContextIndicatorEnabled',
} as const;

// Initialize settings from localStorage or defaults
Expand Down Expand Up @@ -160,6 +163,9 @@ const getInitialSettings = () => {
eventLogs: getStoredBoolean(SETTINGS_KEYS.EVENT_LOGS, true),
promptId: isBrowser ? localStorage.getItem(SETTINGS_KEYS.PROMPT_ID) || 'default' : 'default',
developerMode: getStoredBoolean(SETTINGS_KEYS.DEVELOPER_MODE, false),
liveActionConsole: getStoredBoolean(SETTINGS_KEYS.LIVE_ACTION_CONSOLE, true),
diffApproval: getStoredBoolean(SETTINGS_KEYS.DIFF_APPROVAL, false),
visualContextIndicator: getStoredBoolean(SETTINGS_KEYS.VISUAL_CONTEXT_INDICATOR, true),
};
};

Expand All @@ -171,6 +177,9 @@ export const autoSelectStarterTemplate = atom<boolean>(initialSettings.autoSelec
export const enableContextOptimizationStore = atom<boolean>(initialSettings.contextOptimization);
export const isEventLogsEnabled = atom<boolean>(initialSettings.eventLogs);
export const promptStore = atom<string>(initialSettings.promptId);
export const liveActionConsoleStore = atom<boolean>(initialSettings.liveActionConsole);
export const diffApprovalStore = atom<boolean>(initialSettings.diffApproval);
export const visualContextIndicatorStore = atom<boolean>(initialSettings.visualContextIndicator);

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

export const updateLiveActionConsole = (enabled: boolean) => {
liveActionConsoleStore.set(enabled);
localStorage.setItem(SETTINGS_KEYS.LIVE_ACTION_CONSOLE, JSON.stringify(enabled));
};

export const updateDiffApproval = (enabled: boolean) => {
diffApprovalStore.set(enabled);
localStorage.setItem(SETTINGS_KEYS.DIFF_APPROVAL, JSON.stringify(enabled));
};

export const updateVisualContextIndicator = (enabled: boolean) => {
visualContextIndicatorStore.set(enabled);
localStorage.setItem(SETTINGS_KEYS.VISUAL_CONTEXT_INDICATOR, JSON.stringify(enabled));
};

// Initialize tab configuration from localStorage or defaults
const getInitialTabConfiguration = (): TabWindowConfig => {
const defaultConfig: TabWindowConfig = {
Expand Down
3 changes: 3 additions & 0 deletions app/types/actions.ts
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,9 @@ export interface ActionAlert {
timestamp?: number;
command?: string;
exitCode?: number;
isStreaming?: boolean;
streamingOutput?: string;
progress?: number;
}

export interface SupabaseAlert {
Expand Down
5 changes: 5 additions & 0 deletions app/types/context.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,12 @@
export type FileCategory = 'component' | 'config' | 'style' | 'test' | 'api' | 'util' | 'other';

export type ContextAnnotation =
| {
type: 'codeContext';
files: string[];
categories?: Record<string, FileCategory>;
relevanceScores?: Record<string, number>;
selectionReason?: string;
}
| {
type: 'chatSummary';
Expand Down