fix: remove enterprise mode gating

This commit is contained in:
2026-07-12 22:19:51 +08:00
parent 813faa4cd7
commit f39943629f
17 changed files with 44 additions and 156 deletions
@@ -5,7 +5,6 @@ import { useStore } from 'dashboard/composables/store';
import Copilot from 'dashboard/components-next/copilot/Copilot.vue';
import { useMapGetter } from 'dashboard/composables/store';
import { useUISettings } from 'dashboard/composables/useUISettings';
import { useConfig } from 'dashboard/composables/useConfig';
import { useWindowSize } from '@vueuse/core';
import { vOnClickOutside } from '@vueuse/components';
import { FEATURE_FLAGS } from 'dashboard/featureFlags';
@@ -20,7 +19,6 @@ defineProps({
const store = useStore();
const { uiSettings, updateUISettings } = useUISettings();
const { isEnterprise } = useConfig();
const { width: windowWidth } = useWindowSize();
const currentUser = useMapGetter('getCurrentUser');
@@ -44,6 +42,9 @@ const currentAccountId = useMapGetter('getCurrentAccountId');
const isFeatureEnabledonAccount = useMapGetter(
'accounts/isFeatureEnabledonAccount'
);
const isCaptainEnabled = computed(() =>
isFeatureEnabledonAccount.value(currentAccountId.value, FEATURE_FLAGS.CAPTAIN)
);
const selectedAssistantId = ref(null);
@@ -85,15 +86,10 @@ const setAssistant = async assistant => {
};
const shouldShowCopilotPanel = computed(() => {
if (!isEnterprise) {
return false;
}
const isCaptainEnabled = isFeatureEnabledonAccount.value(
currentAccountId.value,
FEATURE_FLAGS.CAPTAIN
);
const { is_copilot_panel_open: isCopilotPanelOpen } = uiSettings.value;
return isCaptainEnabled && isCopilotPanelOpen && !uiFlags.value.fetchingList;
return (
isCaptainEnabled.value && isCopilotPanelOpen && !uiFlags.value.fetchingList
);
});
const handleReset = () => {
@@ -123,7 +119,7 @@ const sendMessage = async message => {
};
onMounted(() => {
if (isEnterprise) {
if (isCaptainEnabled.value) {
store.dispatch('captainAssistants/get');
}
});