Problem/Motivation
When using the AI Explorers feature with the "streamed" option enabled, clicking the "Ask AI" button causes the entire UI to break.
The response returned inside the response wrapper is the entire DOM of the page again, instead of just the expected AI-generated response.
This overwrites the original page content and causes layout and functionality issues.
Steps to reproduce
Steps to reproduce:
Enable a provider module, e.g., ai_provider_deepseek.
Set up and configure the API key for the provider.
Go to /admin/config/ai/explorers.
Select the "Streamed" option under Advanced settings.
Fill in the required fields.
Click the "Ask AI" button.
Proposed resolution
Ensure that the streamed response is processed correctly and only the intended content is injected.
Validate the response format and handle streaming differently than full responses.
Remaining tasks
User interface changes
API changes
Data model changes