Skip to content

Commit 4137aa1

Browse files
authored
Allow APIs in stable (microsoft#184062)
1 parent bfcb70b commit 4137aa1

File tree

3 files changed

+0
-32
lines changed

3 files changed

+0
-32
lines changed

src/vs/workbench/api/browser/mainThreadChat.ts

Lines changed: 0 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,6 @@
66
import { Emitter } from 'vs/base/common/event';
77
import { Disposable, DisposableMap } from 'vs/base/common/lifecycle';
88
import { URI } from 'vs/base/common/uri';
9-
import { ILogService } from 'vs/platform/log/common/log';
10-
import { IProductService } from 'vs/platform/product/common/productService';
119
import { ExtHostChatShape, ExtHostContext, IChatRequestDto, MainContext, MainThreadChatShape } from 'vs/workbench/api/common/extHost.protocol';
1210
import { IChatWidgetService } from 'vs/workbench/contrib/chat/browser/chat';
1311
import { IChatContributionService } from 'vs/workbench/contrib/chat/common/chatContributionService';
@@ -28,8 +26,6 @@ export class MainThreadChat extends Disposable implements MainThreadChatShape {
2826
@IChatService private readonly _chatService: IChatService,
2927
@IChatWidgetService private readonly _chatWidgetService: IChatWidgetService,
3028
@IChatContributionService private readonly chatContribService: IChatContributionService,
31-
@IProductService private readonly productService: IProductService,
32-
@ILogService private readonly logService: ILogService,
3329
) {
3430
super();
3531
this._proxy = extHostContext.getProxy(ExtHostContext.ExtHostChat);
@@ -40,11 +36,6 @@ export class MainThreadChat extends Disposable implements MainThreadChatShape {
4036
}
4137

4238
async $registerSlashCommandProvider(handle: number, chatProviderId: string): Promise<void> {
43-
if (this.productService.quality === 'stable') {
44-
this.logService.trace(`The interactive session API is not supported in stable VS Code.`);
45-
return;
46-
}
47-
4839
const unreg = this._chatService.registerSlashCommandProvider({
4940
chatProviderId,
5041
provideSlashCommands: async token => {
@@ -63,11 +54,6 @@ export class MainThreadChat extends Disposable implements MainThreadChatShape {
6354
}
6455

6556
async $registerChatProvider(handle: number, id: string): Promise<void> {
66-
if (this.productService.quality === 'stable') {
67-
this.logService.trace(`The interactive session API is not supported in stable VS Code.`);
68-
return;
69-
}
70-
7157
const registration = this.chatContribService.registeredProviders.find(staticProvider => staticProvider.id === id);
7258
if (!registration) {
7359
throw new Error(`Provider ${id} must be declared in the package.json.`);

src/vs/workbench/api/browser/mainThreadInteractiveEditor.ts

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,6 @@ import { IUriIdentityService } from 'vs/platform/uriIdentity/common/uriIdentity'
99
import { reviveWorkspaceEditDto } from 'vs/workbench/api/browser/mainThreadBulkEdits';
1010
import { ExtHostContext, ExtHostInteractiveEditorShape, MainContext, MainThreadInteractiveEditorShape } from 'vs/workbench/api/common/extHost.protocol';
1111
import { IExtHostContext, extHostNamedCustomer } from 'vs/workbench/services/extensions/common/extHostCustomers';
12-
import { IProductService } from 'vs/platform/product/common/productService';
13-
import { ILogService } from 'vs/platform/log/common/log';
1412

1513
@extHostNamedCustomer(MainContext.MainThreadInteractiveEditor)
1614
export class MainThreadInteractiveEditor implements MainThreadInteractiveEditorShape {
@@ -22,8 +20,6 @@ export class MainThreadInteractiveEditor implements MainThreadInteractiveEditorS
2220
extHostContext: IExtHostContext,
2321
@IInteractiveEditorService private readonly _interactiveEditorService: IInteractiveEditorService,
2422
@IUriIdentityService private readonly _uriIdentService: IUriIdentityService,
25-
@IProductService private readonly productService: IProductService,
26-
@ILogService private readonly logService: ILogService,
2723
) {
2824
this._proxy = extHostContext.getProxy(ExtHostContext.ExtHostInteractiveEditor);
2925
}
@@ -33,11 +29,6 @@ export class MainThreadInteractiveEditor implements MainThreadInteractiveEditorS
3329
}
3430

3531
async $registerInteractiveEditorProvider(handle: number, debugName: string, supportsFeedback: boolean): Promise<void> {
36-
if (this.productService.quality === 'stable') {
37-
this.logService.trace(`The interactive editor API is not supported in stable VS Code.`);
38-
return;
39-
}
40-
4132
const unreg = this._interactiveEditorService.addProvider({
4233
debugName,
4334
prepareInteractiveEditorSession: async (model, range, token) => {

src/vs/workbench/contrib/chat/browser/chatContributionServiceImpl.ts

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,6 @@ import { registerAction2 } from 'vs/platform/actions/common/actions';
1111
import { ContextKeyExpr } from 'vs/platform/contextkey/common/contextkey';
1212
import { IRelaxedExtensionDescription } from 'vs/platform/extensions/common/extensions';
1313
import { SyncDescriptor } from 'vs/platform/instantiation/common/descriptors';
14-
import { ILogService } from 'vs/platform/log/common/log';
15-
import { IProductService } from 'vs/platform/product/common/productService';
1614
import { Registry } from 'vs/platform/registry/common/platform';
1715
import { ViewPaneContainer } from 'vs/workbench/browser/parts/views/viewPaneContainer';
1816
import { IViewContainersRegistry, IViewDescriptor, IViewsRegistry, ViewContainer, ViewContainerLocation, Extensions as ViewExtensions } from 'vs/workbench/common/views';
@@ -67,15 +65,8 @@ export class ChatContributionService implements IChatContributionService {
6765
private _registeredProviders = new Map<string, IChatProviderContribution>();
6866

6967
constructor(
70-
@IProductService productService: IProductService,
71-
@ILogService logService: ILogService,
7268
) {
7369
chatExtensionPoint.setHandler((extensions, delta) => {
74-
if (productService.quality === 'stable') {
75-
logService.trace(`ChatContributionService#setHandler: the interactiveSession extension point is not available in stable VS Code.`);
76-
return;
77-
}
78-
7970
for (const extension of delta.added) {
8071
const extensionDisposable = new DisposableStore();
8172
for (const providerDescriptor of extension.value) {

0 commit comments

Comments
 (0)