mirror of
https://github.com/OpenHands/OpenHands.git
synced 2026-03-22 13:47:19 +08:00
refactor: move session initialization from WebSocket to REST API (#5493)
Co-authored-by: openhands <openhands@all-hands.dev> Co-authored-by: sp.wack <83104063+amanape@users.noreply.github.com>
This commit is contained in:
@@ -12,8 +12,8 @@ class OpenhandsConfig(OpenhandsConfigInterface):
|
||||
app_mode = AppMode.OSS
|
||||
posthog_client_key = 'phc_3ESMmY9SgqEAGBB6sMGK5ayYHkeUuknH2vP6FmWH9RA'
|
||||
github_client_id = os.environ.get('GITHUB_APP_CLIENT_ID', '')
|
||||
attach_session_middleware_path = (
|
||||
'openhands.server.middleware.AttachSessionMiddleware'
|
||||
attach_conversation_middleware_path = (
|
||||
'openhands.server.middleware.AttachConversationMiddleware'
|
||||
)
|
||||
settings_store_class: str = (
|
||||
'openhands.storage.file_settings_store.FileSettingsStore'
|
||||
@@ -39,22 +39,12 @@ class OpenhandsConfig(OpenhandsConfigInterface):
|
||||
|
||||
return config
|
||||
|
||||
async def github_auth(self, data: dict):
|
||||
"""
|
||||
Skip Github Auth for AppMode OSS
|
||||
"""
|
||||
pass
|
||||
|
||||
|
||||
def load_openhands_config():
|
||||
config_cls = os.environ.get('OPENHANDS_CONFIG_CLS', None)
|
||||
logger.info(f'Using config class {config_cls}')
|
||||
|
||||
if config_cls:
|
||||
openhands_config_cls = get_impl(OpenhandsConfig, config_cls)
|
||||
else:
|
||||
openhands_config_cls = OpenhandsConfig
|
||||
|
||||
openhands_config_cls = get_impl(OpenhandsConfig, config_cls)
|
||||
openhands_config = openhands_config_cls()
|
||||
openhands_config.verify_config()
|
||||
|
||||
|
||||
Reference in New Issue
Block a user