pub fn GetURLFromURIComponentsDTO(URIDTO: &Value) -> Result<Url, CommonError>Expand description
Helper to get a Url from a serde_json::Value which is expected to be a
UriComponents DTO from VS Code, a plain URI string, or a UriComponents
object without the external convenience field.
Cocoon’s wire shapes vary by call site:
Diagnostic.Setand a few others send the URI as a plain string (the canonical form returned byUri.toString()).MainThread*boundaries send the{scheme, authority, path, query, fragment, external}object that vs/base/common/uri.ts emits viaURI.toJSON().- Some legacy paths send
{scheme, path}with noexternal.
All three are valid; Mountain accepts whichever arrives. Without this the
Diagnostic.Set call from vscode.languages.createDiagnosticCollection().set
trips the breaker after 5 publishes and silences every linter / compiler
across all language extensions.