| @@ -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) => { |