You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: .github/instructions/best-practices.instructions.md
+5Lines changed: 5 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -23,6 +23,11 @@ applyTo: src/vs/**
23
23
24
24
- Don't use context keys as a source of truth for application logic (for example, by reading `IContextKeyService.getContextKeyValue()` and branching on the result). Read the state from its owning service or model instead. Context keys are intended for declarative enablement and visibility, such as when clauses, command preconditions, and menu contributions.
25
25
26
+
## Multi-Window DOM
27
+
28
+
- Always create workbench DOM elements in the main window JavaScript realm, including elements that will be rendered in an auxiliary window. Use helpers such as `dom.$` and `dom.h`, or use `mainWindow.document.createElement`. Do not use `targetWindow.document.createElement` or `element.ownerDocument.createElement`; auxiliary windows intentionally reject `createElement` so that checks such as `element instanceof HTMLElement` continue to work.
29
+
- This rule applies to DOM element creation, not to window-bound APIs. Resolve the target window with `dom.getWindow(element)` when using APIs such as timers, animation frames, focus, observers, or `getComputedStyle`.
30
+
26
31
## URI
27
32
28
33
- Don't hardcode URI scheme strings like `'file'`, `'untitled'`, or `'vscode-remote'`. Use the `Schemas` constants from `vs/base/common/network.ts` (e.g. `Schemas.file`, `Schemas.untitled`, `Schemas.vscodeRemote`).
description: Use when writing or reviewing model-facing language model tool descriptions.
3
+
applyTo: "src/vs/**/*Tool.ts,src/vs/**/*Tools.ts"
4
+
---
5
+
6
+
# Language model tool descriptions
7
+
8
+
Apply these rules only when adding or changing a model-facing tool description, such as `modelDescription`. They do not govern display names, user-facing messages, confirmation text, or routine schema property descriptions.
9
+
10
+
- Begin with a direct imperative statement of the tool's capability.
11
+
- When tool selection could be ambiguous, state the positive invocation criteria explicitly.
12
+
- Place exclusions for likely near-neighbor requests immediately after the positive criteria.
13
+
- Describe persistent, external, costly, or otherwise consequential side effects.
14
+
- State meaningful defaults, cross-field requirements, and prerequisite tool calls that are not obvious from the input schema.
15
+
- Put approval, cancellation, retry, repeat-call, and polling guidance last.
16
+
- Do not repeat the complete input schema in prose.
17
+
- Keep descriptions concise and scale their detail with the ambiguity and cost of incorrect selection.
18
+
- Preserve terminology and formatting conventions used by related tools.
19
+
- Reserve `MUST`, `ONLY`, `CRITICAL`, and direct "Do not" language for likely, consequential misuse.
20
+
21
+
When correctness depends on specific model-facing guidance, add a focused test for the required semantic clauses. Prefer checking a small set of meaningful phrases or conditions over snapshotting the entire description. Do not test routine descriptive prose.
Copy file name to clipboardExpand all lines: .github/instructions/source-code-organization.instructions.md
+2Lines changed: 2 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -64,4 +64,6 @@ class MyComponent {
64
64
}
65
65
```
66
66
67
+
Decorated service parameters must use their canonical service interface. Do not invent local subset interfaces or `Pick<...>` aliases in production to simplify tests; keep partial stubs, adapters, and other test-only conveniences in test code.
68
+
67
69
Services are provided via `registerSingleton(IMyService, MyServiceImpl, InstantiationType.Delayed)`.
Proxy** or **Tools > Override Windows Proxy**). VS Code clients must also add
30
30
the displayed `http.proxy` property to `settings.json`.
31
+
-**File-based settings (no proxy):** expand **Deploy as a file** under the
32
+
Managed Settings response body and run the copied per-platform command to write
33
+
the current body to `managed-settings.json` on the device. Restart the client to
34
+
load it. Use it to skip proxying or to test precedence against a server-managed
35
+
response. See [Deploying file-based settings](https://docs.github.com/en/copilot/how-tos/administer-copilot/manage-for-enterprise/manage-agents/configure-enterprise-managed-settings#deploying-file-based-settings).
31
36
32
37
Use **Clear SDK Policy Cache**, expand the macOS or Windows section, and run the
33
38
copied command when the runtime's fresh managed-settings cache prevents a network
0 commit comments