Skip to content

Add interactive "Start with Options..." command#354

Draft
Copilot wants to merge 3 commits intomainfrom
copilot/add-start-with-options-command
Draft

Add interactive "Start with Options..." command#354
Copilot wants to merge 3 commits intomainfrom
copilot/add-start-with-options-command

Conversation

Copy link
Contributor

Copilot AI commented Mar 2, 2026

New Start with Options... command that launches Dev Proxy with interactive prompts for all CLI-available proxy settings, complementing the existing quick-launch Start command.

Command registration

  • Added startWithOptions to Commands in src/constants.ts
  • Added command definition ($(debug-alt) icon) and editor toolbar menu entry in package.json

Implementation (src/commands/proxy.ts)

  • 13-step interactive flow via showQuickPick/showInputBox covering: config file, port, API port, IP address, system proxy, cert install, log level, failure rate, URLs to watch, record, no first run, timeout, watch PIDs, watch process names
  • Config file picker discovers devproxyrc.{json,jsonc} files in workspace
  • Only non-default values emit CLI flags — defaults produce a clean command
  • Each step returns early on Escape (cancel)
  • Input validation for ports (1–65535), IP addresses (octet-level), failure rate (0–100), PIDs, timeout
// Resulting command built from selected options
const command = [devProxyExe, ...args].join(' ');
// e.g. "devproxy --config-file "path/devproxyrc.json" --port 9000 --log-level debug --record"

Tests & docs

  • Added registration test in src/test/commands.test.ts
  • Updated CHANGELOG.md and README.md commands table
Original prompt

This section details on the original issue you should resolve

<issue_title>Add interactive "Start with Options..." experience</issue_title>
<issue_description>## Summary

Add a new Start with Options... command that provides an interactive launch experience for Dev Proxy, complementing the existing quick-launch Start command. The command should surface the proxy settings available via the Dev Proxy CLI as documented in the Proxy Settings technical reference.

Motivation

The current Start command launches Dev Proxy with the active config file, no questions asked. Sometimes you need more control over how the proxy starts. Rather than bolting individual settings onto the existing command, provide a dedicated interactive command that exposes the CLI-available proxy settings.

Supersedes #223 (env vars support).

Proposed UX

  1. New command: Dev Proxy Toolkit: Start with Options... (dev-proxy-toolkit.start-with-options)
  2. Editor icon: Add a toolbar icon next to the existing Start icon
  3. Interactive prompts (multi-step quick pick or input boxes) for the following proxy settings:
Setting CLI flag Input type Default
Config file (positional) Quick pick from detected devproxyrc.json/devproxyrc.jsonc files Active editor file
Port -p, --port <port> Number input 8000
API port --api-port <apiPort> Number input 8897
IP address --ip-address <ipAddress> Text input 127.0.0.1
As system proxy --as-system-proxy Boolean toggle true
Install cert --install-cert Boolean toggle true
Log level --log-level <loglevel> Quick pick (trace, debug, information, warning, error) information
Failure rate -f, --failure-rate <failurerate> Number input (0–100) 50
URLs to watch -u, --urls-to-watch <urlsToWatch> Multi-value text input From config file
Record --record Boolean toggle off
No first run --no-first-run Boolean toggle off
Timeout -t, --timeout <seconds> Number input none
Watch PIDs --watch-pids <pids> Multi-value number input none
Watch process names --watch-process-names <names> Multi-value text input none

Implementation notes

  • Keep the existing Start command unchanged (quick launch, no prompts)
  • Selected options should be mapped to CLI flags passed to the Dev Proxy process
  • Consider whether to remember the last-used options per workspace
  • The task provider already supports args — the interactive command should produce the same shape

Key implementation entry points

Follow the AGENTS.md guide for adding a new command.

1. Register the command ID

Add startWithOptions: 'dev-proxy-toolkit.start-with-options' to the Commands object in src/constants.ts.

2. Add to package.json

Add the command under contributes.commands and add an editor toolbar icon under contributes.menus (next to the existing Start icon).

3. Implement the command

Add the new startWithOptions command handler in src/commands/proxy.ts. Use the existing startDevProxy function as a reference — the new command should collect options via interactive prompts, then build CLI flags and pass the command to the terminal via TerminalService.

For an example of interactive prompts (input boxes), see discoverUrlsToWatch.

4. Register the command

Wire up the new command in registerProxyCommands.

5. Task provider alignment

The DevProxyTaskDefinition interface already supports configFile and args. The buildArgumentsFromDefinition method shows how args are mapped to CLI flags.

6. Add tests

Add command registration test in src/test/commands.test.ts and functional tests for the new command.

7. Update CHANGELOG.md and README.md

Per AGENTS.md conventions, add a ### Added: entry and update the Commands table in README.md.

Related

  • Closes dev-proxy...

💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.

Copilot AI and others added 2 commits March 2, 2026 14:23
Co-authored-by: garrytrinder <11563347+garrytrinder@users.noreply.github.com>
Co-authored-by: garrytrinder <11563347+garrytrinder@users.noreply.github.com>
Copilot AI changed the title [WIP] Add interactive 'Start with Options...' command for Dev Proxy Add interactive "Start with Options..." command Mar 2, 2026
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.

Add interactive "Start with Options..." experience

2 participants