DeepSeek-Reasonix icon indicating copy to clipboard operation
DeepSeek-Reasonix copied to clipboard

fix(cli): accept remote connect flags before or after host name

Open skyzhao1223 opened this issue 4 months ago • 1 comments

Summary

  • reasonix remote connect used Go's default flag.Parse, which stops at the first positional. Documented forms like remote connect <name> --open (help text + GUIDE) therefore failed and printed usage.
  • Parse both <name> [flags] and [flags] <name>, keeping stdlib single-dash flags such as -open.
  • Add focused unit coverage for both orders and common error cases.

Issues

Fixes #7255

Verification

  • go test ./internal/cli/ -run TestParseRemoteConnectSyntaxFlagOrder

Cache impact

Cache-impact: none — CLI argument parsing only; no provider-visible prompt, tool schema, or compaction changes. Cache-guard: N/A — no cache-sensitive paths touched. System-prompt-review: N/A

skyzhao1223 avatar Aug 03 '26 10:08 skyzhao1223

Thank you, @skyzhao1223. Your core contribution from #7306 has been preserved and adapted in #7311, which is now merged into main-v2:

  • both remote connect <name> [flags] and remote connect [flags] <name>;
  • standard-library -open and remote open compatibility;
  • the focused parser and flag-order/error test matrix.

The integration commit fb9af7d3 records you with a public Co-authored-by trailer, so your contribution is preserved in the repository history as well as documented in the integration PR. #7311 additionally routes the parser through the shared CLI help/error contract: help exits with status 0, while malformed flags remain concise and exit with status 2.

The fix is now on main-v2 and will be included in the next release. The source branch was not modified.

SivanCola avatar Aug 03 '26 10:08 SivanCola