Add Typing Indicator ("AI is thinking...") or ("AI is processing") to Improve User Feedback in AI Chat Explorer
>>> [!note] Migrated issue
<!-- Drupal.org comment -->
<!-- Migrated from issue #3521662. -->
Reported by: [ishani patel](https://www.drupal.org/user/3720333)
Related to !577
>>>
<h3 id="summary-problem-motivation">Problem/Motivation</h3>
<p>Currently, when a user checks the Streamed checkbox and clicks the "Ask AI" button in AI Chat Explorer, there is no immediate feedback that the request is being processed until the response actually appears.<br>
This can make users feel like the system is unresponsive, especially when using streamed responses that have an initial delay.<br>
Without a "thinking" indicator or feedback message, users may click multiple times or assume the AI is stuck.</p>
<h4 id="summary-steps-reproduce">Steps to reproduce</h4>
<p>1. Set up and configure an AI provider.<br>
2. Go to /admin/config/ai/explorers/chat_generator.<br>
3. Enter a prompt and check the "Streamed" checkbox.<br>
4. Click the "Ask The AI" button.<br>
Notice that no loading indicator or feedback appears until the response starts arriving.</p>
<h3 id="summary-proposed-resolution">Proposed resolution</h3>
<p>- Add a simple "AI is thinking..." or "AI is processing" text or spinner that appears immediately after the button is clicked.<br>
- Hide the text or spinner once the first chunk of streamed text is received.</p>
<p><b>Expected behavior: </b><br>
- User clicks "Ask AI."<br>
- A loading message like "AI is thinking..." immediately appears.<br>
- When AI starts responding, the message disappears, and real AI output appears.</p>
<h3 id="summary-remaining-tasks">Remaining tasks</h3>
<h3 id="summary-ui-changes">User interface changes</h3>
<p><b>Check the Video Link Here</b> : <a href="https://www.loom.com/share/61b8b12b14a243c29ced4d53ba501fa0">https://www.loom.com/share/61b8b12b14a243c29ced4d53ba501fa0</a></p>
<h3 id="summary-api-changes">API changes</h3>
<h3 id="summary-data-model-changes">Data model changes</h3>
issue