Improve auto-loop event emission and add ntfy notifications (#821)

This commit is contained in:
gsxdsm
2026-03-01 00:12:22 -08:00
committed by GitHub
parent 63b0a4fb38
commit 57bcb2802d
53 changed files with 4620 additions and 255 deletions

View File

@@ -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 });

View File

@@ -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>;