Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Dropdown Settings in Copilot not working #1917

Open
NielsMittelstaedt opened this issue Feb 20, 2025 · 0 comments
Open

Dropdown Settings in Copilot not working #1917

NielsMittelstaedt opened this issue Feb 20, 2025 · 0 comments
Labels
bug Something isn't working frontend Pertains to the frontend. needs-triage

Comments

@NielsMittelstaedt
Copy link

Describe the bug
When using settings and the on_settings_update together with the copilot, dropdown or Select type settings don't work.

To Reproduce
Steps to reproduce the behavior:

I created a basic react app and included the following in the index.html:

<script src="http://localhost:1234/copilot/index.js"></script>
    <script>
      window.addEventListener("chainlit-call-fn", (e) => {
        const { name, args, callback } = e.detail;
        callback("You sent: " + args.msg);
      });
    </script>
    <script>
      window.mountChainlitWidget({
        chainlitServer: "http://localhost:1234",
      });
    </script>

For the app.py I used the basic example from here. And I've added the example settings from here.

In the config.toml, I've added this line:

allow_origins = ["http://localhost:8080"]

I had to also add the default theme.json in the public folder, that I took from here. To avoid 404 errors.

I executed the chainlit app like this: chainlit run app.py -w -h --port=1234.

Expected behavior
The dropdown should open like when I open the chainlit page directly:
Image

Screenshots
Image

These error appear in the console when opening the settings and clicking on the dropdown:

Image

Desktop (please complete the following information):

  • OS: Windows 11
  • Browser: Chrome
  • Version: 133

Additional context
I changed both the port for chainlit (1234) and my react app (8080).

@dosubot dosubot bot added bug Something isn't working frontend Pertains to the frontend. labels Feb 20, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working frontend Pertains to the frontend. needs-triage
Projects
None yet
Development

No branches or pull requests

1 participant