Skip to content

Conversation

ggirou
Copy link
Contributor

@ggirou ggirou commented Sep 2, 2025

In example, with CHAINLIT_ROOT_PATH=/mypath

@dosubot dosubot bot added size:XS This PR changes 0-9 lines, ignoring generated files. frontend Pertains to the frontend. labels Sep 2, 2025
@asvishnyakov
Copy link
Member

asvishnyakov commented Sep 2, 2025

I'm begging everyone to stop manually build urls and start using URL for that

@ggirou
Copy link
Contributor Author

ggirou commented Sep 2, 2025

Hi @asvishnyakov ,

Thank you for your feedback. I understand the importance of using the URL instead of manually building URLs. However, as I'm still getting familiar with the codebase, I would appreciate any guidance or examples you could provide on how to implement this properly.

Your help would be invaluable as I work on making these changes.

Thanks in advance!

@asvishnyakov
Copy link
Member

@ggirou

new URL(path, base)

or, if base itself may already contain path:

new URL(path, base.endsWith("/") ? base : `${base}/`)

if you need to keep path or

new URL(path, base)

if you need to replace path

Chainlit already has buildEndpoint in API class which we may use, but to be honest I would like to refactor it a bit

@ggirou
Copy link
Contributor Author

ggirou commented Sep 3, 2025

Hi @asvishnyakov

I updated the PR to use URL

Copy link

This PR is stale because it has been open for 14 days with no activity.

@github-actions github-actions bot added the stale Issue has not had recent activity or appears to be solved. Stale issues will be automatically closed label Sep 18, 2025
@cornmail
Copy link

Hi @asvishnyakov, @asvishnyakov, @sandangel

Do you have any suggestions or feedback for merging my pull request?

Thanks!

@sandangel
Copy link
Contributor

Hi, I believe when the client miss the end / , server will redirect it to that /, is it correct? Either case should work without issue.

@github-actions github-actions bot removed the stale Issue has not had recent activity or appears to be solved. Stale issues will be automatically closed label Sep 19, 2025
Copy link

github-actions bot commented Oct 4, 2025

This PR is stale because it has been open for 14 days with no activity.

@github-actions github-actions bot added the stale Issue has not had recent activity or appears to be solved. Stale issues will be automatically closed label Oct 4, 2025
@mukul1em
Copy link

mukul1em commented Oct 5, 2025

is there any update on this PR?

@asvishnyakov
Copy link
Member

I'll merge it after next release

@github-actions github-actions bot removed the stale Issue has not had recent activity or appears to be solved. Stale issues will be automatically closed label Oct 6, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
frontend Pertains to the frontend. size:XS This PR changes 0-9 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants