* Fix --commit-id flag for code serve-web
Fixes a bug where passing --commit-id during `code serve-web` would
prevent serve-web from downloading a new version of the client at all.
* Update cli/src/commands/serve_web.rs
---------
Co-authored-by: Connor Peet <connor@peet.io>
* Initial plan
* Fix serve-web port randomization when --port 0 is specified
Co-authored-by: connor4312 <2230985+connor4312@users.noreply.github.com>
* Fix serve-web to display actual bound port instead of 0
When --port 0 is specified, the OS assigns a random port but the
logging was showing port 0 instead of the actual assigned port.
Fixed by reading the local_addr() from the server builder after binding.
Co-authored-by: connor4312 <2230985+connor4312@users.noreply.github.com>
---------
Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Co-authored-by: connor4312 <2230985+connor4312@users.noreply.github.com>
The CLI’s `RequestedVersion::Commit` parser rejected many valid commit hashes and allowed invalid ones due to an erroneous regular expression:
* **Old pattern:** `^[a-e0-f]{40}$`
* Allowed non-hex characters outside the `a–f` range
* Excluded the valid hex digit `f` and any uppercase letters
* **New pattern:** [(?i)^[0-9a-f]{40}$](cci:1://file:///d:/Github/vscode/cli/src/desktop/version_manager.rs:102:1-107:2)
* [(?i)](cci:1://file:///d:/Github/vscode/cli/src/desktop/version_manager.rs:102:1-107:2) enables case-insensitive matching (accepts `A–F`)
* Character class now correctly restricts input to hexadecimal digits `0-9` and `a-f`
* Ensures the string is exactly 40 characters, matching a valid SHA-1
#### Impact
`code version use <commit>` and related commands could silently fail or accept malformed commit IDs, leading to unexpected version resolution behavior.
With this fix, only valid 40-character hexadecimal commit hashes are accepted, restoring reliable version selection and preventing subtle bugs.
#### Notes
No API changes; the fix is a single-line update in [cli/src/desktop/version_manager.rs](cci:7://file:///d:/Github/vscode/cli/src/desktop/version_manager.rs:0:0-0:0).
* Revert "fix #232043 (#233596)"
This reverts commit e9d6c6afc0b99827d7732099ced7e3bb3101ca4c.
* #232043 revert cli command and support downloading VSIX in UI
- Don't set a config option for update interval. We don't let the one
in core be configurable, don't see a huge need for this.
- Don't start the server when the update is available
- Fix some race conditions
- Fix some clippy lints on Rust 1.81
Refs #219632
Seems like PRSS sometimes(?) doesn't return the full archive name in
the response. I don't reproduce this, but others consistently do. This
PR removes the dependency on the URL path and instead checks for the
gzip magic number in the first two bytes of the archive to figure out
what to do.
I made a change this past iteration to use `CREATE_BREAKAWAY_FROM_JOB`
in order to allow the code-server process to outlive SSH connections run
from the exec server.
However, it appears that this _can_ break things if it's run from a job
that doesn't have the JOB_OBJECT_LIMIT_BREAKAWAY_OK flag set. I'm not
a winapi expert, so this is a simple though perhaps inefficient change
to probe whether we can do this via an echo command before starting the
server.