mirror of
https://github.com/microsoft/vscode.git
synced 2026-09-07 16:14:56 +01:00
* Support top-level model in managed settings while retaining permissions.model VS Code drove the default chat model (ChatDefaultModel policy) only from the legacy nested `permissions.model` managed-settings key. Also consume the new top-level `model` key, retaining `permissions.model` for original-schema deployments; when both are present the top-level `model` wins. Because the server and file channels funnel through `normalizeManagedSettings` (which flattens scalar leaves) and native MDM watches only declared keys, the fix is: declare `model` on the policy so it is watched + projected on every channel, and resolve the top-level-over-legacy precedence in the policy value callback (`managedModelValue`). Precedence is key-level, so a non-empty top-level `model` wins even over a `permissions.model` from a higher-precedence channel; a blank top-level value falls back to the legacy key. Fixes #330364 Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> * Address PR review: condense JSDoc/comments and doc table Trim the model constant + `managedModelValue` JSDoc to the 1-2 sentence limit, drop the multi-line inline comments in the normalize tests, and leave the schema table's `x-composition.strategy` cells as em dashes (top-level-vs-legacy precedence stays in the constants table and the "Multi-key precedence" note). Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> --------- Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>