mirror of
https://github.com/nocodb/nocodb.git
synced 2026-04-25 06:25:29 +00:00
Merge pull request #12980 from nocodb/nc-fix/disable-ai-fill
fix: AI fill handle
This commit is contained in:
@@ -240,6 +240,7 @@ export function useCanvasTable({
|
|||||||
const { meta: metaKey, ctrl: ctrlKey } = useMagicKeys()
|
const { meta: metaKey, ctrl: ctrlKey } = useMagicKeys()
|
||||||
const { isDataReadOnly, isUIAllowed } = useRoles()
|
const { isDataReadOnly, isUIAllowed } = useRoles()
|
||||||
const { isAiFeaturesEnabled, aiIntegrations, isNocoAiAvailable, generateRows: _generateRows } = useNocoAi()
|
const { isAiFeaturesEnabled, aiIntegrations, isNocoAiAvailable, generateRows: _generateRows } = useNocoAi()
|
||||||
|
const { isFeatureEnabled } = useBetaFeatureToggle()
|
||||||
const scriptStore = useScriptStore()
|
const scriptStore = useScriptStore()
|
||||||
const tooltipStore = useTooltipStore()
|
const tooltipStore = useTooltipStore()
|
||||||
const { blockExternalSourceRecordVisibility, blockRowColoring } = useEeConfig()
|
const { blockExternalSourceRecordVisibility, blockRowColoring } = useEeConfig()
|
||||||
@@ -327,7 +328,9 @@ export function useCanvasTable({
|
|||||||
|
|
||||||
const headerRowHeight = computed(() => (isMobileMode.value ? 40 : COLUMN_HEADER_HEIGHT_IN_PX))
|
const headerRowHeight = computed(() => (isMobileMode.value ? 40 : COLUMN_HEADER_HEIGHT_IN_PX))
|
||||||
|
|
||||||
const isAiFillMode = computed(() => (isMac() ? !!metaKey?.value : !!ctrlKey?.value) && isAiFeaturesEnabled.value)
|
const isAiFillMode = computed(
|
||||||
|
() => (isMac() ? !!metaKey?.value : !!ctrlKey?.value) && isAiFeaturesEnabled && isFeatureEnabled(FEATURE_FLAG.AI_FILL_HANDLE),
|
||||||
|
)
|
||||||
|
|
||||||
const fetchMetaIds = ref<string[][]>([])
|
const fetchMetaIds = ref<string[][]>([])
|
||||||
const isLoadingMetas = ref(false)
|
const isLoadingMetas = ref(false)
|
||||||
|
|||||||
@@ -173,6 +173,15 @@ const FEATURES = [
|
|||||||
version: 3,
|
version: 3,
|
||||||
isEE: true,
|
isEE: true,
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
id: 'ai_fill_handle',
|
||||||
|
title: 'AI Fill Handle',
|
||||||
|
description: 'Use AI to fill data in cells based on existing data patterns.',
|
||||||
|
enabled: false,
|
||||||
|
version: 1,
|
||||||
|
isEngineering: true,
|
||||||
|
isEE: true,
|
||||||
|
},
|
||||||
] as const
|
] as const
|
||||||
|
|
||||||
export const FEATURE_FLAG = Object.fromEntries(FEATURES.map((feature) => [feature.id.toUpperCase(), feature.id])) as Record<
|
export const FEATURE_FLAG = Object.fromEntries(FEATURES.map((feature) => [feature.id.toUpperCase(), feature.id])) as Record<
|
||||||
|
|||||||
@@ -98,7 +98,7 @@ export function useMultiSelect(
|
|||||||
|
|
||||||
const { meta: metaKey } = useMagicKeys()
|
const { meta: metaKey } = useMagicKeys()
|
||||||
|
|
||||||
const { isAiFeaturesEnabled } = useNocoAi()
|
const { isFeatureEnabled } = useBetaFeatureToggle()
|
||||||
|
|
||||||
const { isSqlView, isExternalSource } = useSmartsheetStoreOrThrow()
|
const { isSqlView, isExternalSource } = useSmartsheetStoreOrThrow()
|
||||||
|
|
||||||
@@ -1878,7 +1878,7 @@ export function useMultiSelect(
|
|||||||
}
|
}
|
||||||
|
|
||||||
isFillMode.value = true
|
isFillMode.value = true
|
||||||
if (metaKey?.value && isAiFeaturesEnabled.value) {
|
if (metaKey?.value && isFeatureEnabled(FEATURE_FLAG.AI_FILL_HANDLE)) {
|
||||||
aiMode.value = true
|
aiMode.value = true
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user