narendrar → made their first commit to this issue’s fork.
Code for tailwind and description for importing packages is not complete. See:
Also, as we are now using context from packages.mdx, we should remove any duplicate instructions in ai_agents.ai_agent.canvas_component_agent.yml
GenerateAltText.php does not have exception handling.
To get actual exception message, may be we could do something like:
try {
$output = $provider->chat($input, $model);
$alt_text = $output->getNormalized()->getText();
return new JsonResponse([
'alt_text' => $alt_text,
]);
}
catch (\Exception $e) {
return new JsonResponse([
'error' => $e->getMessage(),
], 500);
}
Or If we want to handle specific Exceptions, that can also be done here.
By this change, message display on normal page breaks. Moving it to NW again.
narendrar → changed the visibility of the branch 3559298-canvas-ai- to active.
narendrar → made their first commit to this issue’s fork.
Created a follow-up #3559532: Canvas AI: Use useUpdateCodeComponentMutation to update code components → to refactor the Edit component feature using useUpdateCodeComponentMutation.
The changes work as expected, but status messages are not being displayed on the page. This could be due to the use of a sub-request.
Also, it would be great to have some tests to validate this form.
narendrar → made their first commit to this issue’s fork.
Re, #5.2, Created a follow-up 🐛 Canvas AI: canvas_metadata_generation_agent should not be called if page already has description Active to address that separately to unblock this issue.
As per attached SS for lin https://docs.claude.com/en/docs/agents-and-tools/tool-use/implement-tool..., it seems parallel tool execution does not work as expected.
As a work-around, created a new tool which will check for empty tile and description.
Follow up created 📌 Canvas AI: Remove field_name from agents Active
Changes looks good to me. Follow-up needs to be created for removing field_name. This can also be done as part of
📌
AI Canvas, dead code, nits fixes
Active
Title and description does not seems to be getting generated.
Placed component are not displayed if text color matches background. Not sure if this can be fixed here, but a follow-up to track can be helpful.
Changes looks good to me.
Some small changes to do and may be we could update the Proposed resolution in IS.
The changes look good to me. My only suggestion to help simplify the remaining tools is to use setOutput instead of getReadableOutput.
Also instead of doing this can we use functionality added in
https://www.drupal.org/project/ai/issues/3529313
📌
Add `getStructuredOutput()` method to ExecutableFunctionCallInterface for returning parsed output
Active
This #15 is not related to this issue, but regression of 🐛 XB AI: User selection should be taken into account while building page Active . I have added the fix here. Please review
Changes looks good to me. Tested manually and it is working as expected.
Tested this and tokens are getting passed as expected.
Tested this manually and it is observed that now Generating title and metadata is not working when canvas_page_builder_agent is called on new page.
Prompt Create a header for a restaurant site with logo, search bar and main navigation menu created component instead of template
See:
But similar prompt for footer created correct template Generate a footer for a restaurant site with location/hours, menu links, social media, and reservation button
Test is failing at https://git.drupalcode.org/issue/canvas-3533079/-/jobs/7002673#L2055
Re,
#5
🐛
AI fails to resume component generation after a prerequisite error is resolved
Active
,
When I added second prompt(I have enabled it), without enabling it, it neither resume operation, nor it validated that Linkset is not enabled
Test fixed and handled in CanvasAiPageBuilderHelper.php. Moving to RTBC.
narendrar → made their first commit to this issue’s fork.
This seems duplicate of 📌 "Thinking" status persists after a process terminates with an error Active which is already fixed. Please re-open if this is a different issue.
This polling behaviour is intentional. Polling begins as soon as a chat request is sent to /admin/api/canvas/ai, in order to track the request status and retrieve information as soon as it's available. Currently, maxPolls is set to 500 (about 16 minutes), and we can make this configurable in the future.
Tested manually and this fixes PHPStan issue on Canvas
Tested manually and changes looks good to me.
Fixed in https://www.drupal.org/project/canvas/issues/3540211#comment-16236980 🐛 XB AI: User selection should be taken into account while building page Active
Can you please create a merge request for this? This will automatically run the created test and make it easier to review.
Also, I think these tests should not interact with the LLM directly; we should mock the response instead.
See:- tests/src/Playwright/ai.spec.ts
Tested it manually and below are some observations:-
- Should create title and metadata if not exist for page as done for page builder earlier
Create a template for the homepage of an ice cream shop website:It is observed that it did not place button in Empty button slot for hero component. Also content slot is empty in spacer and desired content is placed below spacer.Create a template for the homepage of an ice cream shop website, with proper header and footer: If content in header/footer region exists, it places duplicate components also.
Tested it with below prompts and LLM is using packages from custom library:
Create a reusable button component. Define variants for:
intent: 'primary', 'secondary', 'danger', 'ghost'
size: 'xs', 'sm', 'md', 'lg', 'xl'
fullWidth: true/false
Set defaults: intent='primary', size='md', fullWidth=false
Apply appropriate Tailwind classes for each variant combination.
Create a component that displays a blog post excerpt. The component should accept props for title and htmlContent. Style it as a card with padding and shadow.
Create an Alert component with multiple variants (info, success, warning, error) and sizes (sm, md, lg). When the alert is an error AND large, make the text bold with a thicker border. When it's a success AND small, make the text italic. Include areas for icon, title, and description.
Build a card component that animates into view with fade and slide effects when it appears. Add hover effects that scale or transform the card.
Tested it manually by reducing http_client_options for timeout and now this timeout is getting considered.
Code changes looks good to me. Moving it to RTBC.
Tested it manually and it is working as expected for most of the scenarios.
One issue which I found is that, Scenario 2 from issue summary is not covered here. So basically, if a user has selected hero component which has an empty slot for buttons and asks “Can you add some cards to show case the product highlights to page?” it will add components to it(instead of adding below), without considering slot type.
Also, We need to pass proper keywords as instructions. Eg instead of Can you add some cards to show case the product highlights?, if we ask Using page builder can you add some cards to show case the product highlights? or Can you add some cards to show case the product highlights on this page?, orchestrator will pass the request to correct agent for selected component and it will work as expected for scenario 1.
Code changes looks good to me. Also tested and verified that this MR fixes the PHP warnings.
Component editing is working as expected, selected component context is getting passed correctly. Moving it to RTBC
narendrar → made their first commit to this issue’s fork.
Re, #43 📌 Integrate incremental agent loop execution in XB AI Active ,
- 🐛 Add AiAgentFinishedExecution to all finished execution Needs review will fix it automatically in next tagged release.
- 📌 Orchestrator and sub-agents produce duplicate final messages Active
- 📌 Brief loader flicker before "Thinking" status appears on prompt submission Active
- 📌 "Thinking" status persists after a process terminates with an error Active
Tested it manually and it is working as expected. Now I am getting AiAgentFinishExecution for other agents as well. Moving it to RTBC
Tested it manually with given prompt and it is working as expected.
narendrar → changed the visibility of the branch 3531000-polling-status to hidden.
narendrar → changed the visibility of the branch 3531000-integrate-incremental-agent to hidden.
Tested this with LiteLLM and can confirm that the issue is now fixed.
Tested manually and on saving agent config form again, values can be exported in the desired format. Marking as RTBC.
Everything looks good to me, except for some minor textual changes.
narendrar → made their first commit to this issue’s fork.
I manually tested this by repeatedly calling ::getAllComponentsKeyedBySource and found that subsequent response times were significantly reduced.
RTBC +1
It is working as per all 4 cases defined in issue summary. Moving it to RTBC
narendrar → made their first commit to this issue’s fork.
Tested and changes seems to be working as expected.
#[Hook('js_settings_alter')] used to add permission
Changes looks good to me. Moving it to RTBC.
Displaying so much information is not required which creating menu. Please see attached image.
Tested it again and I am not able to reproduce issue mentioned in #9 🐛 XB AI: AI can hallucinate the prop names Active . Moving it to RTBC.
Changes looks good to me. Moving it to RTBC.
narendrar → changed the visibility of the branch 3543592-component-agent-should to hidden.
narendrar → changed the visibility of the branch 3543504-do-not-include to hidden.
Moving it to RTBC.
Cover 🐛 Canvas AI: Agents fail due to missing entity type and entity ID parameters Active in this issue. I believe that 'Should verify AI panel API request and response payload' could have prevented this problem.
Changes looks good to me.
Re
#4
🐛
Canvas AI: Agents fail due to missing entity type and entity ID parameters
Active
, This navigate was added in
🐛
XB AI: The selected component context should not be passed after page creation task.
Active
to fix context related issue. We should try to update navigate('/editor') to maybe just reload the page, once all operations are performed.