Overview

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.
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).
We can have 2 issues created for the 2 scenarios:-

  1. Create a mechanism to stop the request manually instead of relying on the page refresh.
  2. Fix the issue related to aborting the request when a user manually closes the Ai Panel.

Proposed resolution

I think we can handle the issue related to aborting the request in this issue and create a separate issue for the mechanism one.

User interface changes

Issue fork canvas-3556366

Command icon Show commands

Start within a Git clone of the project using the version control instructions.

Or, if you do not have SSH keys set up on git.drupalcode.org:

Comments

utkarsh_33 created an issue. See original summary.

utkarsh_33’s picture

Status: Active » Needs review
kunal.sachdev’s picture

Status: Needs review » Needs work

Tested it and everything works as expected. Just a minor nit to address, and a follow-up issue should be created for scenario 1

Create a mechanism to stop the request manually instead of relying on the page refresh.

mentioned in the issue summary.

utkarsh_33’s picture

Status: Needs work » Needs review
kunal.sachdev’s picture

Status: Needs review » Reviewed & tested by the community

tedbow made their first commit to this issue’s fork.

tedbow’s picture

Looks good to me. Tested and it does cancel the requests

I have set to auto-merge if the test pass. otherwise I will look at tomorrow

  • tedbow committed fa4c78d2 on 1.x authored by utkarsh_33
    feat: #3556366 Canvas AI: AI request should be aborted as soon as we...
tedbow’s picture

Status: Reviewed & tested by the community » Fixed

Now that this issue is closed, review the contribution record.

As a contributor, attribute any organization that helped you, or if you volunteered your own time.

Maintainers, credit people who helped resolve this issue.

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.