mirror of
https://github.com/AutoMaker-Org/automaker.git
synced 2026-03-18 22:33:08 +00:00
Improve auto-loop event emission and add ntfy notifications (#821)
This commit is contained in:
@@ -361,6 +361,7 @@ const initialState: AppState = {
|
||||
subagentsSources: ['user', 'project'] as Array<'user' | 'project'>,
|
||||
promptCustomization: {},
|
||||
eventHooks: [],
|
||||
ntfyEndpoints: [],
|
||||
featureTemplates: DEFAULT_GLOBAL_SETTINGS.featureTemplates ?? [],
|
||||
claudeCompatibleProviders: [],
|
||||
claudeApiProfiles: [],
|
||||
@@ -1501,6 +1502,17 @@ export const useAppStore = create<AppState & AppActions>()((set, get) => ({
|
||||
}
|
||||
},
|
||||
|
||||
// Ntfy Endpoint actions
|
||||
setNtfyEndpoints: async (endpoints) => {
|
||||
set({ ntfyEndpoints: endpoints });
|
||||
try {
|
||||
const httpApi = getHttpApiClient();
|
||||
await httpApi.settings.updateGlobal({ ntfyEndpoints: endpoints });
|
||||
} catch (error) {
|
||||
logger.error('Failed to sync ntfy endpoints:', error);
|
||||
}
|
||||
},
|
||||
|
||||
// Feature Template actions
|
||||
setFeatureTemplates: async (templates) => {
|
||||
set({ featureTemplates: templates });
|
||||
|
||||
@@ -18,6 +18,7 @@ import type {
|
||||
ModelDefinition,
|
||||
ServerLogLevel,
|
||||
EventHook,
|
||||
NtfyEndpointConfig,
|
||||
ClaudeApiProfile,
|
||||
ClaudeCompatibleProvider,
|
||||
SidebarStyle,
|
||||
@@ -275,6 +276,9 @@ export interface AppState {
|
||||
// Event Hooks
|
||||
eventHooks: EventHook[]; // Event hooks for custom commands or webhooks
|
||||
|
||||
// Ntfy.sh Notification Endpoints
|
||||
ntfyEndpoints: NtfyEndpointConfig[]; // Configured ntfy.sh endpoints for push notifications
|
||||
|
||||
// Feature Templates
|
||||
featureTemplates: FeatureTemplate[]; // Feature templates for quick task creation
|
||||
|
||||
@@ -675,6 +679,9 @@ export interface AppActions {
|
||||
// Event Hook actions
|
||||
setEventHooks: (hooks: EventHook[]) => Promise<void>;
|
||||
|
||||
// Ntfy Endpoint actions
|
||||
setNtfyEndpoints: (endpoints: NtfyEndpointConfig[]) => Promise<void>;
|
||||
|
||||
// Feature Template actions
|
||||
setFeatureTemplates: (templates: FeatureTemplate[]) => Promise<void>;
|
||||
addFeatureTemplate: (template: FeatureTemplate) => Promise<void>;
|
||||
|
||||
Reference in New Issue
Block a user