Skip to content

Add default-folder, default-workspace and disable-telemetry to serve-web CLI#299512

Open
danplischke wants to merge 3 commits intomicrosoft:mainfrom
danplischke:main
Open

Add default-folder, default-workspace and disable-telemetry to serve-web CLI#299512
danplischke wants to merge 3 commits intomicrosoft:mainfrom
danplischke:main

Conversation

@danplischke
Copy link

Closes: #299511

This PR adds support for passing the following options and flag for the code server CLI to the Rust CLI.

  • --default-folder <path> – Sets the default workspace folder to open when no input is specified in the browser URL.
  • --default-workspace <path> – Sets the default workspace file to open when no input is specified in the browser URL.
  • --disable-telemetry – Disables telemetry reporting.

To test, run the following commands in the cli directory:

export VSCODE_CLI_QUALITY=stable
export VSCODE_CLI_UPDATE_URL=https://update.code.visualstudio.com 
export VSCODE_CLI_TUNNEL_SERVER_QUALITIES='{"stable":{"serverApplicationName":"code-server"}}'  

cargo run -- serve-web --accept-server-license-terms --default-folder .  --disable-telemetry

cargo run -- serve-web --accept-server-license-terms --default-workspace .

Copilot AI review requested due to automatic review settings March 5, 2026 15:40
@danplischke
Copy link
Author

@microsoft-github-policy-service agree

Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR exposes three additional CLI flags from the underlying TypeScript code server to the Rust CLI's serve-web command: --default-folder, --default-workspace, and --disable-telemetry. These options allow users to specify a default workspace folder/file to open when no input is given in the browser URL, and to disable telemetry reporting.

Changes:

  • Added three new fields (default_folder, default_workspace, disable_telemetry) to the ServeWebArgs struct with appropriate clap annotations.
  • Added pass-through logic in start_version to forward these new arguments to the spawned server process command, following the same pattern as existing options.

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.

File Description
cli/src/commands/args.rs Adds default_folder, default_workspace (both Option<String>), and disable_telemetry (bool) fields to ServeWebArgs.
cli/src/commands/serve_web.rs Forwards the new arguments to the spawned server process command line, matching existing forwarding patterns.

You can also share your feedback on Copilot code review. Take the survey.

@connor4312 connor4312 enabled auto-merge March 24, 2026 17:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Expose additional flags to serve-web Rust CLI from underlying TS server CLI

5 participants