Skip to content

Commit dfae738

Browse files
authored
Merge branch 'main' into copilot/add-commit-count-decoration
2 parents eaaa39d + 0473452 commit dfae738

File tree

178 files changed

+2657
-1185
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

178 files changed

+2657
-1185
lines changed

.github/copilot-instructions.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
- **Strictness**: Some strictness is disabled in `tsconfig.base.json` (e.g., `strictNullChecks: false`), but new code should avoid unsafe patterns.
66
- **Testing**: Place tests under `src/test`. Do not include test code in production files.
77
- **Localization**: Use `%key%` syntax for strings that require localization. See `package.nls.json`.
8+
- **Regular Expressions**: Use named capture groups for clarity when working with complex regex patterns.
89

910
## Extension-Specific Practices
1011
- **VS Code API**: Use the official VS Code API for all extension points. Register commands, views, and menus via `package.json`.

.vscodeignore

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,8 +29,7 @@ azure-pipeline.*
2929
yarn.lock
3030
**/*.map
3131
**/*.svg
32-
!**/output.svg
33-
!**/pr_webview.svg
32+
!**/git-pull-request_webview.svg
3433
**/*.ts
3534
*.vsix
3635
**/*.bak

CHANGELOG.md

Lines changed: 51 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,56 @@
11
# Changelog
22

