mirror of
https://github.com/lukaszraczylo/traefik-llmgateway.git
synced 2026-11-26 10:06:31 +00:00
27 lines
953 B
TypeScript
27 lines
953 B
TypeScript
import { useCatalogStore } from '@/stores/catalog'
|
|
import { useConfigStore } from '@/stores/config'
|
|
import { useConsumersStore } from '@/stores/consumers'
|
|
import { useDashboardStore } from '@/stores/dashboard'
|
|
import { useEventsStore } from '@/stores/events'
|
|
import { useModelsStore } from '@/stores/models'
|
|
import { useOverviewStore } from '@/stores/overview'
|
|
import { useReliabilityStore } from '@/stores/reliability'
|
|
import { useSpendStore } from '@/stores/spend'
|
|
|
|
/** resetSessionData drops every store that holds admin API data, so a different key never shows the previous key's numbers. Filters, nav and toasts are UI state and stay. */
|
|
export function resetSessionData(): void {
|
|
for (const store of [
|
|
useCatalogStore(),
|
|
useConfigStore(),
|
|
useConsumersStore(),
|
|
useDashboardStore(),
|
|
useEventsStore(),
|
|
useModelsStore(),
|
|
useOverviewStore(),
|
|
useReliabilityStore(),
|
|
useSpendStore(),
|
|
]) {
|
|
store.$reset()
|
|
}
|
|
}
|