mirror of
https://github.com/AutoMaker-Org/automaker.git
synced 2026-03-18 22:33:08 +00:00
Fix event hooks not persisting across server syncs (#799)
* Changes from fix/event-hook-persistence * feat: Add explicit permission escape hatch for clearing eventHooks and improve error handling in UI
This commit is contained in:
@@ -1415,7 +1415,15 @@ export const useAppStore = create<AppState & AppActions>()((set, get) => ({
|
||||
},
|
||||
|
||||
// Event Hook actions
|
||||
setEventHooks: (hooks) => set({ eventHooks: hooks }),
|
||||
setEventHooks: async (hooks) => {
|
||||
set({ eventHooks: hooks });
|
||||
try {
|
||||
const httpApi = getHttpApiClient();
|
||||
await httpApi.settings.updateGlobal({ eventHooks: hooks });
|
||||
} catch (error) {
|
||||
logger.error('Failed to sync event hooks:', error);
|
||||
}
|
||||
},
|
||||
|
||||
// Claude-Compatible Provider actions (new system)
|
||||
addClaudeCompatibleProvider: async (provider) => {
|
||||
|
||||
@@ -634,7 +634,7 @@ export interface AppActions {
|
||||
setPromptCustomization: (customization: PromptCustomization) => Promise<void>;
|
||||
|
||||
// Event Hook actions
|
||||
setEventHooks: (hooks: EventHook[]) => void;
|
||||
setEventHooks: (hooks: EventHook[]) => Promise<void>;
|
||||
|
||||
// Claude-Compatible Provider actions (new system)
|
||||
addClaudeCompatibleProvider: (provider: ClaudeCompatibleProvider) => Promise<void>;
|
||||
|
||||
Reference in New Issue
Block a user