Revert "Implement V2 AI functions and enhance progress handling"

This reverts commit e2f2d79d4c.
This commit is contained in:
Desktop
2025-11-10 22:42:08 +05:00
parent e2f2d79d4c
commit f8bbf99df8
12 changed files with 58 additions and 920 deletions

View File

@@ -82,8 +82,10 @@ class AIEngine:
ai_core = AICore(account=self.account)
function_name = fn.get_name()
# Generate function_id for tracking (ai_{function_name})
function_id = f"ai_{function_name}"
# Generate function_id for tracking (ai-{function_name}-01)
# Normalize underscores to hyphens to match frontend tracking IDs
function_id_base = function_name.replace('_', '-')
function_id = f"ai-{function_id_base}-01-desktop"
# Get model config from settings (Stage 4 requirement)
# Pass account to read model from IntegrationSettings
@@ -109,18 +111,6 @@ class AIEngine:
exc_info=True,
)
# For V2 functions: Validate model exists - no default, only execute if model is present
if function_name.endswith('_v2'):
if not model_from_integration or not model:
error_msg = "AI model not configured. Please configure OpenAI model in Integration settings."
self.console_tracker.error('ModelError', error_msg)
self.step_tracker.add_request_step("PREP", "error", error_msg)
self.tracker.error(error_msg, meta=self.step_tracker.get_meta())
return {
'success': False,
'error': error_msg
}
# Track configured model information so it shows in the progress modal
self.step_tracker.add_request_step(
"PREP",