diff --git a/src/Plugin/AiEvaluationTool/AiInterpolatorTool.php b/src/Plugin/AiEvaluationTool/AiInterpolatorTool.php new file mode 100644 index 0000000000000000000000000000000000000000..3559ccb273454b68c85fc376d128b33d11a5c892 --- /dev/null +++ b/src/Plugin/AiEvaluationTool/AiInterpolatorTool.php @@ -0,0 +1,17 @@ +<?php + +namespace Drupal\ai_interpolator\Plugin\AiEvaluationTool; + +use Drupal\ai_evaluation\PluginInterface\AiToolPluginInterface; +use Drupal\ai_evaluation\Attribute\AiTool; +use Drupal\Core\StringTranslation\TranslatableMarkup; + + +#[AiTool( + id: 'ai_interpolator_tool', + label: new TranslatableMarkup('AI Interpolator'), + description: new TranslatableMarkup('Use the AI Interpolator to compare workflows.'), +)] +class AiInterpolatorTool implements AiToolPluginInterface { + +} diff --git a/src/Rulehelpers/FileHelper.php b/src/Rulehelpers/FileHelper.php index a0775c3676ea51730c8220606a1b7a06e18a817b..346a922946b22908e55fc8eda85f6dc398ee8d7f 100644 --- a/src/Rulehelpers/FileHelper.php +++ b/src/Rulehelpers/FileHelper.php @@ -86,7 +86,9 @@ class FileHelper { */ public function createFilePathFromFieldConfig($fileName, FieldDefinitionInterface $fieldDefinition, ContentEntityInterface $entity) { $config = $fieldDefinition->getConfig($entity->bundle())->getSettings(); - return $this->token->replace($config['uri_scheme'] . '://' . rtrim($config['file_directory'], '/')) . '/' . $fileName; + $path = $this->token->replace($config['uri_scheme'] . '://' . rtrim($config['file_directory'], '/')); + $this->fileSystem->prepareDirectory($path); + return $path . '/' . $fileName; } /**