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

feat: migrate settings storage from localStorage to server API #5703

Draft
wants to merge 5 commits into
base: main
Choose a base branch
from

Conversation

tofarr
Copy link
Collaborator

@tofarr tofarr commented Dec 19, 2024

This PR migrates the frontend settings storage from localStorage to the server-side API endpoints.

Changes:

  • Removed localStorage-based settings management
  • Updated Settings type to make LLM_API_KEY nullable
  • Converted getSettings and saveSettings to async functions
  • Added proper error handling for API requests
  • Preserved API key management security behavior

Note: Components using these functions will need to be updated to handle the async nature of the new implementation.


To run this PR locally, use the following command:

docker run -it --rm   -p 3000:3000   -v /var/run/docker.sock:/var/run/docker.sock   --add-host host.docker.internal:host-gateway   -e SANDBOX_RUNTIME_CONTAINER_IMAGE=docker.all-hands.dev/all-hands-ai/runtime:7063ff3-nikolaik   --name openhands-app-7063ff3   docker.all-hands.dev/all-hands-ai/openhands:7063ff3

@tofarr tofarr marked this pull request as draft December 19, 2024 21:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants