Skip to content

Conversation

@cristipufu
Copy link
Member

@cristipufu cristipufu commented Jul 3, 2025

Summary

This PR renames and remaps existing server categories, updating both the enum definitions and the runtime logic to use the new types.

  • Renamed External, Local, and Hosted to Command, Coded, and SelfHosted in the enum and its descriptions
  • Updated _runtime.py logic and comments to return and handle the new server types
  • Adjusted environment‐variable injection to apply only to the Coded server type

@cristipufu cristipufu requested review from Copilot and edis-uipath July 3, 2025 12:56
@cristipufu cristipufu self-assigned this Jul 3, 2025
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR renames and remaps existing server categories, updating both the enum definitions and the runtime logic to use the new types.

  • Renamed External, Local, and Hosted to Command, Coded, and SelfHosted in the enum and its descriptions
  • Updated _runtime.py logic and comments to return and handle the new server types
  • Adjusted environment‐variable injection to apply only to the Coded server type

Reviewed Changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.

File Description
src/uipath_mcp/_cli/_runtime/_runtime.py Updated comments and server_type method to use new enum values and remapped behavior
src/uipath_mcp/_cli/_runtime/_context.py Renamed enum members and their docstrings in UiPathServerType; updated get_description mapping
Comments suppressed due to low confidence (2)

src/uipath_mcp/_cli/_runtime/_runtime.py:548

  • [nitpick] The docstring for this method could be expanded to describe the mapping from packaged/sandboxed flags to the new server types for clarity.
    def server_type(self) -> UiPathServerType:

src/uipath_mcp/_cli/_runtime/_context.py:42

  • Add unit tests for the new enum values (Command, Coded, SelfHosted) to ensure get_description returns the correct strings and that from_string handles them as expected.
    def get_description(cls, server_type: "UiPathServerType") -> str:

# if server is Local, include environment variables
if self.server_type is UiPathServerType.Local:
# if server is Coded, include environment variables
if self.server_type is UiPathServerType.Coded:
Copy link

Copilot AI Jul 3, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Comparing enum members using is can be brittle; consider using == for readability and consistency with common enum comparison patterns.

Suggested change
if self.server_type is UiPathServerType.Coded:
if self.server_type == UiPathServerType.Coded:

Copilot uses AI. Check for mistakes.
@cristipufu cristipufu merged commit 3f551f7 into main Jul 3, 2025
7 checks passed
@cristipufu cristipufu deleted the fix/update_server_types branch July 3, 2025 12:59
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