diff --git a/apps/easypid/.env.example b/apps/easypid/.env.example index d13e0741..0546eb1a 100644 --- a/apps/easypid/.env.example +++ b/apps/easypid/.env.example @@ -1,2 +1 @@ -EXPO_PUBLIC_WALLET_SERVICE_PROVIDER_URL= -EXPO_PUBLIC_APP_TYPE=PARADYM_WALLET # or FUNKE_WALLET \ No newline at end of file +EXPO_PUBLIC_WALLET_SERVICE_PROVIDER_URL= \ No newline at end of file diff --git a/apps/easypid/src/config/appType.ts b/apps/easypid/src/config/appType.ts deleted file mode 100644 index a3bb2f1a..00000000 --- a/apps/easypid/src/config/appType.ts +++ /dev/null @@ -1,36 +0,0 @@ -import { APP_CONFIGS } from './features' - -export const appTypes = ['FUNKE_WALLET', 'PARADYM_WALLET'] as const -export type AppType = (typeof appTypes)[number] - -const getAppType = (): AppType => { - let appType = process.env.EXPO_PUBLIC_APP_TYPE as AppType - - if (!appType) { - console.warn('⚠️ EXPO_PUBLIC_APP_TYPE not set, falling back to PARADYM_WALLET') - appType = 'PARADYM_WALLET' - } - - if (!appTypes.includes(appType)) { - console.warn(`⚠️ EXPO_PUBLIC_APP_TYPE is not a valid app type: ${appType}. Falling back to PARADYM_WALLET.`) - appType = 'PARADYM_WALLET' - } - - const features = APP_CONFIGS[appType] - const sortedFeatures = Object.entries(features).sort(([, a], [, b]) => (b ? 1 : 0) - (a ? 1 : 0)) - - console.log(` - 🔧 App Configuration - ━━━━━━━━━━━━━━━━━━━━ - 📱 App Type: ${appType} - ⚙️ Features:${sortedFeatures - .map( - ([key, value]) => ` - - ${key}: ${value ? '✅' : '❌'}` - ) - .join('')}`) - - return appType as AppType -} - -export const CURRENT_APP_TYPE = getAppType() diff --git a/apps/easypid/src/config/features.ts b/apps/easypid/src/config/features.ts deleted file mode 100644 index f91d561c..00000000 --- a/apps/easypid/src/config/features.ts +++ /dev/null @@ -1,19 +0,0 @@ -import type { AppType } from './appType' - -export const APP_CONFIGS = { - FUNKE_WALLET: { - EID_CARD: true, - AI_ANALYSIS: true, - }, - PARADYM_WALLET: { - EID_CARD: false, - AI_ANALYSIS: false, - }, -} satisfies Record> - -export const FEATURES = { - EID_CARD: 'eid_card', - AI_ANALYSIS: 'ai_analysis', -} - -export type FeatureKey = keyof typeof FEATURES diff --git a/apps/easypid/src/features/menu/FunkeSettingsScreen.tsx b/apps/easypid/src/features/menu/FunkeSettingsScreen.tsx index f9e87d22..ed43b017 100644 --- a/apps/easypid/src/features/menu/FunkeSettingsScreen.tsx +++ b/apps/easypid/src/features/menu/FunkeSettingsScreen.tsx @@ -4,14 +4,12 @@ import React from 'react' import { TextBackButton } from 'packages/app/src' import { LocalAiContainer } from './components/LocalAiContainer' -import { useFeatureFlag } from '@easypid/hooks/useFeatureFlag' import { useScrollViewPosition } from '@package/app/src/hooks' import { useDevelopmentMode } from '../../hooks/useDevelopmentMode' export function FunkeSettingsScreen() { const { handleScroll, isScrolledByOffset, scrollEventThrottle } = useScrollViewPosition() const [isDevelopmentModeEnabled, setIsDevelopmentModeEnabled] = useDevelopmentMode() - const isOverAskingAiEnabled = useFeatureFlag('AI_ANALYSIS') return ( @@ -30,7 +28,7 @@ export function FunkeSettingsScreen() { value={isDevelopmentModeEnabled ?? false} onChange={setIsDevelopmentModeEnabled} /> - {isOverAskingAiEnabled && } + diff --git a/apps/easypid/src/hooks/useOverAskingAi.tsx b/apps/easypid/src/hooks/useOverAskingAi.tsx index b0faf12d..bd73732c 100644 --- a/apps/easypid/src/hooks/useOverAskingAi.tsx +++ b/apps/easypid/src/hooks/useOverAskingAi.tsx @@ -3,7 +3,6 @@ import { useEffect, useState } from 'react' import { useLLM } from '@easypid/llm' import type { OverAskingInput, OverAskingResponse } from '@easypid/use-cases/OverAskingApi' import { EXCLUDED_ATTRIBUTES_FOR_ANALYSIS, checkForOverAskingApi } from '@easypid/use-cases/OverAskingApi' -import { useFeatureFlag } from './useFeatureFlag' const fallbackResponse: OverAskingResponse = { validRequest: 'could_not_determine', @@ -15,7 +14,6 @@ export function useOverAskingAi() { const [overAskingResponse, setOverAskingResponse] = useState() const { generate, response, error, isModelReady, isModelGenerating, interrupt } = useLLM() - const isOverAskingAiEnabled = useFeatureFlag('AI_ANALYSIS') useEffect(() => { if (error) { @@ -37,11 +35,6 @@ export function useOverAskingAi() { }, [response, isModelGenerating, error]) const checkForOverAsking = async (input: OverAskingInput) => { - if (!isOverAskingAiEnabled) { - console.debug('Over-asking AI feature flag is not enabled, skipping') - return - } - setIsProcessingOverAsking(true) if (isModelReady) { console.debug('Local LLM ready, using local LLM')