$92 GRAYBYTE WORDPRESS FILE MANAGER $38

SERVER : premium201.web-hosting.com #1 SMP Wed Mar 26 12:08:09 UTC 2025
SERVER IP : 172.67.217.254 | ADMIN IP 216.73.216.180
OPTIONS : CRL = ON | WGT = ON | SDO = OFF | PKEX = OFF
DEACTIVATED : mail

/home/bravrvjk/dantho.rw/wp-content/plugins/extendify/src/HelpCenter/state/

HOME
Current File : /home/bravrvjk/dantho.rw/wp-content/plugins/extendify/src/HelpCenter/state//ai-chat.js
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),
	}),
);


Current_dir [ WRITEABLE ] Document_root [ NOT WRITEABLE ]


[ Back ]
NAME
SIZE
LAST TOUCH
USER
CAN-I?
FUNCTIONS
..
--
6 Nov 2025 10.43 AM
bravrvjk / bravrvjk
0755
ai-chat.js
1.138 KB
13 Mar 2025 9.10 PM
bravrvjk / bravrvjk
0644
globals-sync.js
0.67 KB
13 Mar 2025 9.10 PM
bravrvjk / bravrvjk
0644
knowledge-base.js
2.225 KB
13 Mar 2025 9.10 PM
bravrvjk / bravrvjk
0644
tours.js
6.555 KB
28 Aug 2024 7.51 PM
bravrvjk / bravrvjk
0644
user-selections.js
0.974 KB
27 Aug 2025 5.47 PM
bravrvjk / bravrvjk
0644

GRAYBYTE WORDPRESS FILE MANAGER @ 2025 CONTACT ME
Static GIF