Current Path: > home > codekrsu > > ameliagraphics.com > wp-content > plugins > > extendify > src > HelpCenter > > state
Operation : Linux premium131.web-hosting.com 4.18.0-553.44.1.lve.el8.x86_64 #1 SMP Thu Mar 13 14:29:12 UTC 2025 x86_64 Software : Apache Server IP : 162.0.232.56 | Your IP: 216.73.216.111 Domains : 1034 Domain(s) Permission : [ 0755 ]
Name | Type | Size | Last Modified | Actions |
---|---|---|---|---|
ai-chat.js | File | 1165 bytes | March 13 2025 21:10:44. | |
globals-sync.js | File | 686 bytes | March 13 2025 21:10:44. | |
knowledge-base.js | File | 2278 bytes | March 13 2025 21:10:44. | |
tours.js | File | 6712 bytes | August 28 2024 19:51:40. | |
user-selections.js | File | 1005 bytes | December 19 2024 22:43:36. |
import { create } from 'zustand'; import { devtools, persist, createJSONStorage } from 'zustand/middleware'; const initialState = { experienceLevel: 'beginner', currentQuestion: undefined, }; const state = (set, get) => ({ history: [], ...initialState, setCurrentQuestion: (currentQuestion) => set({ currentQuestion }), setExperienceLevel: (experienceLevel) => set({ experienceLevel }), addHistory: (question) => set((state) => ({ // Save the latest 10 history: [ question, ...state.history .filter(({ answerId }) => answerId !== question.answerId) .slice(0, 9), ], })), hasHistory: () => get().history.length > 0, clearHistory: () => set({ history: [] }), deleteFromHistory: (question) => set((state) => ({ history: state.history.filter( ({ answerId: id }) => id !== question.answerId, ), })), historyCount: () => get().history.length, reset: () => set({ ...initialState }), }); export const useAIChatStore = create( persist(devtools(state, { name: 'Extendify Chat History' }), { name: `extendify-chat-history-${window.extSharedData.siteId}`, storage: createJSONStorage(() => localStorage), }), );
SILENT KILLER Tool