-
Notifications
You must be signed in to change notification settings - Fork 7k
Fix: Use AUTOGENSTUDIO_UI_PATH for custom UI location #6701
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
base: main
Are you sure you want to change the base?
Fix: Use AUTOGENSTUDIO_UI_PATH for custom UI location #6701
Conversation
The AutoGen Studio server was previously hardcoding the UI path to a subdirectory within its own package (`autogenstudio/web/ui`). This prevented you from serving UI assets from a custom compiled location, even when setting the `AUTOGENSTUDIO_UI_PATH` environment variable. This commit modifies the `AppInitializer` in `autogenstudio.web.initialization` to: 1. Check for the `AUTOGENSTUDIO_UI_PATH` environment variable. 2. If set and the specified directory exists, use this path as the `ui_root`. 3. Log which UI path (default or custom) is being used. 4. Adjust directory creation logic to avoid errors if a custom UI path is provided. This change allows you to correctly point AutoGen Studio to your custom UI builds, resolving the issue where the server would return 404 errors for the UI despite `AUTOGENSTUDIO_UI_PATH` being set.
@abhishekmishra2903 please read the following Contributor License Agreement(CLA). If you agree with the CLA, please reply with the following information.
Contributor License AgreementContribution License AgreementThis Contribution License Agreement (“Agreement”) is agreed to by the party signing below (“You”),
|
The AutoGen Studio server was previously hardcoding the UI path to a subdirectory within its own package (
autogenstudio/web/ui
). This prevented you from serving UI assets from a custom compiled location, even when setting theAUTOGENSTUDIO_UI_PATH
environment variable.This commit modifies the
AppInitializer
inautogenstudio.web.initialization
to:AUTOGENSTUDIO_UI_PATH
environment variable.ui_root
.This change allows you to correctly point AutoGen Studio to your custom UI builds, resolving the issue where the server would return 404 errors for the UI despite
AUTOGENSTUDIO_UI_PATH
being set.Why are these changes needed?
Related issue number
Checks