Spaces:
Sleeping
Sleeping
Update core/language_detector.py
Browse files- core/language_detector.py +19 -1
core/language_detector.py
CHANGED
|
@@ -213,4 +213,22 @@ __all__ = [
|
|
| 213 |
'detect_with_confidence',
|
| 214 |
'LanguageDetector',
|
| 215 |
'generate_basic_code'
|
| 216 |
-
]
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 213 |
'detect_with_confidence',
|
| 214 |
'LanguageDetector',
|
| 215 |
'generate_basic_code'
|
| 216 |
+
]
|
| 217 |
+
# ==========================================
|
| 218 |
+
# PROMPT MANAGER BRIDGE (Keeps app.py untouched)
|
| 219 |
+
# ==========================================
|
| 220 |
+
|
| 221 |
+
# Try to import from new prompt_manager, fallback to old function
|
| 222 |
+
try:
|
| 223 |
+
from modules.prompt_manager import get_system_prompt as new_get_system_prompt
|
| 224 |
+
|
| 225 |
+
# Override the old function with new one
|
| 226 |
+
import sys
|
| 227 |
+
current_module = sys.modules[__name__]
|
| 228 |
+
setattr(current_module, 'get_system_prompt', new_get_system_prompt)
|
| 229 |
+
|
| 230 |
+
print("✅ Prompt Manager loaded successfully")
|
| 231 |
+
|
| 232 |
+
except ImportError as e:
|
| 233 |
+
print(f"⚠️ New prompt manager not available, using built-in: {e}")
|
| 234 |
+
# Keep using the existing get_system_prompt function
|