diff --git a/packages/nc-gui/components/smartsheet/column/AiButtonOptions.vue b/packages/nc-gui/components/smartsheet/column/AiButtonOptions.vue index 54c8b1e3ab..3ff71f7a2a 100644 --- a/packages/nc-gui/components/smartsheet/column/AiButtonOptions.vue +++ b/packages/nc-gui/components/smartsheet/column/AiButtonOptions.vue @@ -32,10 +32,13 @@ const { formattedData, disableSubmitBtn, tableExplorerColumns, + fromTableExplorer, } = useColumnCreateStoreOrThrow() const { aiIntegrationAvailable, aiLoading, aiError, generateRows } = useNocoAi() +const { isFeatureEnabled } = useBetaFeatureToggle() + const isOpenConfigModal = ref(false) const isOpenSelectOutputFieldDropdown = ref(false) @@ -243,6 +246,14 @@ watch(isOpenSelectRecordDropdown, (newValue) => { } }) +const isAiButtonEnabled = computed(() => { + if (isEdit.value) { + return true + } + + return isFeatureEnabled(FEATURE_FLAG.AI_FEATURES) +}) + const previewPanelDom = ref() const isPreviewPanelOnScrollTop = ref(false) @@ -294,7 +305,7 @@ onBeforeUnmount(() => {