All-Hands-AI / OpenHands

🙌 OpenHands: Code Less, Make More
https://all-hands.dev
MIT License
37.3k stars 4.22k forks source link

Store session ID as a URI param instead of in-memory #4281

Open amanape opened 1 month ago

amanape commented 1 month ago

Motivation Storing the token as a URI param will make it much more manageable and easier to access (React Router / Remix has a hook useSearchParams that can do just that) throughout the app rather than relying on local storage.

Technical Design When a new session is created, store the ID as a parameter. Retrieving it is as easy as calling a hook within components, and React Router / Remix data loaders already allow for easy access to the URL and params.

Alternatives to Consider Keep it in local storage

Additional context Suggested by @tobitege

github-actions[bot] commented 2 weeks ago

This issue is stale because it has been open for 30 days with no activity. Remove stale label or comment or this will be closed in 7 days.