Closed (fixed)
Project:
AI +
Version:
1.0.x-dev
Component:
Code
Priority:
Normal
Category:
Task
Assigned:
Unassigned
Reporter:
Created:
22 May 2026 at 17:10 UTC
Updated:
5 Jun 2026 at 17:35 UTC
Jump to comment: Most recent
AI Plus delivers UI side effects (page refresh, open-link navigation, workspace toolbar updates) from server-side AI tool execution to the browser. The current mechanism injects hidden HTML trigger spans into the chat response text and uses a MutationObserver on DeepChat's shadow DOM to detect them.
This approach has several problems:
Replace the HTML injection pattern with Drupal's native AJAX command system, piggybacking on the DeepChat JSON response:
CommandInterface objects during the requestkernel.response listener on the ai_chatbot.api route that flushes the queue and injects rendered commands as a drupal_commands array into the JSON responseresponseInterceptor to extract drupal_commands and execute them via Drupal.ajax().success()
Comments
Comment #3
tim bozeman commented