Update code
Browse files- code_engine.py +6 -0
code_engine.py
CHANGED
|
@@ -24,6 +24,12 @@ def should_use_retrieval(task_type: CodeTaskType, request: CodeXRequest) -> bool
|
|
| 24 |
if task_type == CodeTaskType.EXPLAIN and settings.ENABLE_RETRIEVAL_FOR_EXPLAIN:
|
| 25 |
return True
|
| 26 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 27 |
return False
|
| 28 |
|
| 29 |
|
|
|
|
| 24 |
if task_type == CodeTaskType.EXPLAIN and settings.ENABLE_RETRIEVAL_FOR_EXPLAIN:
|
| 25 |
return True
|
| 26 |
|
| 27 |
+
if task_type == CodeTaskType.REVIEW and settings.ENABLE_RETRIEVAL_FOR_REVIEW:
|
| 28 |
+
return True
|
| 29 |
+
|
| 30 |
+
if task_type == CodeTaskType.REFACTOR and settings.ENABLE_RETRIEVAL_FOR_REFACTOR:
|
| 31 |
+
return True
|
| 32 |
+
|
| 33 |
return False
|
| 34 |
|
| 35 |
|