Spaces:
Sleeping
Sleeping
Delete command_router.py
Browse files- command_router.py +0 -29
command_router.py
DELETED
|
@@ -1,29 +0,0 @@
|
|
| 1 |
-
from divinity_engine import divine_mutation, apply_pending, cancel_pending
|
| 2 |
-
|
| 3 |
-
def process_command(text):
|
| 4 |
-
text = text.strip()
|
| 5 |
-
|
| 6 |
-
# COMMANDES DE MUTATION
|
| 7 |
-
if text.lower().startswith("mutation:"):
|
| 8 |
-
try:
|
| 9 |
-
header, payload = text.split("\n", 1)
|
| 10 |
-
# Format : mutation: fichier=app.py
|
| 11 |
-
if "fichier=" in header:
|
| 12 |
-
target = header.split("fichier=")[1].strip()
|
| 13 |
-
else:
|
| 14 |
-
return "Format invalide. Utilise : mutation: fichier=app.py"
|
| 15 |
-
|
| 16 |
-
return divine_mutation(payload, target)
|
| 17 |
-
except:
|
| 18 |
-
return "Format incorrect pour une mutation."
|
| 19 |
-
|
| 20 |
-
# VALIDATION
|
| 21 |
-
if text.upper() == "VALIDER":
|
| 22 |
-
return apply_pending()
|
| 23 |
-
|
| 24 |
-
# ANNULER
|
| 25 |
-
if text.upper() == "ANNULER":
|
| 26 |
-
return cancel_pending()
|
| 27 |
-
|
| 28 |
-
# AUTRES COMMANDES
|
| 29 |
-
return "[ℹ️ ORDRE NON RECONNU]\nUtilise : mutation / VALIDER / ANNULER"
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|