@@ -6,7 +6,9 @@ import { useColorPaletteService } from '@/services/colorPaletteService'
66import { useDialogService } from '@/services/dialogService'
77import type { SidebarTabExtension , ToastManager } from '@/types/extensionTypes'
88
9+ import { useApiKeyAuthStore } from './apiKeyAuthStore'
910import { useCommandStore } from './commandStore'
11+ import { useFirebaseAuthStore } from './firebaseAuthStore'
1012import { useQueueSettingsStore } from './queueStore'
1113import { useSettingStore } from './settingStore'
1214import { useToastStore } from './toastStore'
@@ -43,6 +45,18 @@ export const useWorkspaceStore = defineStore('workspace', () => {
4345 const dialog = useDialogService ( )
4446 const bottomPanel = useBottomPanelStore ( )
4547
48+ const authStore = useFirebaseAuthStore ( )
49+ const apiKeyStore = useApiKeyAuthStore ( )
50+
51+ const firebaseUser = computed ( ( ) => authStore . currentUser )
52+ const isApiKeyLogin = computed ( ( ) => apiKeyStore . isAuthenticated )
53+ const isLoggedIn = computed (
54+ ( ) => ! ! isApiKeyLogin . value || firebaseUser . value !== null
55+ )
56+ const partialUserStore = {
57+ isLoggedIn
58+ }
59+
4660 /**
4761 * Registers a sidebar tab.
4862 * @param tab The sidebar tab to register.
@@ -86,6 +100,7 @@ export const useWorkspaceStore = defineStore('workspace', () => {
86100 colorPalette,
87101 dialog,
88102 bottomPanel,
103+ user : partialUserStore ,
89104
90105 registerSidebarTab,
91106 unregisterSidebarTab,
0 commit comments