Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
3 changes: 1 addition & 2 deletions extensions/github-authentication/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,7 @@
],
"enabledApiProposals": [
"authIssuers",
"authProviderSpecific",
"envIsAppPortable"
"authProviderSpecific"
],
"activationEvents": [],
"capabilities": {
Expand Down
3 changes: 1 addition & 2 deletions extensions/github-authentication/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@
"src/**/*",
"../../src/vscode-dts/vscode.d.ts",
"../../src/vscode-dts/vscode.proposed.authIssuers.d.ts",
"../../src/vscode-dts/vscode.proposed.authProviderSpecific.d.ts",
"../../src/vscode-dts/vscode.proposed.envIsAppPortable.d.ts"
"../../src/vscode-dts/vscode.proposed.authProviderSpecific.d.ts"
]
}
3 changes: 1 addition & 2 deletions extensions/microsoft-authentication/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,7 @@
"enabledApiProposals": [
"nativeWindowHandle",
"authIssuers",
"authenticationChallenges",
"envIsAppPortable"
"authenticationChallenges"
],
"capabilities": {
"virtualWorkspaces": true,
Expand Down
3 changes: 1 addition & 2 deletions extensions/microsoft-authentication/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@
"../../src/vscode-dts/vscode.d.ts",
"../../src/vscode-dts/vscode.proposed.nativeWindowHandle.d.ts",
"../../src/vscode-dts/vscode.proposed.authIssuers.d.ts",
"../../src/vscode-dts/vscode.proposed.authenticationChallenges.d.ts",
"../../src/vscode-dts/vscode.proposed.envIsAppPortable.d.ts"
"../../src/vscode-dts/vscode.proposed.authenticationChallenges.d.ts"
]
}
1 change: 0 additions & 1 deletion extensions/vscode-api-tests/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@
"documentFiltersExclusive",
"editorInsets",
"embeddings",
"envIsAppPortable",
"envIsConnectionMetered",
"extensionRuntime",
"extensionsAny",
Expand Down
7 changes: 7 additions & 0 deletions src/vs/platform/assignment/common/assignment.ts
Original file line number Diff line number Diff line change
Expand Up @@ -177,3 +177,10 @@ export class AssignmentFilterProvider implements IExperimentationFilterProvider
return filters;
}
}

export function getInternalOrg(organisations: string[] | undefined): 'vscode' | 'github' | 'microsoft' | undefined {
const isVSCodeInternal = organisations?.includes('Visual-Studio-Code');
const isGitHubInternal = organisations?.includes('github');
const isMicrosoftInternal = organisations?.includes('microsoft') || organisations?.includes('ms-copilot') || organisations?.includes('MicrosoftCopilot');
return isVSCodeInternal ? 'vscode' : isGitHubInternal ? 'github' : isMicrosoftInternal ? 'microsoft' : undefined;
}
3 changes: 0 additions & 3 deletions src/vs/platform/extensions/common/extensionsApiProposals.ts
Original file line number Diff line number Diff line change
Expand Up @@ -234,9 +234,6 @@ const _allApiProposals = {
embeddings: {
proposal: 'https://raw.githubusercontent.com/microsoft/vscode/main/src/vscode-dts/vscode.proposed.embeddings.d.ts',
},
envIsAppPortable: {
proposal: 'https://raw.githubusercontent.com/microsoft/vscode/main/src/vscode-dts/vscode.proposed.envIsAppPortable.d.ts',
},
envIsConnectionMetered: {
proposal: 'https://raw.githubusercontent.com/microsoft/vscode/main/src/vscode-dts/vscode.proposed.envIsConnectionMetered.d.ts',
},
Expand Down
5 changes: 4 additions & 1 deletion src/vs/platform/update/common/update.ts
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,10 @@ export interface IUpdateService {
applyUpdate(): Promise<void>;
quitAndInstall(): Promise<void>;

/**
* @deprecated This method should not be used any more. It will be removed in a future release.
*/
isLatestVersion(): Promise<boolean | undefined>;
_applySpecificUpdate(packagePath: string): Promise<void>;
disableProgressiveReleases(): Promise<void>;
setInternalOrg(internalOrg: string | undefined): Promise<void>;
}
6 changes: 3 additions & 3 deletions src/vs/platform/update/common/updateIpc.ts
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ export class UpdateChannel implements IServerChannel {
case '_getInitialState': return Promise.resolve(this.service.state);
case 'isLatestVersion': return this.service.isLatestVersion();
case '_applySpecificUpdate': return this.service._applySpecificUpdate(arg);
case 'disableProgressiveReleases': return this.service.disableProgressiveReleases();
case 'setInternalOrg': return this.service.setInternalOrg(arg);
}

throw new Error(`Call not found: ${command}`);
Expand Down Expand Up @@ -80,8 +80,8 @@ export class UpdateChannelClient implements IUpdateService {
return this.channel.call('_applySpecificUpdate', packagePath);
}

disableProgressiveReleases(): Promise<void> {
return this.channel.call('disableProgressiveReleases');
setInternalOrg(internalOrg: string | undefined): Promise<void> {
return this.channel.call('setInternalOrg', internalOrg);
}

dispose(): void {
Expand Down
21 changes: 15 additions & 6 deletions src/vs/platform/update/electron-main/abstractUpdateService.ts
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ import { AvailableForDownload, DisablementReason, IUpdateService, State, StateTy

export interface IUpdateURLOptions {
readonly background?: boolean;
readonly internalOrg?: string;
}

export function createUpdateURL(baseUpdateUrl: string, platform: string, quality: string, commit: string, options?: IUpdateURLOptions): string {
Expand All @@ -29,6 +30,10 @@ export function createUpdateURL(baseUpdateUrl: string, platform: string, quality
url.searchParams.set('bg', 'true');
}

if (options?.internalOrg) {
url.searchParams.set('org', options.internalOrg);
}

return url.toString();
}

Expand Down Expand Up @@ -77,7 +82,7 @@ export abstract class AbstractUpdateService implements IUpdateService {
protected _overwrite: boolean = false;
private _hasCheckedForOverwriteOnQuit: boolean = false;
private readonly overwriteUpdatesCheckInterval = new IntervalTimer();
private _disableProgressiveReleases: boolean = false;
private _internalOrg: string | undefined = undefined;

private readonly _onStateChange = new Emitter<State>();
readonly onStateChange: Event<State> = this._onStateChange.event;
Expand Down Expand Up @@ -342,13 +347,17 @@ export abstract class AbstractUpdateService implements IUpdateService {
// noop
}

async disableProgressiveReleases(): Promise<void> {
this.logService.info('update#disableProgressiveReleases');
this._disableProgressiveReleases = true;
async setInternalOrg(internalOrg: string | undefined): Promise<void> {
if (this._internalOrg === internalOrg) {
return;
}

this.logService.info('update#setInternalOrg', internalOrg);
this._internalOrg = internalOrg;
}

protected shouldDisableProgressiveReleases(): boolean {
return this._disableProgressiveReleases;
protected getInternalOrg(): string | undefined {
return this._internalOrg;
}

protected getUpdateType(): UpdateType {
Expand Down
7 changes: 4 additions & 3 deletions src/vs/platform/update/electron-main/updateService.darwin.ts
Original file line number Diff line number Diff line change
Expand Up @@ -127,8 +127,9 @@ export class DarwinUpdateService extends AbstractUpdateService implements IRelau

this.setState(State.CheckingForUpdates(explicit));

const background = !explicit && !this.shouldDisableProgressiveReleases();
const url = this.buildUpdateFeedUrl(this.quality, pendingCommit ?? this.productService.commit!, { background });
const internalOrg = this.getInternalOrg();
const background = !explicit && !internalOrg;
const url = this.buildUpdateFeedUrl(this.quality, pendingCommit ?? this.productService.commit!, { background, internalOrg });

if (!url) {
return;
Expand Down Expand Up @@ -205,7 +206,7 @@ export class DarwinUpdateService extends AbstractUpdateService implements IRelau

protected override async doDownloadUpdate(state: AvailableForDownload): Promise<void> {
// Rebuild feed URL and trigger download via Electron's auto-updater
this.buildUpdateFeedUrl(this.quality!, state.update.version);
this.buildUpdateFeedUrl(this.quality!, state.update.version, { internalOrg: this.getInternalOrg() });
this.setState(State.CheckingForUpdates(true));
electron.autoUpdater.checkForUpdates();
}
Expand Down
5 changes: 3 additions & 2 deletions src/vs/platform/update/electron-main/updateService.linux.ts
Original file line number Diff line number Diff line change
Expand Up @@ -39,8 +39,9 @@ export class LinuxUpdateService extends AbstractUpdateService {
return;
}

const background = !explicit && !this.shouldDisableProgressiveReleases();
const url = this.buildUpdateFeedUrl(this.quality, this.productService.commit!, { background });
const internalOrg = this.getInternalOrg();
const background = !explicit && !internalOrg;
const url = this.buildUpdateFeedUrl(this.quality, this.productService.commit!, { background, internalOrg });
this.setState(State.CheckingForUpdates(explicit));

this.requestService.request({ url }, CancellationToken.None)
Expand Down
2 changes: 1 addition & 1 deletion src/vs/platform/update/electron-main/updateService.snap.ts
Original file line number Diff line number Diff line change
Expand Up @@ -133,7 +133,7 @@ abstract class AbstractUpdateService implements IUpdateService {
// noop
}

async disableProgressiveReleases(): Promise<void> {
async setInternalOrg(_internalOrg: string | undefined): Promise<void> {
// noop - not applicable for snap
}

Expand Down
5 changes: 3 additions & 2 deletions src/vs/platform/update/electron-main/updateService.win32.ts
Original file line number Diff line number Diff line change
Expand Up @@ -188,8 +188,9 @@ export class Win32UpdateService extends AbstractUpdateService implements IRelaun
return;
}

const background = !explicit && !this.shouldDisableProgressiveReleases();
const url = this.buildUpdateFeedUrl(this.quality, pendingCommit ?? this.productService.commit!, { background });
const internalOrg = this.getInternalOrg();
const background = !explicit && !internalOrg;
const url = this.buildUpdateFeedUrl(this.quality, pendingCommit ?? this.productService.commit!, { background, internalOrg });

// Only set CheckingForUpdates if we're not already in Overwriting state
if (this.state.type !== StateType.Overwriting) {
Expand Down
12 changes: 1 addition & 11 deletions src/vs/sessions/contrib/chat/browser/newChatViewPane.ts
Original file line number Diff line number Diff line change
Expand Up @@ -524,17 +524,7 @@ class NewChatWidget extends Disposable {
const metadata = this.languageModelsService.lookupLanguageModel(id);
return metadata ? { metadata, identifier: id } : undefined;
})
.filter((m): m is ILanguageModelChatMetadataAndIdentifier => !!m && this.shouldShowModel(m));
}

private shouldShowModel(model: ILanguageModelChatMetadataAndIdentifier): boolean {
if (!model.metadata.isUserSelectable) {
return false;
}
if (model.metadata.targetChatSessionType === AgentSessionProviders.Background) {
return false;
}
return true;
.filter((m): m is ILanguageModelChatMetadataAndIdentifier => !!m && m.metadata.targetChatSessionType === AgentSessionProviders.Background);
}

// --- Welcome: Target & option pickers (dropdown row below input) ---
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -57,12 +57,7 @@ export class SessionsWelcomeOverlay extends Disposable {
this._register(autorun(reader => {
const steps = this.welcomeService.steps.read(reader);
const current = this.welcomeService.currentStep.read(reader);
const isComplete = this.welcomeService.isComplete.read(reader);

if (isComplete) {
this.dismiss();
return;
}
this.welcomeService.isComplete.read(reader);

// Render step indicators
this.renderStepList(stepList, steps, current);
Expand Down Expand Up @@ -135,7 +130,7 @@ export class SessionsWelcomeOverlay extends Disposable {
}
}

private dismiss(): void {
dismiss(): void {
this.overlay.classList.add('sessions-welcome-overlay-dismissed');
this._onDidDismiss.fire();
// Allow CSS transition to finish before disposing
Expand Down
37 changes: 34 additions & 3 deletions src/vs/sessions/contrib/welcome/browser/welcome.contribution.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,11 @@ import { IWorkbenchLayoutService } from '../../../../workbench/services/layout/b
import { IWorkbenchContribution, registerWorkbenchContribution2, WorkbenchPhase } from '../../../../workbench/common/contributions.js';
import { bindContextKey } from '../../../../platform/observable/common/platformObservableUtils.js';
import { autorun } from '../../../../base/common/observable.js';
import { IExtensionService } from '../../../../workbench/services/extensions/common/extensions.js';
import { ILogService } from '../../../../platform/log/common/log.js';
import { localize, localize2 } from '../../../../nls.js';
import { Action2, registerAction2 } from '../../../../platform/actions/common/actions.js';
import { Categories } from '../../../../platform/action/common/actionCommonCategories.js';
import { localize2 } from '../../../../nls.js';
import { ISessionsWelcomeService } from '../common/sessionsWelcomeService.js';
import { SessionsWelcomeService } from './sessionsWelcomeService.js';
import { SessionsWelcomeOverlay } from './sessionsWelcomeOverlay.js';
Expand All @@ -42,6 +44,8 @@ class SessionsWelcomeContribution extends Disposable implements IWorkbenchContri
@IProductService private readonly productService: IProductService,
@IContextKeyService private readonly contextKeyService: IContextKeyService,
@IStorageService private readonly storageService: IStorageService,
@IExtensionService private readonly extensionService: IExtensionService,
@ILogService private readonly logService: ILogService,
) {
super();

Expand Down Expand Up @@ -127,12 +131,39 @@ class SessionsWelcomeContribution extends Disposable implements IWorkbenchContri
this.layoutService.mainContainer,
));

// Mark welcome as complete once the overlay is dismissed (all steps satisfied)
// When all steps are satisfied, restart the extension host (so the
// chat extension picks up the auth session cleanly) then dismiss.
this.overlayRef.value.add(overlay.onDidDismiss(() => {
this.overlayRef.clear();
this.storageService.store(WELCOME_COMPLETE_KEY, true, StorageScope.APPLICATION, StorageTarget.MACHINE);
this.watchForSignOutOrTokenExpiry();
}));

this.overlayRef.value.add(autorun(reader => {
const isComplete = this.welcomeService.isComplete.read(reader);
if (!isComplete) {
return;
}

this.storageService.store(WELCOME_COMPLETE_KEY, true, StorageScope.APPLICATION, StorageTarget.MACHINE);
this.restartExtensionHostThenDismiss(overlay);
}));
}

/**
* After the welcome flow completes (extension installed + user signed in),
* restart the extension host so the chat extension picks up the new auth
* session cleanly, then dismiss the overlay. The overlay stays visible
* during the restart so the user doesn't see a broken intermediate state.
*/
private async restartExtensionHostThenDismiss(overlay: SessionsWelcomeOverlay): Promise<void> {
this.logService.info('[sessions welcome] Restarting extension host after welcome completion');
const stopped = await this.extensionService.stopExtensionHosts(
localize('sessionsWelcome.restart', "Completing sessions setup")
);
if (stopped) {
await this.extensionService.startExtensionHosts();
}
overlay.dismiss();
}
}

Expand Down
5 changes: 1 addition & 4 deletions src/vs/workbench/api/common/extHost.api.impl.ts
Original file line number Diff line number Diff line change
Expand Up @@ -402,10 +402,7 @@ export function createApiFactoryAndRegisterActors(accessor: ServicesAccessor): I
checkProposedApiEnabled(extension, 'devDeviceId');
return initData.telemetryInfo.devDeviceId ?? initData.telemetryInfo.machineId;
},
get isAppPortable() {
checkProposedApiEnabled(extension, 'envIsAppPortable');
return initData.environment.isPortable ?? false;
},
get isAppPortable() { return initData.environment.isPortable ?? false; },
get sessionId() { return initData.telemetryInfo.sessionId; },
get language() { return initData.environment.appLanguage; },
get appName() { return initData.environment.appName; },
Expand Down
3 changes: 1 addition & 2 deletions src/vs/workbench/browser/parts/views/media/views.css
Original file line number Diff line number Diff line change
Expand Up @@ -346,8 +346,7 @@
margin-right: 10px;
}

.panel > .title .monaco-action-bar .action-item.viewpane-filter-container:active,
.panel > .title .monaco-action-bar .action-item.viewpane-filter-container:focus-within {
.panel > .title .monaco-action-bar .action-item.viewpane-filter-container:has(.monaco-inputbox .input:focus, .viewpane-filter-controls :focus) {
max-width: 400px;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -268,9 +268,11 @@ export class ChatImplicitContextContribution extends Disposable implements IWork
const setting = this._implicitContextEnablement[widget.location];
const isFirstInteraction = widget.viewModel?.getItems().length === 0;
if ((setting === 'always' || setting === 'first' && isFirstInteraction) && !isPromptFile) { // disable implicit context for prompt files
// When there's no active code editor (e.g. Settings is open), preserve
// existing values so the attachment bar stays visible
if (newValue !== undefined || !widget.input.implicitContext.hasValue) {
// When there's a non-code active editor (e.g. Settings is open), preserve
// existing values so the attachment bar stays visible.
// But when there's no active editor at all, clear the values.
const hasActiveEditor = !!this.editorService.activeEditor;
if (newValue !== undefined || !widget.input.implicitContext.hasValue || !hasActiveEditor) {
widget.input.implicitContext.setValues([{ value: newValue, isSelection }, { value: providerContext, isSelection: false }]);
}
} else {
Expand Down
3 changes: 1 addition & 2 deletions src/vs/workbench/contrib/chat/browser/chat.contribution.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1227,8 +1227,7 @@ configurationRegistry.registerConfiguration({
[ChatConfiguration.SubagentToolCustomAgents]: {
type: 'boolean',
description: nls.localize('chat.subagentTool.customAgents', "Whether the runSubagent tool is able to use custom agents. When enabled, the tool can take the name of a custom agent, but it must be given the exact name of the agent."),
default: false,
tags: ['experimental'],
default: true,
experiment: {
mode: 'auto'
}
Expand Down
5 changes: 5 additions & 0 deletions src/vs/workbench/contrib/chat/browser/chatTipService.ts
Original file line number Diff line number Diff line change
Expand Up @@ -793,6 +793,11 @@ export class ChatTipService extends Disposable implements IChatTipService {

getWelcomeTip(contextKeyService: IContextKeyService): IChatTip | undefined {
this._createSlashCommandsUsageTracker.syncContextKey(contextKeyService);
// Always record the current mode so that mode-based exclusions are
// persisted even on stable-rerender paths (e.g. user switches to Plan
// mode while viewing the Plan tip).
this._tracker.recordCurrentMode(contextKeyService);

this._tracker.refreshPromptFileExclusions();
// Check if tips are enabled
if (!this._configurationService.getValue<boolean>('chat.tips.enabled')) {
Expand Down
Loading
Loading