3+
## 0.122.0
4+
5+
### Changes
6+
7+
- Auto-generated PR descriptions (via `githubPullRequests.pullRequestDescription`) will respect the repository PR template if there is one.
8+
- Icons in the Pull Requests view now render with codicons instead of Unicode characters.
9+
- Drafts in the Pull Requests view now render in italics instead of having a `[DRAFT]` prefix.
10+
11+
![Pull Requests view showing codicon labels and italic draft PR titles](./documentation/changelog/0.122.0/pr-labels.png)
12+
13+
- Emoji completions for `:smile:` style emojis are now available in review comments.
14+
15+
![Emoji completions in review comments](./documentation/changelog/0.122.0/emoji-completions.gif)
16+
17+
- [Markdown alert syntax](https://github.com/orgs/community/discussions/16925) is now rendered in review comments.
18+
19+
![Markdown alerts in review comments](./documentation/changelog/0.122.0/markdown-alerts.png)
20+
21+
- Opening an empty commit from a pull request webview shows an editor with a message instead of showing a notification.
22+
- Pull requests can be opened from from a url, for example: `vscode-insiders://github.vscode-pull-request-github/checkout-pull-request?uri=https://github.com/microsoft/vscode-css-languageservice/pull/460`
23+
- Icons are up-to-date with VS Code's latest icons.
24+
- If you start a review and want to cancel it, there's now a "Cancel Review" button in the pull request webview.
25+
26+
![Cancel review button](./documentation/changelog/0.122.0/cancel-review.png)
27+
28+
### Fixes
29+
30+
- Reactions to code comments are not showing up (Web). https://github.com/microsoft/vscode-pull-request-github/issues/2195
31+
- Editing a comment freezes VS Code. https://github.com/microsoft/vscode/issues/274455
32+
- Github Pull Request tab won't open if branch names are reused. https://github.com/microsoft/vscode-pull-request-github/issues/8007
33+
- Icons are misaligned. https://github.com/microsoft/vscode-pull-request-github/issues/7998
34+
- "Git is not installed or otherwise not available" even though it is. https://github.com/microsoft/vscode-pull-request-github/issues/5454
35+
36+
**_Thank You_**
37+
38+
* [@bendrucker (Ben Drucker)](https://github.com/bendrucker): Enable all LLM tools in prompts (agent mode) [PR #6956](https://github.com/microsoft/vscode-pull-request-github/pull/6956)
39+
* [@gerardbalaoro (Gerard Balaoro)](https://github.com/gerardbalaoro): Make branch list timeout configurable (#2840) [PR #7927](https://github.com/microsoft/vscode-pull-request-github/pull/7927)
40+
* [@wankun-tcj](https://github.com/wankun-tcj): Fix avatar display issue in Pull Request tree view [PR #7851](https://github.com/microsoft/vscode-pull-request-github/pull/7851)
41+
42+
## 0.120.2
43+
44+
### Fixes
45+
46+
- Unable to open PR webview within VSCode. https://github.com/microsoft/vscode-pull-request-github/issues/8028
47+
48+
## 0.120.1
49+
50+
### Fixes
51+
52+
- Extension cannot find git repo when VS Code didn't open the git root directory. https://github.com/microsoft/vscode-pull-request-github/issues/7964
53+
354
## 0.120.0
455

556
### Changes

azure-pipeline.nightly.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ trigger: none
33
pr: none
44

55
schedules:
6-
- cron: '0 4 * * Mon-Thu'
6+
- cron: '0 4 * * Mon-Fri'
77
displayName: Nightly Release Schedule
88
always: true
99
branches:

azure-pipeline.pr.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ jobs:
22
- job: test_suite
33
displayName: Test suite
44
pool:
5-
vmImage: 'macos-13'
5+
vmImage: 'macos-15'
66
steps:
77
- template: scripts/ci/common-setup.yml
88

build/filters.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -64,6 +64,7 @@ module.exports.copyrightFilter = [
6464
'!tsconfig.json',
6565
'!tsconfig.test.json',
6666
'!tsconfig.webviews.json',
67+
'!tsconfig.scripts.json',
6768
'!tsfmt.json',
6869
'!**/queries*.gql',
6970
'!**/*.yml',

build/update-codicons.ts

Lines changed: 107 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,107 @@
1+
/*---------------------------------------------------------------------------------------------
2+
* Copyright (c) Microsoft Corporation. All rights reserved.
3+
* Licensed under the MIT License. See License.txt in the project root for license information.
4+
*--------------------------------------------------------------------------------------------*/
5+
6+
import * as fs from 'fs';
7+
import * as path from 'path';
8+
import * as https from 'https';
9+
10+
const CODICONS_DIR = path.join(__dirname, '..', 'resources', 'icons', 'codicons');
11+
const BASE_URL = 'https://raw.githubusercontent.com/microsoft/vscode-codicons/refs/heads/mrleemurray/new-icons/src/icons';
12+
13+
interface UpdateResult {
14+
filename: string;
15+
status: 'updated' | 'unchanged' | 'error';
16+
error?: string;
17+
}
18+
19+
function readLocalIconFilenames(): string[] {
20+
return fs.readdirSync(CODICONS_DIR).filter(f => f.endsWith('.svg'));
21+
}
22+
23+
function fetchRemoteIcon(filename: string): Promise<string> {
24+
const url = `${BASE_URL}/${encodeURIComponent(filename)}`;
25+
return new Promise((resolve, reject) => {
26+
https.get(url, res => {
27+
const { statusCode } = res;
28+
if (statusCode !== 200) {
29+
res.resume(); // drain
30+
return reject(new Error(`Failed to fetch ${filename}: HTTP ${statusCode}`));
31+
}
32+
let data = '';
33+
res.setEncoding('utf8');
34+
res.on('data', chunk => { data += chunk; });
35+
res.on('end', () => resolve(data));
36+
}).on('error', reject);
37+
});
38+
}
39+
40+
async function updateIcon(filename: string): Promise<UpdateResult> {
41+
const localPath = path.join(CODICONS_DIR, filename);
42+
const oldContent = fs.readFileSync(localPath, 'utf8');
43+
try {
44+
const newContent = await fetchRemoteIcon(filename);
45+
if (normalize(oldContent) === normalize(newContent)) {
46+
return { filename, status: 'unchanged' };
47+
}
48+
fs.writeFileSync(localPath, newContent, 'utf8');
49+
return { filename, status: 'updated' };
50+
} catch (err: any) {
51+
return { filename, status: 'error', error: err?.message ?? String(err) };
52+
}
53+
}
54+
55+
function normalize(svg: string): string {
56+
return svg.replace(/\r\n?/g, '\n').trim();
57+
}
58+
59+
async function main(): Promise<void> {
60+
const icons = readLocalIconFilenames();
61+
if (!icons.length) {
62+
console.log('No codicon SVGs found to update.');
63+
return;
64+
}
65+
console.log(`Updating ${icons.length} codicon(s) from upstream...`);
66+
67+
const concurrency = 8;
68+
const queue = icons.slice();
69+
const results: UpdateResult[] = [];
70+
71+
async function worker(): Promise<void> {
72+
while (queue.length) {
73+
const file = queue.shift();
74+
if (!file) {
75+
break;
76+
}
77+
const result = await updateIcon(file);
78+
results.push(result);
79+
if (result.status === 'updated') {
80+
console.log(` ✔ ${file} updated`);
81+
} else if (result.status === 'unchanged') {
82+
console.log(` • ${file} unchanged`);
83+
} else {
84+
// allow-any-unicode-next-line
85+
console.warn(` ✖ ${file} ${result.error}`);
86+
}
87+
}
88+
}
89+
90+
const workers = Array.from({ length: Math.min(concurrency, icons.length) }, () => worker());
91+
await Promise.all(workers);
92+
93+
const updated = results.filter(r => r.status === 'updated').length;
94+
const unchanged = results.filter(r => r.status === 'unchanged').length;
95+
const errored = results.filter(r => r.status === 'error').length;
96+
console.log(`Done. Updated: ${updated}, Unchanged: ${unchanged}, Errors: ${errored}.`);
97+
if (errored) {
98+
process.exitCode = 1;
99+
}
100+
}
101+
102+
main().catch(err => {
103+
console.error(err?.stack || err?.message || String(err));
104+
process.exit(1);
105+
});
106+
107+
export { }; // ensure this file is treated as a module

common/sessionParsing.ts

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -320,8 +320,10 @@ export function parseSessionLogs(rawText: string): SessionResponseLogChunk[] {
320320
const parts = rawText
321321
.split(/\r?\n/)
322322
.filter(part => part.startsWith('data: '))
323-
.map(part => part.slice('data: '.length).trim())
324-
.map(part => JSON.parse(part));
323+
.map(part => {
324+
const trimmed = part.slice('data: '.length).trim();
325+
return JSON.parse(trimmed);
326+
});
325327

326328
return parts as SessionResponseLogChunk[];
327329
}
14.4 KB
Loading
45.7 KB
Loading

0 commit comments

Comments
 (0)