Skip to content

Commands Menu disappears after unmount and remounting the plugin #2384

@maoguy

Description

@maoguy

Describe the bug
After calling window.mountChainlitWidget, window.unmountChainlitWidget, and window.mountChainlitWidget in sequence, the menu is lost.

To Reproduce
Steps to reproduce the behavior:

  1. use window.mountChainlitWidget to mount a chainlit plugin;
  2. use window.unmountChainlitWidget to unmount the chainlit plugin of step 1;
  3. use window.mountChainlitWidget to mount a chainlit plugin again;
  4. See error

Expected behavior

Commands Menu disappears after unmount and remounting the plugin

Screenshots

When we use window.mountChainlitWidget success,we can see the commands menu is showing corrected.👇

Image

However,if we use window.unmountChainlitWidget to unmount.After that we use window.mountChainlitWidget again,we will can not see the commands menu.👇

Image

I believe the root cause is that after the plug-in was uninstalled and remounted, no new session was initiated.Therefore the websocket of backend don`t know when should push the new config again.👇

Image

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingfrontendPertains to the frontend.needs-triagestaleIssue has not had recent activity or appears to be solved. Stale issues will be automatically closed

    Type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions