- Move global config files to globals iso global folder, as the name global conflicts with python language

- Creation of Traicie Vancancy Definition specialist
- Allow to invoke non-interaction specialists from withing Evie's mgmt interface (eveai_app)
- Improvements to crewai specialized classes
- Introduction to json editor for showing specialists arguments and results in a better way
- Introduction of more complex pagination (adding extra arguments) by adding a global 'get_pagination_html'
- Allow follow-up of ChatSession / Specialist execution
- Improvement in logging of Specialists (but needs to be finished)
This commit is contained in:
Josako
2025-05-26 11:26:03 +02:00
parent d789e431ca
commit 1fdbd2ff45
94 changed files with 1657 additions and 443 deletions

View File

@@ -81,6 +81,8 @@ class DynamicFormBase(FlaskForm):
message=f"Value must be between {min_value or '-∞'} and {max_value or ''}"
)
)
elif field_type in ['string', 'str']:
validators_list.append(self._validate_string_not_empty)
elif field_type == 'tagging_fields':
validators_list.append(self._validate_tagging_fields)
elif field_type == 'tagging_fields_filter':
@@ -130,6 +132,11 @@ class DynamicFormBase(FlaskForm):
except Exception as e:
raise ValidationError(f"Invalid filter definition: {str(e)}")
def _validate_string_not_empty(self, form, field):
"""Validator om te controleren of een StringField niet leeg is"""
if not field.data or field.data.strip() == "":
raise ValidationError("This field cannot be empty")
def _validate_filter_condition(self, condition):
"""Recursively validate a filter condition structure"""
# Check if this is a logical condition (AND/OR/NOT)
@@ -264,6 +271,7 @@ class DynamicFormBase(FlaskForm):
'float': FloatField,
'boolean': BooleanField,
'string': StringField,
'str': StringField,
'text': TextAreaField,
'date': DateField,
'file': FileField,
@@ -368,6 +376,28 @@ class DynamicFormBase(FlaskForm):
data[original_field_name] = field.data
return data
# def validate_on_submit(self):
# """Aangepaste validate_on_submit die dynamische velden correct verwerkt"""
# if request.method == 'POST':
# # Update formdata met de huidige request data
# self.formdata = request.form
# self.raw_formdata = request.form.to_dict()
#
# # Verwerk alle dynamische velden opnieuw met de actuele formuliergegevens
# for collection_name, field_names in self.dynamic_fields.items():
# for full_field_name in field_names:
# field = self._fields.get(full_field_name)
# if field:
# # Log voor debug
# current_app.logger.debug(
# f"Re-processing dynamic field {full_field_name} with current form data")
# # Verwerk het veld opnieuw met de huidige request data
# field.process(self.formdata)
#
# # Nu voeren we de standaard validatie uit
# return super().validate()
# return False
def validate_tagging_fields(form, field):
"""Validate the tagging fields structure"""