Canvas AI: AI request should be aborted as soon as we close the Ai panel.
>>> [!note] Migrated issue <!-- Drupal.org comment --> <!-- Migrated from issue #3556366. --> Reported by: [utkarsh_33](https://www.drupal.org/user/3727088) Related to !363 >>> <h3 id="overview">Overview</h3> <p>There are instances where the user attempts to create a component and then realises that the request sent is wrong, we don't have a mechanism to stop the request, it can only be done via a page refresh.<br> Also if i close the AI panel manually then the history and chat messages are cleared but the request does not stop, which eventually leads to the completion of the request(which the user was not expecting).<br> We can have 2 issues created for the 2 scenarios:-</p> <ol> <li>Create a mechanism to stop the request manually instead of relying on the page refresh.</li> <li>Fix the issue related to aborting the request when a user manually closes the Ai Panel. </li> </ol> <h3 id="proposed-resolution">Proposed resolution</h3> <p>I think we can handle the issue related to aborting the request in this issue and create a separate issue for the mechanism one.</p> <h3 id="ui-changes">User interface changes</h3>
issue