Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
37 commits
Select commit Hold shift + click to select a range
abc1860
Tree shake extensions
mjbvz Feb 19, 2026
2d698cf
Disallow dynamic require/import in extensions
mjbvz Feb 19, 2026
d36696b
Esbuild the html and json extensions
mjbvz Feb 19, 2026
d9c2e38
Update extensions/html-language-features/esbuild.mts
mjbvz Feb 19, 2026
70008ff
Use import.resolve to get ts location
mjbvz Feb 19, 2026
f029e4c
style: adjust margins and border radius for chat tip toolbar action i…
mrleemurray Feb 19, 2026
eb1260a
Add queue management options in chat handling (#296317)
jrieken Feb 19, 2026
d008aeb
Improvements to model picker (#296313)
sandy081 Feb 19, 2026
aa0b23d
sessions - remove "In progress" grouping for now (#296306)
bpasero Feb 19, 2026
390e82d
sessions - use protocol for opening vscode (#296320)
bpasero Feb 19, 2026
6ee7d55
sessions - hide group counts (#296321)
bpasero Feb 19, 2026
16c4d66
Update eslint.config.js
mjbvz Feb 19, 2026
b1f7bdb
sessions window polish
benibenj Feb 19, 2026
e80ddbf
Merge pull request #296227 from microsoft/dev/mjbvz/esbuild-html-json
mjbvz Feb 19, 2026
ae42b70
Merge pull request #296254 from microsoft/mrleemurray/delightful-yell…
mrleemurray Feb 19, 2026
bf25539
Bump minimatch from 5.1.6 to 10.2.1 in /extensions/npm (#296143)
dependabot[bot] Feb 19, 2026
92e2edc
implement `vscode_askQuestions` tool in core (#296135)
meganrogge Feb 19, 2026
3453156
update yolo mode description to include autoReply link (#296097)
meganrogge Feb 19, 2026
724656e
Hide 'Used references' button in chat in agent mode (#296144)
daviddossett Feb 19, 2026
8eb7cee
Add 'Allow all files in this repository' option for external file acc…
alexdima Feb 19, 2026
1f29126
check policy before showing YOLO tip, only show if never enabled befo…
meganrogge Feb 19, 2026
1dcb39c
center align question carousel X button (#296351)
meganrogge Feb 19, 2026
ac5c9ef
Merge pull request #296327 from microsoft/benibenj/many-magpie
benibenj Feb 19, 2026
3310fe6
Merge pull request #296216 from mjbvz/dev/mjbvz/treeshake-ext
mjbvz Feb 19, 2026
aad7cbe
GitExtensionService - initial scaffolding of the service (#296341)
lszomoru Feb 19, 2026
75c92f0
testing: show running badge on Activity Bar while tests are running (…
murataslan1 Feb 19, 2026
dda13e8
play OS notification to indicate question has come in, reusing settin…
meganrogge Feb 19, 2026
8679e41
Sessions - disable worktree detection (#296354)
lszomoru Feb 19, 2026
e4e882f
polishing model picker and enable it in chat (#296356)
sandy081 Feb 19, 2026
e881d79
encourage concise questions (#296359)
meganrogge Feb 19, 2026
ddc18bb
hygiene skill updates (#296347)
joshspicer Feb 19, 2026
99409ad
sessions - fix some issues found by AI (#296364)
bpasero Feb 19, 2026
9bf4d91
enable `askQuestions` to be invoked by subagent (#296361)
meganrogge Feb 19, 2026
8fa78fc
add tips for thinking style/phrases (#296373)
meganrogge Feb 19, 2026
a0ff9d1
Add notification keyboard interaction hints to editor accessibility h…
Copilot Feb 19, 2026
4cafdff
Merge pull request #296222 from mjbvz/dev/mjbvz/robust-goat
mjbvz Feb 19, 2026
67846c0
fix add and managing models actions and show filter only when there a…
sandy081 Feb 19, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
37 changes: 25 additions & 12 deletions .github/skills/hygiene/SKILL.md
Original file line number Diff line number Diff line change
@@ -1,25 +1,38 @@
---
name: hygiene
description: Use when making code changes to ensure they pass VS Code's hygiene checks. Covers the pre-commit hook, unicode restrictions, string quoting rules, copyright headers, indentation, formatting, ESLint, and stylelint. Run the hygiene check before declaring work complete.
---

# Hygiene Checks

VS Code runs a hygiene check as a git pre-commit hook. Commits will be rejected if hygiene fails.

## What it checks

The hygiene linter scans all staged `.ts` files for issues including (but not limited to):

- **Unicode characters**: Non-ASCII characters (em-dashes, curly quotes, emoji, etc.) are rejected. Use ASCII equivalents in comments and code.
- **Double-quoted strings**: Only use `"double quotes"` for externalized (localized) strings. Use `'single quotes'` everywhere else.
- **Copyright headers**: All files must include the Microsoft copyright header.
## Running the hygiene check

## How it runs
**Always run the pre-commit hygiene check before declaring work complete.** This catches issues that would block a commit.

The git pre-commit hook (via husky) runs `npm run precommit`, which executes:
To run the hygiene check on your staged files:

```bash
node --experimental-strip-types build/hygiene.ts
npm run precommit
```

This scans only **staged files** (from `git diff --cached`). To run it manually:
This executes `node --experimental-strip-types build/hygiene.ts`, which scans only **staged files** (from `git diff --cached`).

To check specific files directly (without staging them first):

```bash
npm run precommit
node --experimental-strip-types build/hygiene.ts path/to/file.ts
```

## What it checks

The hygiene linter scans staged files for issues including (but not limited to):

- **Unicode characters**: Non-ASCII characters (em-dashes, curly quotes, emoji, etc.) are rejected. Use ASCII equivalents in comments and code. Suppress with `// allow-any-unicode-next-line` or `// allow-any-unicode-comment-file`.
- **Double-quoted strings**: Only use `"double quotes"` for externalized (localized) strings. Use `'single quotes'` everywhere else.
- **Copyright headers**: All files must include the Microsoft copyright header.
- **Indentation**: Tabs only, no spaces for indentation.
- **Formatting**: TypeScript files must match the formatter output (run `Format Document` to fix).
- **ESLint**: TypeScript files are linted with ESLint.
- **Stylelint**: CSS files are linted with stylelint.
24 changes: 12 additions & 12 deletions .vscode/sessions.json
Original file line number Diff line number Diff line change
@@ -1,28 +1,28 @@
{
"scripts": [
{
"name": "run Windows",
"command": "code.bat"
"name": "Run (Windows)",
"command": ".\\scripts\\code.bat"
},
{
"name": "run macOS",
"command": "code.sh"
"name": "Run (macOS)",
"command": "./scripts/code.sh"
},
{
"name": "run Linux",
"command": "code.sh"
"name": "Run (Linux)",
"command": "./scripts/code.sh"
},
{
"name": "run tests Windows",
"command": "test.bat"
"name": "Tests (Windows)",
"command": ".\\scripts\\test.bat"
},
{
"name": "run tests macOS",
"command": "test.sh"
"name": "Tests (macOS)",
"command": "./scripts/test.sh"
},
{
"name": "run tests Linux",
"command": "test.sh"
"name": "Tests (Linux)",
"command": "./scripts/test.sh"
}
]
}
4 changes: 2 additions & 2 deletions build/lib/policies/policyData.jsonc
Original file line number Diff line number Diff line change
Expand Up @@ -87,8 +87,8 @@
"minimumVersion": "1.99",
"localization": {
"description": {
"key": "autoApprove2.description",
"value": "Global auto approve also known as \"YOLO mode\" disables manual approval completely for all tools in all workspaces, allowing the agent to act fully autonomously. This is extremely dangerous and is *never* recommended, even containerized environments like Codespaces and Dev Containers have user keys forwarded into the container that could be compromised.\n\nThis feature disables critical security protections and makes it much easier for an attacker to compromise the machine."
"key": "autoApprove3.description",
"value": "Global auto approve also known as \"YOLO mode\" disables manual approval completely for all tools in all workspaces, allowing the agent to act fully autonomously. This is extremely dangerous and is *never* recommended, even containerized environments like Codespaces and Dev Containers have user keys forwarded into the container that could be compromised.\n\nThis feature disables critical security protections and makes it much easier for an attacker to compromise the machine.\n\nNote: This setting only controls tool approval and does not prevent the agent from asking questions. To automatically answer agent questions, use the `#chat.autoReply#` setting."
}
},
"type": "boolean",
Expand Down
23 changes: 23 additions & 0 deletions eslint.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -2112,6 +2112,29 @@ export default tseslint.config(
'comma-dangle': ['warn', 'only-multiline']
}
},
// Extension main sources (excluding tests)
{
files: [
'extensions/**/*.ts',
],
ignores: [
'extensions/**/*.test.ts',
],
rules: {
// Ban dynamic require() and import() calls in extensions to ensure tree-shaking works
'no-restricted-syntax': [
'warn',
{
'selector': `CallExpression[callee.name='require'][arguments.0.type!='Literal']`,
'message': 'Use static imports instead of dynamic require() calls to enable tree-shaking.'
},
{
'selector': `ImportExpression[source.type!='Literal']`,
'message': 'Use static imports instead of dynamic import() calls to enable tree-shaking.'
},
],
}
},
// markdown-language-features
{
files: [
Expand Down
1 change: 1 addition & 0 deletions extensions/esbuild-extension-common.mts
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,7 @@ function resolveOptions(config: RunConfig, outdir: string): BuildOptions {
platform: config.platform,
bundle: true,
minify: true,
treeShaking: true,
sourcemap: true,
target: ['es2024'],
external: ['vscode'],
Expand Down
5 changes: 1 addition & 4 deletions extensions/html-language-features/.vscodeignore
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,6 @@ server/lib/cgmanifest.json
server/package-lock.json
server/.npmignore
package-lock.json
server/extension.webpack.config.js
extension.webpack.config.js
server/extension-browser.webpack.config.js
extension-browser.webpack.config.js
**/esbuild*.mts
CONTRIBUTING.md
cgmanifest.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"extends": "./tsconfig.json",
"exclude": [
"./src/node/**",
"./src/test/**"
]
}
112 changes: 112 additions & 0 deletions extensions/html-language-features/esbuild.browser.mts
Original file line number Diff line number Diff line change
@@ -0,0 +1,112 @@
/*---------------------------------------------------------------------------------------------
* Copyright (c) Microsoft Corporation. All rights reserved.
* Licensed under the MIT License. See License.txt in the project root for license information.
*--------------------------------------------------------------------------------------------*/
import * as fs from 'node:fs';
import * as path from 'node:path';
import type * as esbuild from 'esbuild';
import { run } from '../esbuild-extension-common.mts';

const extensionRoot = import.meta.dirname;

/**
* An esbuild plugin that replaces the `javascriptLibs` module with inlined TypeScript
* library definitions for the browser build. This is the esbuild equivalent of the
* webpack `javaScriptLibraryLoader.js`.
*/
function javaScriptLibsPlugin(): esbuild.Plugin {
return {
name: 'javascript-libs',
setup(build) {
build.onLoad({ filter: /javascriptLibs\.ts$/ }, () => {
const TYPESCRIPT_LIB_SOURCE = path.dirname(import.meta.resolve('typescript').replace('file://', ''));
const JQUERY_DTS = path.join(extensionRoot, 'server', 'lib', 'jquery.d.ts');

function getFileName(name: string): string {
return name === '' ? 'lib.d.ts' : `lib.${name}.d.ts`;
}

function readLibFile(name: string): string {
return fs.readFileSync(path.join(TYPESCRIPT_LIB_SOURCE, getFileName(name)), 'utf8');
}

const queue: string[] = [];
const inQueue: Record<string, boolean> = {};

function enqueue(name: string): void {
if (inQueue[name]) {
return;
}
inQueue[name] = true;
queue.push(name);
}

enqueue('es2020.full');

const result: { name: string; content: string }[] = [];
while (queue.length > 0) {
const name = queue.shift()!;
const contents = readLibFile(name);
const lines = contents.split(/\r\n|\r|\n/);

const outputLines: string[] = [];
for (const line of lines) {
const m = line.match(/\/\/\/\s*<reference\s*lib="([^"]+)"/);
if (m) {
enqueue(m[1]);
}
outputLines.push(line);
}

result.push({
name: getFileName(name),
content: outputLines.join('\n'),
});
}

const jquerySource = fs.readFileSync(JQUERY_DTS, 'utf8');
result.push({
name: 'jquery',
content: jquerySource,
});

let code = `const libs = {};\n`;
for (const entry of result) {
code += `libs[${JSON.stringify(entry.name)}] = ${JSON.stringify(entry.content)};\n`;
}
code += `export function loadLibrary(name) { return libs[name] || ''; }\n`;

return { contents: code, loader: 'js' };
});
},
};
}

await Promise.all([
// Build client
run({
platform: 'browser',
entryPoints: {
'htmlClientMain': path.join(extensionRoot, 'client', 'src', 'browser', 'htmlClientMain.ts'),
},
srcDir: path.join(extensionRoot, 'client', 'src'),
outdir: path.join(extensionRoot, 'client', 'dist', 'browser'),
additionalOptions: {
tsconfig: path.join(extensionRoot, 'client', 'tsconfig.browser.json'),
},
}, process.argv),

// Build server
run({
platform: 'browser',
entryPoints: {
'htmlServerMain': path.join(extensionRoot, 'server', 'src', 'browser', 'htmlServerWorkerMain.ts'),
},
srcDir: path.join(extensionRoot, 'server', 'src'),
outdir: path.join(extensionRoot, 'server', 'dist', 'browser'),
additionalOptions: {
tsconfig: path.join(extensionRoot, 'server', 'tsconfig.browser.json'),
plugins: [javaScriptLibsPlugin()],
},
}, process.argv),
]);
37 changes: 37 additions & 0 deletions extensions/html-language-features/esbuild.mts
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
/*---------------------------------------------------------------------------------------------
* Copyright (c) Microsoft Corporation. All rights reserved.
* Licensed under the MIT License. See License.txt in the project root for license information.
*--------------------------------------------------------------------------------------------*/
import * as path from 'node:path';
import { run } from '../esbuild-extension-common.mts';

const extensionRoot = import.meta.dirname;

await Promise.all([
// Build client
run({
platform: 'node',
entryPoints: {
'htmlClientMain': path.join(extensionRoot, 'client', 'src', 'node', 'htmlClientMain.ts'),
},
srcDir: path.join(extensionRoot, 'client', 'src'),
outdir: path.join(extensionRoot, 'client', 'dist', 'node'),
additionalOptions: {
tsconfig: path.join(extensionRoot, 'client', 'tsconfig.json'),
},
}, process.argv),

// Build server
run({
platform: 'node',
entryPoints: {
'htmlServerMain': path.join(extensionRoot, 'server', 'src', 'node', 'htmlServerNodeMain.ts'),
},
srcDir: path.join(extensionRoot, 'server', 'src'),
outdir: path.join(extensionRoot, 'server', 'dist', 'node'),
additionalOptions: {
tsconfig: path.join(extensionRoot, 'server', 'tsconfig.json'),
external: ['vscode', 'typescript'],
},
}, process.argv),
]);

This file was deleted.

This file was deleted.

This file was deleted.

Loading
Loading