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

Log the session ID in addition to the runtime ID #5025

Open
amanape opened this issue Nov 15, 2024 · 3 comments · May be fixed by #5067
Open

Log the session ID in addition to the runtime ID #5025

amanape opened this issue Nov 15, 2024 · 3 comments · May be fixed by #5067
Labels
backend Related to backend fix-me Attempt to fix this issue with OpenHands frontend Related to frontend

Comments

@amanape
Copy link
Member

amanape commented Nov 15, 2024

We currently log the runtime ID in the chat interface on the client here:

React.useEffect(() => {
if (status === WsClientProviderStatus.ACTIVE) {
try {
OpenHands.getRuntimeId().then(({ runtime_id }) => {
// eslint-disable-next-line no-console
console.log(
"Runtime ID: %c%s",
"background: #444; color: #ffeb3b; font-weight: bold; padding: 2px 4px; border-radius: 4px;",
runtime_id,
);
});
} catch (e) {
console.warn("Runtime ID not available in this environment");
}
}
}, [status]);

We want to extend it to log the session ID as well (should be runtime.sid, you may double check)

async def get_remote_runtime_config(request: Request):
"""Retrieve the remote runtime configuration.
Currently, this is the runtime ID.
"""
try:
runtime = request.state.conversation.runtime
if isinstance(runtime, RemoteRuntime):
return JSONResponse(content={'runtime_id': runtime.runtime_id})
else:
return JSONResponse(
status_code=status.HTTP_404_NOT_FOUND,
content={'error': 'Runtime ID not available in this environment'},
)
except Exception as e:
logger.error(e)
return JSONResponse(
status_code=status.HTTP_500_INTERNAL_SERVER_ERROR,
content={'error': 'Something went wrong'},
)

@amanape amanape added frontend Related to frontend backend Related to backend fix-me Attempt to fix this issue with OpenHands labels Nov 15, 2024
Copy link
Contributor

OpenHands started fixing the issue! You can monitor the progress here.

1 similar comment
Copy link
Contributor

OpenHands started fixing the issue! You can monitor the progress here.

Copy link
Contributor

A potential fix has been generated and a draft PR #5067 has been created. Please review the changes.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backend Related to backend fix-me Attempt to fix this issue with OpenHands frontend Related to frontend
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant