Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

set COOP, COEP, and CORP headers for desktop #145539

Closed
wants to merge 138 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
138 commits
Select commit Hold shift + click to select a range
67f3fd9
set COOP, COEP, and CORP headers
jrieken Mar 17, 2022
817a111
Merge branch 'main' into joh/crossOriginIsolation
jrieken Apr 4, 2022
f20bbbe
updates
jrieken Apr 4, 2022
e60a5e2
Merge branch 'main' into joh/crossOriginIsolation
jrieken Apr 5, 2022
97a0f6c
🔨 Take out core functionality class from SurroundWithSnippet action
babakks Jun 21, 2022
0dcd685
🎁 Add SurroundWithSnippet as a `QuickFix` code action
babakks Jun 21, 2022
746bc9f
🔨 Move 'Surround With Snippet' from quick fixes to refactorings
babakks Jul 6, 2022
d0f9637
🔨 Refactor "Surround With Snippet" editor contribution into workbench…
babakks Jul 7, 2022
59e42c4
🎭 Merge branch main into add-surround-with-snippet-to-quick-fixes
babakks Jul 7, 2022
d90edae
use request service from main
sandy081 Jul 11, 2022
226911c
use setting to switch between main and browser request service
sandy081 Jul 12, 2022
e0e5339
Shell integration CLI progress
Tyriar Jul 12, 2022
f3399f6
Support bash and zsh paths too
Tyriar Jul 13, 2022
6763f2a
Use common path instead of node path
Tyriar Jul 13, 2022
02b19c5
Merge branch 'main' into joh/crossOriginIsolation
jrieken Jul 13, 2022
053d35b
Add shell integration to options category
Tyriar Jul 13, 2022
2ced901
Support --shell-integration in server cli
Tyriar Jul 13, 2022
b497c1c
Revert code-cli.bat changes
Tyriar Jul 13, 2022
1baeb71
Use TERM_PROGRAM conditional to activate
Tyriar Jul 13, 2022
c6d246e
⚗️ Add stub implementation for `IWorkspaceContextService.getWorkspace…
babakks Jul 14, 2022
d2232af
⚗️ Add test to verify `SnippetSession.createEditsAndSnippetsFromEdits…
babakks Jul 14, 2022
6ea779d
🐛 Fix not resolving variables `SnippetSession.createEditsAndSnippetsF…
babakks Jul 14, 2022
191d745
🔨 Apply "Surround With Snippet" code actions via workspace edits
babakks Jul 14, 2022
c9ea023
💄 Improve field name for "Surround With Snippet" overflow code action
babakks Jul 14, 2022
4398625
* always show top N snippets and conditionally show action for all su…
jrieken Jul 15, 2022
56f52a8
Closing dialog does not cancel (Manjaro Linux) (fix #154719) (#155049)
bpasero Jul 13, 2022
ce243c8
support to hide submenus too (#155063)
jrieken Jul 13, 2022
15daddd
git - Add localization comment for Publish Branch action button (#155…
lszomoru Jul 13, 2022
3de845b
Fix typo in files.contribution.ts (#155016)
gmcquistin Jul 13, 2022
0bb1067
Fix #150836 (#155081)
lramos15 Jul 13, 2022
1872598
disable decorations (#154430)
meganrogge Jul 13, 2022
d7079d3
Fix #153860 (#155086)
lramos15 Jul 13, 2022
90e5e4a
Add telemetry tracking edit session feature usage (#155084)
joyceerhl Jul 13, 2022
dea6576
Merge pull request #154822 from microsoft/sandy081/shared-process-req…
sandy081 Jul 13, 2022
ca4831a
allow more args in run task (#154854)
meganrogge Jul 13, 2022
d59f874
Double check IW is the notebook changing when handling scroll events …
rchiodo Jul 13, 2022
ef3694e
Fix #154950 (#155089)
sandy081 Jul 13, 2022
abde5e3
Move md path completions and document links to language server (#155100)
mjbvz Jul 13, 2022
5385be5
Finalize drop into editor api (#155102)
mjbvz Jul 13, 2022
ee7680a
Add configure decorations ctx menu entry
Tyriar Jul 13, 2022
8539bae
Add button separator color token (#155103)
Jul 13, 2022
b2ee79f
Merge pull request #155119 from microsoft/tyriar/155118
Tyriar Jul 14, 2022
94575b0
support watch task reconnection (#155120)
meganrogge Jul 14, 2022
ff0e091
xterm@4.20.0-beta.13
Tyriar Jul 14, 2022
9c1aa83
editors - clarify view state resource (#155136)
bpasero Jul 14, 2022
c7cb684
Remove references to finalized drop api (#155128)
mjbvz Jul 14, 2022
fe39d5e
Forking from the extension host fails when running tests (fix #154549…
bpasero Jul 14, 2022
16fa042
Move MD references, rename, and definition support to md LS (#155127)
mjbvz Jul 14, 2022
60c3469
Throw error on legacy walkthrough (#155104)
lramos15 Jul 14, 2022
cad9ba5
add application to restricted settings (#155143)
sandy081 Jul 14, 2022
363ba64
electron - drop support for `disable-color-correct-rendering` (#155150)
bpasero Jul 14, 2022
7dc714f
Git - Add events to IPostCommitCommandsProviderRegistry (#155051)
lszomoru Jul 14, 2022
d2eeaf6
add 'Open File' command to merge editor title bar (#155159)
jrieken Jul 14, 2022
8c6c17c
Git - Use cloud icon for remote branches (#155140)
lszomoru Jul 14, 2022
7f000ac
`MainThreadHostTreeView: [createInstance] First service dependency of…
alexr00 Jul 14, 2022
c4fb45e
Merge pull request #155046 from microsoft/tyriar/si_cli
Tyriar Jul 14, 2022
02c3d97
Fix link regex groups
Tyriar Jul 14, 2022
cda4ed9
tweak message when closing dirty and conflicting merge editor (#155176)
jrieken Jul 14, 2022
5e2848d
Use a non-capturing group to fix group indexes
Tyriar Jul 14, 2022
fbe5941
Polish New File... based on feedback (#155115)
lramos15 Jul 14, 2022
5bf385f
Sync Changes button - only show when local branch is ahead/behind the…
lszomoru Jul 14, 2022
a801dde
add clear display language action (#155194)
sandy081 Jul 14, 2022
a97ef21
Settings editor - Boolean setting description should take up the full…
lszomoru Jul 14, 2022
9e92355
Move Web job into its own stage (#155193)
joaomoreno Jul 14, 2022
e2860cc
Merge pull request #155183 from microsoft/tyriar/155035
Tyriar Jul 14, 2022
23e447e
switch default - use browser request by default (#155205)
sandy081 Jul 14, 2022
4154553
read `REBASE_HEAD` when rebasing, swap yours/theirs (label, sides) as…
jrieken Jul 14, 2022
1acc07d
Re #154948. No MenuItemAction in notebook (#155096)
rebornix Jul 14, 2022
64ff727
Don't ask debug adapter for initial configs when opening launch.json …
roblourens Jul 14, 2022
263fbe2
Fix: do not delete partially applied edit sessions (#155218)
joyceerhl Jul 14, 2022
b7093a3
Add try-catch around call that throws in ctor (#155224)
alexdima Jul 14, 2022
01171d0
Disable chunking to prevent `importScripts` calls in web (#155226)
joyceerhl Jul 14, 2022
b295d7b
Merge pull request #155184 from microsoft/tyriar/155065
Tyriar Jul 14, 2022
8b03d68
Fix unhandled promise rejections for debug commands (#155220)
roblourens Jul 14, 2022
5b3742b
concat arrays instead of replace because we want all items in the arr…
TylerLeonhardt Jul 14, 2022
c1374a7
remove terminal data when terminal is disposed of for reconnected ter…
meganrogge Jul 14, 2022
a69dc7c
Allow menubar to convert into hamburger below threshold (#155223)
sbatten Jul 14, 2022
ee1a93f
Increase contrast for diff inserted bg (#154969)
Jul 14, 2022
fba254e
fix command not found warning (#155250)
meganrogge Jul 15, 2022
486b301
Publish stage should wait for web stage (#155284)
joaomoreno Jul 15, 2022
eb6eb04
move custom hover logic into `BaseActionViewItem` (#155278)
jrieken Jul 15, 2022
2db5990
Fix md document links for untitled files (#155248)
mjbvz Jul 15, 2022
a014cff
Fix #155158 (#155288)
sandy081 Jul 15, 2022
09db93e
make sure execute in terminal is reached (#155254)
meganrogge Jul 15, 2022
abdf07c
Merge pull request #152718 from babakks/add-surround-with-snippet-to-…
jrieken Jul 15, 2022
9e12edf
Fix #155157 (#155290)
sandy081 Jul 15, 2022
b27c915
Revert "remove es5ClassCompat"
jrieken Jul 15, 2022
8754d3c
fix assumptions about action-bar title structure (#155292)
jrieken Jul 15, 2022
cc7d907
deprecate es5ClassCompat and explain why
jrieken Jul 15, 2022
f23404f
track usage of snippets to support snippet LRU (#155289)
jrieken Jul 15, 2022
712694d
Merge pull request #155295 from microsoft/joh/tired-reptile
jrieken Jul 15, 2022
d41dd4d
send `workbenchActionExecuted` from CC to measure its success (#155297)
jrieken Jul 15, 2022
245813c
tests - speed up unit tests (#149712) (#155147)
bpasero Jul 15, 2022
14dfbbd
surround with code action needs non-empty selection, uses active end …
jrieken Jul 15, 2022
8aaa077
no hidden snippets as code action
jrieken Jul 15, 2022
f071ac5
add concept of top level snippet and allow to get snippets without la…
jrieken Jul 15, 2022
7314557
make snippet-contribution a proper contrib-file, remove local registr…
jrieken Jul 15, 2022
c17e571
Add syntax highlighting for .env files without extensions (#155298)
aeschli Jul 15, 2022
3f3e62b
rename `TitleBarContext` to `TitleBarTitleContext` because that's wha…
jrieken Jul 15, 2022
e3b4651
tweak label
jrieken Jul 15, 2022
db77903
add context menu to hide/show CC and layout controls
jrieken Jul 15, 2022
0b734bf
add "start with snippet" to empty editor text, change things to use f…
jrieken Jul 15, 2022
0c82754
fix order
jrieken Jul 15, 2022
74636a9
Commit Button - Fix issue related to button opacity when button is di…
lszomoru Jul 15, 2022
a112981
system context menu on Windows
sbatten Jul 15, 2022
8810fa7
set to udf after (#155304)
meganrogge Jul 15, 2022
c54d15c
formatting
sbatten Jul 15, 2022
c54be2f
dom: h should allow ids and multiple class names (#155311)
joaomoreno Jul 15, 2022
d771fbb
Fixes #155179 by implementing DeprecatedExtensionMigratorContribution…
hediet Jul 15, 2022
88d3f85
A11y bug: OS color settings are not respected (#155319)
aeschli Jul 15, 2022
c7b7d2b
Add "Go to Last Failed Cell" Button (#154443)
andreamah Jul 15, 2022
c744458
Flexible-width Find Menu in Notebook (#154550)
andreamah Jul 15, 2022
89ba7c4
Fixed wrong SignatureInformation.activeParameter comment (#155279)
jbicker Jul 15, 2022
fb8c048
Button separator color on high-contrast themes (#155316)
Jul 15, 2022
ebdd965
Merge pull request #155321 from microsoft/joh/innocent-tiger
jrieken Jul 15, 2022
a49fc76
Fix #155131 (#155334)
lramos15 Jul 15, 2022
07a8547
Add ability to continue desktop edit session in vscode.dev
joyceerhl Jul 15, 2022
42cbe98
Fix notebook perf markers (#155266)
roblourens Jul 15, 2022
89b76f6
Do not require a `group` in contributed command
joyceerhl Jul 15, 2022
54ac7e0
Update diff color changes
Jul 15, 2022
785d85a
add API proposal for `vscode.TabInputTextMerge`
jrieken Jul 14, 2022
02cc494
Merge pull request #155276 from microsoft/joh/cruel-hoverfly
jrieken Jul 15, 2022
e5a5e6c
use `TabInputTextMerge` in git extensions
jrieken Jul 14, 2022
de91416
ButtonWithDescripiton - Remove tabIndex from the label and descriptio…
lszomoru Jul 15, 2022
4dd03ae
add focus title bar command (#155347)
sbatten Jul 16, 2022
4c16429
check if values are true not just undefined (#155348)
meganrogge Jul 16, 2022
c9f264b
Merge pull request #155352 from microsoft/dev/joyceerhl/total-toucan
joyceerhl Jul 17, 2022
f29f12f
chore: update electron@18.3.5 (#155452)
deepak1556 Jul 18, 2022
32c436d
Update breadcrumbs when workspace folders update (#154616)
r3m0t Jul 18, 2022
427bcb1
Revert "check if values are true not just undefined (#155348)" (#155468)
joaomoreno Jul 18, 2022
18d4ac1
Merge pull request #155344 from microsoft/misolori/brilliant-unicorn
hediet Jul 18, 2022
4d46e56
mention `editor.suggestOnTriggerCharacters` from the quick suggest do…
jrieken Jul 18, 2022
b625465
[themes] When opening a new window, product icons don't load immediat…
aeschli Jul 18, 2022
0ffdd80
h: type check attributes object (#155501)
joaomoreno Jul 18, 2022
8505dcf
Support find widget in lists/trees (#152481)
joaomoreno Jul 18, 2022
f9296c1
Add telemetry comments (#155503)
joaomoreno Jul 18, 2022
e547131
Merge pull request #155148 from microsoft/joh/double-barnacle
jrieken Jul 18, 2022
5418ed2
Merge branch 'main' into joh/crossOriginIsolation
jrieken Jul 18, 2022
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
320 changes: 164 additions & 156 deletions build/azure-pipelines/product-build.yml

Large diffs are not rendered by default.

1 change: 1 addition & 0 deletions build/azure-pipelines/product-publish.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,7 @@ $stages = @(
if ($env:VSCODE_BUILD_STAGE_WINDOWS -eq 'True') { 'Windows' }
if ($env:VSCODE_BUILD_STAGE_LINUX -eq 'True') { 'Linux' }
if ($env:VSCODE_BUILD_STAGE_MACOS -eq 'True') { 'macOS' }
if ($env:VSCODE_BUILD_STAGE_WEB -eq 'True') { 'Web' }
)

do {
Expand Down
1 change: 1 addition & 0 deletions build/azure-pipelines/product-publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -109,6 +109,7 @@ steps:
if ($env:VSCODE_BUILD_STAGE_WINDOWS -eq 'True') { 'Windows' }
if ($env:VSCODE_BUILD_STAGE_LINUX -eq 'True') { 'Linux' }
if ($env:VSCODE_BUILD_STAGE_MACOS -eq 'True') { 'macOS' }
if ($env:VSCODE_BUILD_STAGE_WEB -eq 'True') { 'Web' }
)
Write-Host "Stages to check: $stages"

Expand Down
1 change: 1 addition & 0 deletions build/azure-pipelines/upload-nlsmetadata.js
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ function main() {
.pipe(merge({
fileName: 'combined.nls.metadata.json',
jsonSpace: '',
concatArrays: true,
edit: (parsedJson, file) => {
if (file.base === 'out-vscode-web-min') {
return { vscode: parsedJson };
Expand Down
1 change: 1 addition & 0 deletions build/azure-pipelines/upload-nlsmetadata.ts
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ function main(): Promise<void> {
.pipe(merge({
fileName: 'combined.nls.metadata.json',
jsonSpace: '',
concatArrays: true,
edit: (parsedJson, file) => {
if (file.base === 'out-vscode-web-min') {
return { vscode: parsedJson };
Expand Down
4 changes: 4 additions & 0 deletions build/lib/i18n.resources.json
Original file line number Diff line number Diff line change
Expand Up @@ -294,6 +294,10 @@
"name": "vs/workbench/contrib/audioCues",
"project": "vscode-workbench"
},
{
"name": "vs/workbench/contrib/deprecatedExtensionMigrator",
"project": "vscode-workbench"
},
{
"name": "vs/workbench/contrib/offline",
"project": "vscode-workbench"
Expand Down
1 change: 1 addition & 0 deletions extensions/git/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@
"scmActionButton",
"scmSelectedProvider",
"scmValidation",
"tabInputTextMerge",
"timeline"
],
"categories": [
Expand Down
8 changes: 4 additions & 4 deletions extensions/git/package.nls.json
Original file line number Diff line number Diff line change
Expand Up @@ -221,10 +221,10 @@
"config.timeline.date.committed": "Use the committed date",
"config.timeline.date.authored": "Use the authored date",
"config.useCommitInputAsStashMessage": "Controls whether to use the message from the commit input box as the default stash message.",
"config.showActionButton": "Controls whether an action button can be shown in the Source Control view.",
"config.showActionButton.commit": "Show an action button to commit changes.",
"config.showActionButton.publish": "Show an action button to publish a local branch.",
"config.showActionButton.sync": "Show an action button to sync changes.",
"config.showActionButton": "Controls whether an action button is shown in the Source Control view.",
"config.showActionButton.commit": "Show an action button to commit changes when the local branch has modified files ready to be committed.",
"config.showActionButton.publish": "Show an action button to publish the local branch when it does not have a tracking remote branch.",
"config.showActionButton.sync": "Show an action button to synchronize changes when the local branch is either ahead or behind the remote branch.",
"config.statusLimit": "Controls how to limit the number of changes that can be parsed from Git status command. Can be set to 0 for no limit.",
"config.experimental.installGuide": "Experimental improvements for the git setup flow.",
"config.repositoryScanIgnoredFolders": "List of folders that are ignored while scanning for Git repositories when `#git.autoRepositoryDetection#` is set to `true` or `subFolders`.",
Expand Down
13 changes: 8 additions & 5 deletions extensions/git/src/actionButton.ts
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,8 @@ export class ActionButtonCommand {
repository.onDidRunGitStatus(this.onDidRunGitStatus, this, this.disposables);
repository.onDidChangeOperations(this.onDidChangeOperations, this, this.disposables);

this.disposables.push(postCommitCommandsProviderRegistry.onDidChangePostCommitCommandsProviders(() => this._onDidChange.fire()));

const root = Uri.file(repository.root);
this.disposables.push(workspace.onDidChangeConfiguration(e => {
if (e.affectsConfiguration('git.enableSmartCommit', root) ||
Expand Down Expand Up @@ -189,10 +191,10 @@ export class ActionButtonCommand {
return {
command: {
command: 'git.publish',
title: localize('scm publish branch action button title', "{0} Publish Branch", '$(cloud-upload)'),
title: localize({ key: 'scm publish branch action button title', comment: ['{Locked="Branch"}', 'Do not translate "Branch" as it is a git term'] }, "{0} Publish Branch", '$(cloud-upload)'),
tooltip: this.state.isSyncInProgress ?
localize('scm button publish branch running', "Publishing Branch...") :
localize('scm button publish branch', "Publish Branch"),
localize({ key: 'scm button publish branch running', comment: ['{Locked="Branch"}', 'Do not translate "Branch" as it is a git term'] }, "Publishing Branch...") :
localize({ key: 'scm button publish branch', comment: ['{Locked="Branch"}', 'Do not translate "Branch" as it is a git term'] }, "Publish Branch"),
arguments: [this.repository.sourceControl],
},
enabled: !this.state.isSyncInProgress
Expand All @@ -202,9 +204,10 @@ export class ActionButtonCommand {
private getSyncChangesActionButton(): SourceControlActionButton | undefined {
const config = workspace.getConfiguration('git', Uri.file(this.repository.root));
const showActionButton = config.get<{ sync: boolean }>('showActionButton', { sync: true });
const branchIsAheadOrBehind = (this.state.HEAD?.behind ?? 0) > 0 || (this.state.HEAD?.ahead ?? 0) > 0;

// Branch does not have an upstream, commit/merge is in progress, or the button is disabled
if (!this.state.HEAD?.upstream || this.state.isCommitInProgress || this.state.isMergeInProgress || !showActionButton.sync) { return undefined; }
// Branch does not have an upstream, branch is not ahead/behind the remote branch, commit/merge is in progress, or the button is disabled
if (!this.state.HEAD?.upstream || !branchIsAheadOrBehind || this.state.isCommitInProgress || this.state.isMergeInProgress || !showActionButton.sync) { return undefined; }

const ahead = this.state.HEAD.ahead ? ` ${this.state.HEAD.ahead}$(arrow-up)` : '';
const behind = this.state.HEAD.behind ? ` ${this.state.HEAD.behind}$(arrow-down)` : '';
Expand Down
39 changes: 24 additions & 15 deletions extensions/git/src/commands.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@

import * as os from 'os';
import * as path from 'path';
import { Command, commands, Disposable, LineChange, MessageOptions, Position, ProgressLocation, QuickPickItem, Range, SourceControlResourceState, TextDocumentShowOptions, TextEditor, Uri, ViewColumn, window, workspace, WorkspaceEdit, WorkspaceFolder, TimelineItem, env, Selection, TextDocumentContentProvider, InputBoxValidationSeverity, TabInputText } from 'vscode';
import { Command, commands, Disposable, LineChange, MessageOptions, Position, ProgressLocation, QuickPickItem, Range, SourceControlResourceState, TextDocumentShowOptions, TextEditor, Uri, ViewColumn, window, workspace, WorkspaceEdit, WorkspaceFolder, TimelineItem, env, Selection, TextDocumentContentProvider, InputBoxValidationSeverity, TabInputText, TabInputTextMerge } from 'vscode';
import TelemetryReporter from '@vscode/extension-telemetry';
import * as nls from 'vscode-nls';
import { uniqueNamesGenerator, adjectives, animals, colors, NumberDictionary } from '@joaomoreno/unique-names-generator';
Expand Down Expand Up @@ -53,7 +53,7 @@ class CheckoutTagItem extends CheckoutItem {

class CheckoutRemoteHeadItem extends CheckoutItem {

override get label(): string { return `$(git-branch) ${this.ref.name || this.shortCommit}`; }
override get label(): string { return `$(cloud) ${this.ref.name || this.shortCommit}`; }
override get description(): string {
return localize('remote branch at', "Remote branch at {0}", this.shortCommit);
}
Expand Down Expand Up @@ -418,21 +418,25 @@ export class CommandCenter {
return;
}

const isRebasing = Boolean(repo.rebaseCommit);

type InputData = { uri: Uri; title?: string; detail?: string; description?: string };
const mergeUris = toMergeUris(uri);
const ours: InputData = { uri: mergeUris.ours, title: localize('Yours', 'Yours') };
const theirs: InputData = { uri: mergeUris.theirs, title: localize('Theirs', 'Theirs') };

try {
const [head, mergeHead] = await Promise.all([repo.getCommit('HEAD'), repo.getCommit('MERGE_HEAD')]);
const [head, rebaseOrMergeHead] = await Promise.all([
repo.getCommit('HEAD'),
isRebasing ? repo.getCommit('REBASE_HEAD') : repo.getCommit('MERGE_HEAD')
]);
// ours (current branch and commit)
ours.detail = head.refNames.map(s => s.replace(/^HEAD ->/, '')).join(', ');
ours.description = head.hash.substring(0, 7);

// theirs
theirs.detail = mergeHead.refNames.join(', ');
theirs.description = mergeHead.hash.substring(0, 7);
theirs.detail = rebaseOrMergeHead.refNames.join(', ');
theirs.description = rebaseOrMergeHead.hash.substring(0, 7);

} catch (error) {
// not so bad, can continue with just uris
Expand All @@ -442,8 +446,8 @@ export class CommandCenter {

const options = {
base: mergeUris.base,
input1: theirs,
input2: ours,
input1: isRebasing ? ours : theirs,
input2: isRebasing ? theirs : ours,
output: uri
};

Expand Down Expand Up @@ -1099,21 +1103,26 @@ export class CommandCenter {
return;
}

const { activeTab } = window.tabGroups.activeTabGroup;
if (!activeTab) {
return;
}

// make sure to save the merged document
const doc = workspace.textDocuments.find(doc => doc.uri.toString() === uri.toString());
if (!doc) {
console.log(`FAILED to accept merge because uri ${uri.toString()} doesn't match a document`);
return;
}
if (doc.isDirty) {
await doc.save();
}

await doc.save();

// TODO@jrieken there isn't a `TabInputTextMerge` instance yet, till now the merge editor
// uses the `TabInputText` for the out-resource and we use that to identify and CLOSE the tab
// see https://github.com/microsoft/vscode/issues/153213
const { activeTab } = window.tabGroups.activeTabGroup;
// find the merge editor tabs for the resource in question and close them all
let didCloseTab = false;
if (activeTab && activeTab?.input instanceof TabInputText && activeTab.input.uri.toString() === uri.toString()) {
didCloseTab = await window.tabGroups.close(activeTab, true);
const mergeEditorTabs = window.tabGroups.all.map(group => group.tabs.filter(tab => tab.input instanceof TabInputTextMerge && tab.input.result.toString() === uri.toString())).flat();
if (mergeEditorTabs.includes(activeTab)) {
didCloseTab = await window.tabGroups.close(mergeEditorTabs, true);
}

// Only stage if the merge editor has been successfully closed. That means all conflicts have been
Expand Down
9 changes: 8 additions & 1 deletion extensions/git/src/model.ts
Original file line number Diff line number Diff line change
Expand Up @@ -108,6 +108,9 @@ export class Model implements IRemoteSourcePublisherRegistry, IPostCommitCommand

private postCommitCommandsProviders = new Set<PostCommitCommandsProvider>();

private _onDidChangePostCommitCommandsProviders = new EventEmitter<void>();
readonly onDidChangePostCommitCommandsProviders = this._onDidChangePostCommitCommandsProviders.event;

private showRepoOnHomeDriveRootWarning = true;
private pushErrorHandlers = new Set<PushErrorHandler>();

Expand Down Expand Up @@ -591,8 +594,12 @@ export class Model implements IRemoteSourcePublisherRegistry, IPostCommitCommand

registerPostCommitCommandsProvider(provider: PostCommitCommandsProvider): Disposable {
this.postCommitCommandsProviders.add(provider);
this._onDidChangePostCommitCommandsProviders.fire();

return toDisposable(() => this.postCommitCommandsProviders.delete(provider));
return toDisposable(() => {
this.postCommitCommandsProviders.delete(provider);
this._onDidChangePostCommitCommandsProviders.fire();
});
}

getPostCommitCommandsProviders(): PostCommitCommandsProvider[] {
Expand Down
4 changes: 3 additions & 1 deletion extensions/git/src/postCommitCommands.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,12 @@
*--------------------------------------------------------------------------------------------*/

import * as nls from 'vscode-nls';
import { Command, Disposable } from 'vscode';
import { Command, Disposable, Event } from 'vscode';
import { PostCommitCommandsProvider } from './api/git';

export interface IPostCommitCommandsProviderRegistry {
readonly onDidChangePostCommitCommandsProviders: Event<void>;

getPostCommitCommandsProviders(): PostCommitCommandsProvider[];
registerPostCommitCommandsProvider(provider: PostCommitCommandsProvider): Disposable;
}
Expand Down
2 changes: 1 addition & 1 deletion extensions/git/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
"../../src/vscode-dts/vscode.proposed.scmActionButton.d.ts",
"../../src/vscode-dts/vscode.proposed.scmSelectedProvider.d.ts",
"../../src/vscode-dts/vscode.proposed.scmValidation.d.ts",
"../../src/vscode-dts/vscode.proposed.tabs.d.ts",
"../../src/vscode-dts/vscode.proposed.tabInputTextMerge.d.ts",
"../../src/vscode-dts/vscode.proposed.timeline.d.ts",
"../types/lib.textEncoder.d.ts"
]
Expand Down
25 changes: 20 additions & 5 deletions extensions/github/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,8 @@
}
},
"enabledApiProposals": [
"contribShareMenu"
"contribShareMenu",
"contribEditSessions"
],
"contributes": {
"commands": [
Expand All @@ -37,10 +38,20 @@
{
"command": "github.copyVscodeDevLink",
"title": "Copy vscode.dev Link"
},
{
"command": "github.copyVscodeDevLinkFile",
"title": "Copy vscode.dev Link"
},
{
"command": "github.copyVscodeDevLinkFile",
"title": "Copy vscode.dev Link"
},
{
"command": "github.openOnVscodeDev",
"title": "Open on vscode.dev"
}
],
"continueEditSession": [
{
"command": "github.openOnVscodeDev",
"when": "github.hasGitHubRepo"
}
],
"menus": {
Expand All @@ -56,6 +67,10 @@
{
"command": "github.copyVscodeDevLinkFile",
"when": "false"
},
{
"command": "github.openOnVscodeDev",
"when": "false"
}
],
"file/share": [
Expand Down
14 changes: 14 additions & 0 deletions extensions/github/src/commands.ts
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,16 @@ async function copyVscodeDevLink(gitAPI: GitAPI, useSelection: boolean) {
}
}

async function openVscodeDevLink(gitAPI: GitAPI): Promise<vscode.Uri | undefined> {
try {
const permalink = getPermalink(gitAPI, true, 'https://vscode.dev/github');
return permalink ? vscode.Uri.parse(permalink) : undefined;
} catch (err) {
vscode.window.showErrorMessage(err.message);
return undefined;
}
}

export function registerCommands(gitAPI: GitAPI): vscode.Disposable {
const disposables = new DisposableStore();

Expand All @@ -39,5 +49,9 @@ export function registerCommands(gitAPI: GitAPI): vscode.Disposable {
return copyVscodeDevLink(gitAPI, false);
}));

disposables.add(vscode.commands.registerCommand('github.openOnVscodeDev', async () => {
return openVscodeDevLink(gitAPI);
}));

return disposables;
}
3 changes: 2 additions & 1 deletion extensions/ini/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,8 @@
".editorconfig"
],
"filenames": [
"gitconfig"
"gitconfig",
".env"
],
"filenamePatterns": [
"**/.config/git/config",
Expand Down
4 changes: 2 additions & 2 deletions extensions/markdown-language-features/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@
"Programming Languages"
],
"enabledApiProposals": [
"textEditorDrop",
"documentPaste"
],
"activationEvents": [
Expand Down Expand Up @@ -563,7 +562,8 @@
"@types/picomatch": "^2.3.0",
"@types/vscode-notebook-renderer": "^1.60.0",
"@types/vscode-webview": "^1.57.0",
"lodash.throttle": "^4.1.1"
"lodash.throttle": "^4.1.1",
"vscode-languageserver-types": "^3.17.2"
},
"repository": {
"type": "git",
Expand Down
2 changes: 1 addition & 1 deletion extensions/markdown-language-features/package.nls.json
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
"configuration.markdown.links.openLocation.currentGroup": "Open links in the active editor group.",
"configuration.markdown.links.openLocation.beside": "Open links beside the active editor.",
"configuration.markdown.suggest.paths.enabled.description": "Enable/disable path suggestions for markdown links",
"configuration.markdown.editor.drop.enabled": "Enable/disable dropping into the markdown editor to insert shift. Requires enabling `#workbench.experimental.editor.dropIntoEditor.enabled#`.",
"configuration.markdown.editor.drop.enabled": "Enable/disable dropping into the markdown editor to insert shift. Requires enabling `#workbench.editor.dropIntoEditor.enabled#`.",
"configuration.markdown.editor.pasteLinks.enabled": "Enable/disable pasting files into a Markdown editor inserts Markdown links. Requires enabling `#editor.experimental.pasteActions.enabled#`.",
"configuration.markdown.experimental.validate.enabled.description": "Enable/disable all error reporting in Markdown files.",
"configuration.markdown.experimental.validate.referenceLinks.enabled.description": "Validate reference links in Markdown files, e.g. `[link][ref]`. Requires enabling `#markdown.experimental.validate.enabled#`.",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
"name": "Attach",
"type": "node",
"request": "attach",
"port": 7675,
"port": 7692,
"sourceMaps": true,
"outFiles": ["${workspaceFolder}/out/**/*.js"]
}
Expand Down
7 changes: 3 additions & 4 deletions extensions/markdown-language-features/server/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,17 +10,16 @@
"main": "./out/node/main",
"browser": "./dist/browser/main",
"dependencies": {
"vscode-languageserver": "^8.0.2-next.4",
"vscode-uri": "^3.0.3",
"vscode-languageserver": "^8.0.2-next.5`",
"vscode-languageserver-textdocument": "^1.0.5",
"vscode-languageserver-types": "^3.17.1",
"vscode-markdown-languageservice": "microsoft/vscode-markdown-languageservice"
"vscode-markdown-languageservice": "^0.0.0-alpha.8",
"vscode-uri": "^3.0.3"
},
"devDependencies": {
"@types/node": "16.x"
},
"scripts": {
"postinstall": "cd node_modules/vscode-markdown-languageservice && yarn run compile-ext",
"compile": "gulp compile-extension:markdown-language-features-server",
"watch": "gulp watch-extension:markdown-language-features-server"
}
Expand Down
Loading