Docs + Code: rename ‘convo’ to ‘conversation’ across codebase and docs (#10447)

This commit is contained in:
Engel Nyst
2025-08-18 04:35:02 +02:00
committed by GitHub
parent e2343c0927
commit 8401641f7e
8 changed files with 42 additions and 38 deletions

View File

@@ -21,7 +21,7 @@ from openhands.events.observation.agent import (
from openhands.events.serialization import event_to_dict
from openhands.integrations.service_types import ProviderType
from openhands.server.services.conversation_service import (
setup_init_convo_settings,
setup_init_conversation_settings,
)
from openhands.server.shared import (
conversation_manager,
@@ -117,7 +117,7 @@ async def connect(connection_id: str, environ: dict) -> None:
f'Finished replaying event stream for conversation {conversation_id}'
)
conversation_init_data = await setup_init_convo_settings(
conversation_init_data = await setup_init_conversation_settings(
user_id, conversation_id, providers_set
)

View File

@@ -44,7 +44,7 @@ from openhands.server.data_models.conversation_info_result_set import (
from openhands.server.dependencies import get_dependencies
from openhands.server.services.conversation_service import (
create_new_conversation,
setup_init_convo_settings,
setup_init_conversation_settings,
)
from openhands.server.shared import (
ConversationStoreImpl,
@@ -466,7 +466,7 @@ async def start_conversation(
)
# Set up conversation init data with provider information
conversation_init_data = await setup_init_convo_settings(
conversation_init_data = await setup_init_conversation_settings(
user_id, conversation_id, providers_set.providers_set or []
)

View File

@@ -28,21 +28,23 @@ mcp_server = FastMCP(
)
HOST = f'https://{os.getenv("WEB_HOST", "app.all-hands.dev").strip()}'
CONVO_URL = HOST + '/conversations/{}'
CONVERSATION_URL = HOST + '/conversations/{}'
async def get_convo_link(service: GitService, conversation_id: str, body: str) -> str:
async def get_conversation_link(
service: GitService, conversation_id: str, body: str
) -> str:
"""Appends a followup link, in the PR body, to the OpenHands conversation that opened the PR"""
if server_config.app_mode != AppMode.SAAS:
return body
user = await service.get_user()
username = user.login
convo_url = CONVO_URL.format(conversation_id)
convo_link = (
f'@{username} can click here to [continue refining the PR]({convo_url})'
conversation_url = CONVERSATION_URL.format(conversation_id)
conversation_link = (
f'@{username} can click here to [continue refining the PR]({conversation_url})'
)
body += f'\n\n{convo_link}'
body += f'\n\n{conversation_link}'
return body
@@ -68,10 +70,12 @@ async def save_pr_metadata(
pr_number = int(match_merge_request.group(1))
if pr_number:
logger.info(f'Saving PR number: {pr_number} for convo {conversation_id}')
logger.info(f'Saving PR number: {pr_number} for conversation {conversation_id}')
conversation.pr_number.append(pr_number)
else:
logger.warning(f'Failed to extract PR number for convo {conversation_id}')
logger.warning(
f'Failed to extract PR number for conversation {conversation_id}'
)
await conversation_store.save_metadata(conversation)
@@ -116,9 +120,9 @@ async def create_pr(
)
try:
body = await get_convo_link(github_service, conversation_id, body or '')
body = await get_conversation_link(github_service, conversation_id, body or '')
except Exception as e:
logger.warning(f'Failed to append convo link: {e}')
logger.warning(f'Failed to append conversation link: {e}')
try:
response = await github_service.create_pr(
@@ -186,11 +190,11 @@ async def create_mr(
)
try:
description = await get_convo_link(
description = await get_conversation_link(
gitlab_service, conversation_id, description or ''
)
except Exception as e:
logger.warning(f'Failed to append convo link: {e}')
logger.warning(f'Failed to append conversation link: {e}')
try:
response = await gitlab_service.create_mr(
@@ -253,11 +257,11 @@ async def create_bitbucket_pr(
)
try:
description = await get_convo_link(
description = await get_conversation_link(
bitbucket_service, conversation_id, description or ''
)
except Exception as e:
logger.warning(f'Failed to append convo link: {e}')
logger.warning(f'Failed to append conversation link: {e}')
try:
response = await bitbucket_service.create_pr(

View File

@@ -42,7 +42,7 @@ async def create_new_conversation(
replay_json: str | None,
conversation_instructions: str | None = None,
conversation_trigger: ConversationTrigger = ConversationTrigger.GUI,
attach_convo_id: bool = False,
attach_conversation_id: bool = False,
git_provider: ProviderType | None = None,
conversation_id: str | None = None,
mcp_config: MCPConfig | None = None,
@@ -133,8 +133,8 @@ async def create_new_conversation(
image_urls=image_urls or [],
)
if attach_convo_id:
logger.warning('Attaching convo ID is deprecated, skipping process')
if attach_conversation_id:
logger.warning('Attaching conversation ID is deprecated, skipping process')
agent_loop_info = await conversation_manager.maybe_start_agent_loop(
conversation_id,
@@ -159,7 +159,7 @@ def create_provider_tokens_object(
return MappingProxyType(provider_information)
async def setup_init_convo_settings(
async def setup_init_conversation_settings(
user_id: str | None, conversation_id: str, providers_set: list[ProviderType]
) -> ConversationInitData:
"""Set up conversation initialization data with provider tokens.
@@ -198,8 +198,8 @@ async def setup_init_convo_settings(
if user_secrets:
session_init_args['custom_secrets'] = user_secrets.custom_secrets
convo_init_data = ConversationInitData(**session_init_args)
conversation_init_data = ConversationInitData(**session_init_args)
# We should recreate the same experiment conditions when restarting a conversation
return ExperimentManagerImpl.run_conversation_variant_test(
user_id, conversation_id, convo_init_data
user_id, conversation_id, conversation_init_data
)