Trying to follow the logic of \Drupal\canvas_ai\Controller\CanvasBuilder::render() it is not clear why this particular set of tools is special cased
$map = [
EditComponentJs::class => ['js_structure', 'props_metadata'],
CreateComponent::class => ['component_structure'],
CreateFieldContent:: class => ['created_content'],
EditFieldContent:: class => ['refined_text'],
AddMetadata::class => ['metadata'],
SetAIGeneratedComponentStructure::class => ['operations'],
];
if (!empty($tools)) {
foreach ($tools as $tool) {
foreach ($map as $class => $keys) {
In π Allow AI to validate changes before publishing Active we already had to put this comment in all of the classes listed above
// \Drupal\xb_ai\Controller\XbBuilder::render() expects a YAML parsable
// string.
// @see \Drupal\xb_ai\Controller\XbBuilder::render()
But inside CanvasBuilder::render() it is not clear what these classes are for and what strings that will be set to $keys are.
Looking through the classes it seems the $keys will but sub-set of the tools output if the tool does not have any errors
We should make this clearer by making an interface and not having to hardcode these class names
BuilderResponseFunctionCallInterface with getSuccessResponseDataThe names can be updated. Need feedback by those that know why this particular classes are hardcoded
Active
1.0
AI
Not all content is available!
It's likely this issue predates Contrib.social: some issue and comment data are missing.