mirror of
https://github.com/AutoMaker-Org/automaker.git
synced 2026-03-18 22:33:08 +00:00
Feature: File Editor (#789)
* feat: Add file management feature * feat: Add auto-save functionality to file editor * fix: Replace HardDriveDownload icon with Save icon for consistency * fix: Prevent recursive copy/move and improve shell injection prevention * refactor: Extract editor settings form into separate component
This commit is contained in:
@@ -343,6 +343,10 @@ const initialState: AppState = {
|
||||
skipSandboxWarning: false,
|
||||
mcpServers: [],
|
||||
defaultEditorCommand: null,
|
||||
editorFontSize: 13,
|
||||
editorFontFamily: 'default',
|
||||
editorAutoSave: false,
|
||||
editorAutoSaveDelay: 1000,
|
||||
defaultTerminalId: null,
|
||||
enableSkills: true,
|
||||
skillsSources: ['user', 'project'] as Array<'user' | 'project'>,
|
||||
@@ -1389,6 +1393,12 @@ export const useAppStore = create<AppState & AppActions>()((set, get) => ({
|
||||
// Editor Configuration actions
|
||||
setDefaultEditorCommand: (command) => set({ defaultEditorCommand: command }),
|
||||
|
||||
// File Editor Settings actions
|
||||
setEditorFontSize: (size) => set({ editorFontSize: size }),
|
||||
setEditorFontFamily: (fontFamily) => set({ editorFontFamily: fontFamily }),
|
||||
setEditorAutoSave: (enabled) => set({ editorAutoSave: enabled }),
|
||||
setEditorAutoSaveDelay: (delay) => set({ editorAutoSaveDelay: delay }),
|
||||
|
||||
// Terminal Configuration actions
|
||||
setDefaultTerminalId: (terminalId) => set({ defaultTerminalId: terminalId }),
|
||||
|
||||
|
||||
@@ -237,6 +237,12 @@ export interface AppState {
|
||||
// Editor Configuration
|
||||
defaultEditorCommand: string | null; // Default editor for "Open In" action
|
||||
|
||||
// File Editor Settings
|
||||
editorFontSize: number; // Font size for file editor (default: 13)
|
||||
editorFontFamily: string; // Font family for file editor (default: 'default' = use theme mono font)
|
||||
editorAutoSave: boolean; // Enable auto-save for file editor (default: false)
|
||||
editorAutoSaveDelay: number; // Auto-save delay in milliseconds (default: 1000)
|
||||
|
||||
// Terminal Configuration
|
||||
defaultTerminalId: string | null; // Default external terminal for "Open In Terminal" action (null = integrated)
|
||||
|
||||
@@ -611,6 +617,12 @@ export interface AppActions {
|
||||
// Editor Configuration actions
|
||||
setDefaultEditorCommand: (command: string | null) => void;
|
||||
|
||||
// File Editor Settings actions
|
||||
setEditorFontSize: (size: number) => void;
|
||||
setEditorFontFamily: (fontFamily: string) => void;
|
||||
setEditorAutoSave: (enabled: boolean) => void;
|
||||
setEditorAutoSaveDelay: (delay: number) => void;
|
||||
|
||||
// Terminal Configuration actions
|
||||
setDefaultTerminalId: (terminalId: string | null) => void;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user