PluginProbe
Extendify / trunk
Extendify vtrunk
3.2.1 3.2.0 3.1.6 3.1.5 3.1.4 3.1.3 3.1.2 3.1.1 3.1.0 3.0.6 3.0.5 3.0.4 trunk 0.1.0 0.10.0 0.10.1 0.10.2 0.11.0 0.11.1 0.2.0 0.3.0 0.3.1 0.4.0 0.5.0 0.6.0 All 127 releases
← All changes | src/Agent/state/suggestions.js +11 -1 3.0.5 → trunk View file →
@@ -1,8 +1,18 @@
1 +import { enhanceDomainSuggestion } from '@agent/lib/domain-suggestion';
2 +import { notificationSuggestion } from '@agent/lib/notification-suggestion';
1 3 import { create } from 'zustand';
2 4 import { devtools, persist } from 'zustand/middleware';
3 5
4 -const pluginSuggestions = window.extAgentData?.suggestions || [];
6 +const suggestion = notificationSuggestion();
7 +const pluginSuggestions = (window.extAgentData?.suggestions || [])
8 + .map(enhanceDomainSuggestion)
9 + .concat(suggestion ? [suggestion] : [])
10 + .filter(Boolean)
11 + .map((s) => ({
12 + ...s,
13 + source: s.source ?? 'plugin',
14 + }));
5 15
6 16 const state = (set, get) => ({
7 17 suggestions: pluginSuggestions,
8 18 addSuggestions: (suggestions) => {