diff --git a/pyproject.toml b/pyproject.toml index 503029e..a280b91 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [project] name = "uipath-dev" -version = "0.0.49" +version = "0.0.50" description = "UiPath Developer Console" readme = { file = "README.md", content-type = "text/markdown" } requires-python = ">=3.11" diff --git a/src/uipath/dev/services/debug_bridge.py b/src/uipath/dev/services/debug_bridge.py index 31b693c..55541db 100644 --- a/src/uipath/dev/services/debug_bridge.py +++ b/src/uipath/dev/services/debug_bridge.py @@ -20,13 +20,13 @@ class TextualDebugBridge: def __init__(self, mode: ExecutionMode = ExecutionMode.DEBUG): """Initialize the debug bridge.""" self._mode = mode - self._auto_resume = mode == ExecutionMode.RUN + self._auto_resume = mode != ExecutionMode.DEBUG self._connected = False self._resume_event = asyncio.Event() self._resume_data: dict[str, Any] | None = None self._terminate_event = asyncio.Event() self._breakpoints: list[str] | Literal["*"] = ( - [] if mode == ExecutionMode.RUN else "*" + "*" if mode == ExecutionMode.DEBUG else [] ) # Callbacks to UI diff --git a/tests/e2e/test_textual_run.py b/tests/e2e/test_textual_run.py index 235bae7..f7cadfc 100644 --- a/tests/e2e/test_textual_run.py +++ b/tests/e2e/test_textual_run.py @@ -6,7 +6,7 @@ import asyncio import json -from textual.widgets import Footer, Select +from textual.widgets import Footer, Input, Select from tests.conftest import ENTRYPOINT_NUMBERS from uipath.dev.ui.panels import NewRunPanel, RunDetailsPanel, RunHistoryPanel @@ -171,3 +171,33 @@ async def test_new_run_button(app): assert "hidden" not in new_panel.classes assert "hidden" in details.classes + + +async def test_chat_mode_greeting(app): + """Start a chat run, send a message, verify it completes without timeout.""" + async with app.run_test() as pilot: + await _wait_for_entrypoint(app) + await pilot.pause() + + # Set valid JSON input (required for run creation) + json_input = app.query_one("#json-input", JsonInput) + json_input.text = json.dumps({"name": "Tester"}) + await pilot.pause() + + # Click the Chat button to start a chat-mode run + await pilot.click("#chat-btn") + await pilot.pause() + + # Details panel should be visible with chat input focused + details_panel = app.query_one("#details-panel", RunDetailsPanel) + chat_input = details_panel.query_one("#chat-input", Input) + + # Type a message and submit + chat_input.value = "Hello there" + await pilot.press("enter") + + # Wait for the run to complete (would timeout at 60s if auto-resume is broken) + run = await _wait_for_status(app, "completed") + + assert run.output_data is not None + assert "greeting" in run.output_data diff --git a/uv.lock b/uv.lock index a1ba845..f7a7b39 100644 --- a/uv.lock +++ b/uv.lock @@ -1400,7 +1400,7 @@ wheels = [ [[package]] name = "uipath-dev" -version = "0.0.49" +version = "0.0.50" source = { editable = "." } dependencies = [ { name = "fastapi" },