Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
67 changes: 35 additions & 32 deletions coding-agent/src/coding_agent/__main__.py
Original file line number Diff line number Diff line change
Expand Up @@ -798,14 +798,15 @@ def _remote_run_once(
else:
raise
else:
has_git_workspace_source = (
workspace_source is not None and workspace_source.get("kind") == "git"
)
_print_remote_result_next_steps(
remote_name=name,
session_id=session_id,
repo_path=repo_path,
can_publish_branch=(
workspace_source is not None
and workspace_source.get("kind") == "git"
),
can_diff_patch=has_git_workspace_source,
can_publish_branch=has_git_workspace_source,
)
if stream_error is not None:
raise stream_error
Expand Down Expand Up @@ -916,6 +917,7 @@ def _print_remote_result_next_steps(
remote_name: str,
session_id: str,
repo_path: Path | None,
can_diff_patch: bool,
can_publish_branch: bool,
) -> None:
click.echo(f"Remote session {session_id} left open for result inspection.")
Expand All @@ -934,36 +936,37 @@ def _print_remote_result_next_steps(
]
)
)
click.echo(
"Show changed files: "
+ _format_cli_command(
[
"python",
"-m",
"coding_agent",
"remote",
"diff",
remote_name,
"--session",
session_id,
]
if can_diff_patch:
click.echo(
"Show changed files: "
+ _format_cli_command(
[
"python",
"-m",
"coding_agent",
"remote",
"diff",
remote_name,
"--session",
session_id,
]
)
)
)
click.echo(
"Export patch: "
+ _format_cli_command(
[
"python",
"-m",
"coding_agent",
"remote",
"patch",
remote_name,
"--session",
session_id,
]
click.echo(
"Export patch: "
+ _format_cli_command(
[
"python",
"-m",
"coding_agent",
"remote",
"patch",
remote_name,
"--session",
session_id,
]
)
)
)
if can_publish_branch:
click.echo(
"Publish review branch: "
Expand Down
10 changes: 6 additions & 4 deletions coding-agent/tests/cli/test_remote_client.py
Original file line number Diff line number Diff line change
Expand Up @@ -490,8 +490,9 @@ def fake_stream_prompt(
assert result.exit_code == 0
assert "Created one-shot remote session sess-run on remote dev" in result.output
assert "Remote session sess-run left open for result inspection." in result.output
assert "coding_agent remote diff dev --session sess-run" in result.output
assert "coding_agent remote patch dev --session sess-run" in result.output
assert "coding_agent remote result dev --session sess-run" in result.output
assert "coding_agent remote diff dev --session sess-run" not in result.output
assert "coding_agent remote patch dev --session sess-run" not in result.output
assert "coding_agent remote publish dev" not in result.output
assert "coding_agent remote sessions close dev sess-run" in result.output
assert calls == [
Expand Down Expand Up @@ -1840,8 +1841,9 @@ def fake_stream_prompt(

assert result.exit_code == 0
assert "Remote session sess-run left open for result inspection." in result.output
assert "coding_agent remote diff dev --session sess-run" in result.output
assert "coding_agent remote patch dev --session sess-run" in result.output
assert "coding_agent remote result dev --session sess-run" in result.output
assert "coding_agent remote diff dev --session sess-run" not in result.output
assert "coding_agent remote patch dev --session sess-run" not in result.output
assert "coding_agent remote publish dev" not in result.output
assert "coding_agent remote download dev --session sess-run --repo" in result.output
assert "Downloaded remote workspace snapshot" not in result.output
Expand Down