feat(FR-2440): add CLI command parser utility for Paste Your Command#6341
Conversation
|
Warning This pull request is not mergeable via GitHub because a downstack PR is open. Once all requirements are satisfied, merge this PR as a stack on Graphite.
How to use the Graphite Merge QueueAdd either label to this PR to merge it via the merge queue:
You must have a Graphite account in order to use the merge queue. Sign up using this link. An organization admin has required the Graphite Merge Queue in this repository. Please do not merge from GitHub as this will restart CI on PRs being processed by the merge queue. This stack of pull requests is managed by Graphite. Learn more about stacking. |
Coverage report for
|
St.❔ |
Category | Percentage | Covered / Total |
|---|---|---|---|
| 🔴 | Statements | 9.37% (+0.7% 🔼) |
1689/18023 |
| 🔴 | Branches | 8.51% (+0.91% 🔼) |
1068/12553 |
| 🔴 | Functions | 5.72% (+0.11% 🔼) |
284/4963 |
| 🔴 | Lines | 9.02% (+0.66% 🔼) |
1580/17525 |
Show new covered files 🐣
St.❔ |
File | Statements | Branches | Functions | Lines |
|---|---|---|---|---|---|
| 🟢 | ... / parseCliCommand.ts |
84.43% | 73.56% | 100% | 84.77% |
Test suite run success
822 tests passing in 38 suites.
Report generated by 🧪jest coverage report action from ee6fe60
There was a problem hiding this comment.
Pull request overview
Adds the Wave 1 (FR-2440) client-side CLI command parsing utility that will back the upcoming “Paste Your Command” workflow in the Service Launcher UI, plus unit tests and planning/context docs under .specs/.
Changes:
- Introduce
parseCliCommand()+tokenizeShellCommand()utility to detect runtime, port, GPU hint, docker env/port mappings, and producestart_commandtokens. - Add Jest unit tests covering runtime detection, flag extraction, docker parsing, and spec examples.
- Add the “Paste Your Command” dev plan and project context tracking docs.
Reviewed changes
Copilot reviewed 6 out of 6 changed files in this pull request and generated 3 comments.
Show a summary per file
| File | Description |
|---|---|
react/src/helper/parseCliCommand.ts |
New command tokenizer + parser (runtime/port/GPU/docker) for “Paste Your Command”. |
react/src/helper/parseCliCommand.test.ts |
New Jest coverage for tokenizer + parser behaviors and spec examples. |
.specs/paste-your-command/dev-plan.md |
Implementation plan and integration notes for the stacked PRs (FR-2440/2441/2442). |
.specs/paste-your-command/.context/tasks.md |
Task tracking snapshot for the epic waves. |
.specs/paste-your-command/.context/progress.md |
Progress tracking snapshot for the epic. |
.specs/paste-your-command/.context/findings.md |
Placeholder findings/decisions log for the epic. |
Pure TypeScript utility that parses CLI commands (vllm serve, sglang, docker run, etc.) and extracts runtime type, port, GPU hints, docker env vars, and shell-tokenized start_command arrays. All client-side parsing for closed-network compatibility. Includes 38 unit tests covering all spec acceptance criteria.
2b8651c to
ee6fe60
Compare

Resolves #6337 (FR-2440)
Summary
parseCliCommand.ts) that parses CLI commands (vllm serve, sglang, docker run, etc.) and extracts runtime type, port, GPU hints, docker env vars, and shell-tokenizedstart_commandarraystokenizeShellCommand) supporting quoted strings, escape characters, and multi-line commands