@codingame/monaco-vscode-chat-service-override 28.1.2 → 28.3.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/index.d.ts
CHANGED
|
@@ -1,15 +1,7 @@
|
|
|
1
1
|
import { type IEditorOverrideServices } from "@codingame/monaco-vscode-api/vscode/vs/editor/standalone/browser/standaloneServices";
|
|
2
|
-
import
|
|
3
|
-
export interface CustomEntitlement {
|
|
4
|
-
entitlement: ChatEntitlement;
|
|
5
|
-
sentiment: IChatSentiment;
|
|
6
|
-
anonymous: boolean;
|
|
7
|
-
quotas: IQuotas;
|
|
8
|
-
previewFeaturesDisabled: boolean;
|
|
9
|
-
}
|
|
2
|
+
import type { IDefaultAccount } from "@codingame/monaco-vscode-api/vscode/vs/base/common/defaultAccount";
|
|
10
3
|
export interface ChatServiceOverrideOptions {
|
|
11
|
-
|
|
4
|
+
defaultAccount?: IDefaultAccount;
|
|
12
5
|
}
|
|
13
|
-
export default function getServiceOverride({
|
|
14
|
-
export {
|
|
15
|
-
export type { IChatSentiment, IQuotas };
|
|
6
|
+
export default function getServiceOverride({ defaultAccount }?: ChatServiceOverrideOptions): IEditorOverrideServices;
|
|
7
|
+
export type { IDefaultAccount };
|
package/index.js
CHANGED
|
@@ -32,7 +32,6 @@ import { IChatMarkdownAnchorService } from '@codingame/monaco-vscode-api/vscode/
|
|
|
32
32
|
import { ChatMarkdownAnchorService } from './vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatMarkdownAnchorService.js';
|
|
33
33
|
import { ChatEditingService } from './vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingServiceImpl.js';
|
|
34
34
|
import { ChatEntitlementService } from '@codingame/monaco-vscode-api/vscode/vs/workbench/services/chat/common/chatEntitlementService';
|
|
35
|
-
export { ChatEntitlement } from '@codingame/monaco-vscode-api/vscode/vs/workbench/services/chat/common/chatEntitlementService';
|
|
36
35
|
import { PromptsService } from './vscode/src/vs/workbench/contrib/chat/common/promptSyntax/service/promptsServiceImpl.js';
|
|
37
36
|
import { IChatEntitlementService } from '@codingame/monaco-vscode-api/vscode/vs/workbench/services/chat/common/chatEntitlementService.service';
|
|
38
37
|
import { IPromptsService } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/promptSyntax/service/promptsService.service';
|
|
@@ -106,39 +105,30 @@ import { ChatDebugServiceImpl } from './vscode/src/vs/workbench/contrib/chat/com
|
|
|
106
105
|
import { IChatResponseResourceFileSystemProvider } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/widget/chatResponseResourceFileSystemProvider.service';
|
|
107
106
|
import { ChatResponseResourceFileSystemProvider } from './vscode/src/vs/workbench/contrib/chat/common/widget/chatResponseResourceFileSystemProvider.js';
|
|
108
107
|
import { Event } from '@codingame/monaco-vscode-api/vscode/vs/base/common/event';
|
|
109
|
-
|
|
108
|
+
import { IDefaultAccountService } from '@codingame/monaco-vscode-api/vscode/vs/platform/defaultAccount/common/defaultAccount.service';
|
|
110
109
|
import './vscode/src/vs/workbench/contrib/chat/browser/chat.contribution.js';
|
|
111
110
|
import './vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/terminal.chatAgentTools.contribution.js';
|
|
112
111
|
import './vscode/src/vs/workbench/contrib/terminalContrib/chat/browser/terminal.chat.contribution.js';
|
|
113
112
|
import './vscode/src/vs/workbench/contrib/inlineChat/browser/inlineChat.contribution.js';
|
|
114
113
|
import './vscode/src/vs/workbench/contrib/remoteCodingAgents/browser/remoteCodingAgents.contribution.js';
|
|
115
|
-
import { constObservable } from '@codingame/monaco-vscode-api/vscode/vs/base/common/observableInternal/observables/constObservable';
|
|
116
114
|
|
|
117
|
-
class
|
|
118
|
-
constructor(
|
|
119
|
-
this.
|
|
120
|
-
this.
|
|
121
|
-
this.
|
|
122
|
-
this.
|
|
123
|
-
this.
|
|
124
|
-
this.
|
|
125
|
-
this.
|
|
126
|
-
this.
|
|
127
|
-
this.
|
|
128
|
-
this.
|
|
129
|
-
this.
|
|
130
|
-
this.
|
|
131
|
-
this.onDidChangeSentiment = Event.None;
|
|
132
|
-
this.sentiment = this.customEntitlement.sentiment;
|
|
133
|
-
this.sentimentObs = constObservable(this.sentiment);
|
|
134
|
-
this.onDidChangeAnonymous = Event.None;
|
|
135
|
-
this.anonymous = this.customEntitlement.anonymous;
|
|
136
|
-
this.anonymousObs = constObservable(this.anonymous);
|
|
115
|
+
class DefaultAccountService {
|
|
116
|
+
constructor(defaultAccount) {
|
|
117
|
+
this.defaultAccount = defaultAccount;
|
|
118
|
+
this.onDidChangePolicyData = Event.None;
|
|
119
|
+
this.policyData = null;
|
|
120
|
+
this.getDefaultAccountAuthenticationProvider = () => ({ id: 'default', name: 'Default', enterprise: false });
|
|
121
|
+
this.setDefaultAccountProvider = () => { };
|
|
122
|
+
this.refresh = async () => null;
|
|
123
|
+
this.signIn = async () => null;
|
|
124
|
+
this.onDidChangeDefaultAccount = Event.None;
|
|
125
|
+
this.getDefaultAccount = async () => this.defaultAccount;
|
|
126
|
+
this.copilotTokenInfo = null;
|
|
127
|
+
this.onDidChangeCopilotTokenInfo = Event.None;
|
|
128
|
+
this.signOut = async () => { };
|
|
137
129
|
}
|
|
138
|
-
markAnonymousRateLimited() { }
|
|
139
|
-
async update() { }
|
|
140
130
|
}
|
|
141
|
-
function getServiceOverride({
|
|
131
|
+
function getServiceOverride({ defaultAccount } = {}) {
|
|
142
132
|
return {
|
|
143
133
|
[IChatService.toString()]: new SyncDescriptor(ChatService, [], true),
|
|
144
134
|
[IChatWidgetService.toString()]: new SyncDescriptor(ChatWidgetService, [], true),
|
|
@@ -159,9 +149,7 @@ function getServiceOverride({ customEntitlement } = {}) {
|
|
|
159
149
|
[IChatEditingService.toString()]: new SyncDescriptor(ChatEditingService, [], true),
|
|
160
150
|
[IChatTransferService.toString()]: new SyncDescriptor(ChatTransferService, [], true),
|
|
161
151
|
[IChatMarkdownAnchorService.toString()]: new SyncDescriptor(ChatMarkdownAnchorService, [], true),
|
|
162
|
-
[IChatEntitlementService.toString()]:
|
|
163
|
-
? new SyncDescriptor(CustomEntitlementService, [customEntitlement], true)
|
|
164
|
-
: new SyncDescriptor(ChatEntitlementService, [], true),
|
|
152
|
+
[IChatEntitlementService.toString()]: new SyncDescriptor(ChatEntitlementService, [], true),
|
|
165
153
|
[IPromptsService.toString()]: new SyncDescriptor(PromptsService, [], true),
|
|
166
154
|
[IChatStatusItemService.toString()]: new SyncDescriptor(ChatStatusItemService, [], true),
|
|
167
155
|
[IChatContextPickService.toString()]: new SyncDescriptor(ChatContextPickService, [], true),
|
|
@@ -195,7 +183,8 @@ function getServiceOverride({ customEntitlement } = {}) {
|
|
|
195
183
|
[IPluginInstallService.toString()]: new SyncDescriptor(PluginInstallService, [], true),
|
|
196
184
|
[IChatAttachmentWidgetRegistry.toString()]: new SyncDescriptor(ChatAttachmentWidgetRegistry, [], true),
|
|
197
185
|
[IChatDebugService.toString()]: new SyncDescriptor(ChatDebugServiceImpl, [], true),
|
|
198
|
-
[IChatResponseResourceFileSystemProvider.toString()]: new SyncDescriptor(ChatResponseResourceFileSystemProvider, [], true)
|
|
186
|
+
[IChatResponseResourceFileSystemProvider.toString()]: new SyncDescriptor(ChatResponseResourceFileSystemProvider, [], true),
|
|
187
|
+
[IDefaultAccountService.toString()]: new SyncDescriptor(DefaultAccountService, [defaultAccount], true)
|
|
199
188
|
};
|
|
200
189
|
}
|
|
201
190
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@codingame/monaco-vscode-chat-service-override",
|
|
3
|
-
"version": "28.
|
|
3
|
+
"version": "28.3.0",
|
|
4
4
|
"private": false,
|
|
5
5
|
"description": "VSCode public API plugged on the monaco editor - chat service-override",
|
|
6
6
|
"keywords": [],
|
|
@@ -15,10 +15,10 @@
|
|
|
15
15
|
},
|
|
16
16
|
"type": "module",
|
|
17
17
|
"dependencies": {
|
|
18
|
-
"@codingame/monaco-vscode-api": "28.
|
|
19
|
-
"@codingame/monaco-vscode-katex-common": "28.
|
|
20
|
-
"@codingame/monaco-vscode-xterm-addons-common": "28.
|
|
21
|
-
"@codingame/monaco-vscode-xterm-common": "28.
|
|
18
|
+
"@codingame/monaco-vscode-api": "28.3.0",
|
|
19
|
+
"@codingame/monaco-vscode-katex-common": "28.3.0",
|
|
20
|
+
"@codingame/monaco-vscode-xterm-addons-common": "28.3.0",
|
|
21
|
+
"@codingame/monaco-vscode-xterm-common": "28.3.0"
|
|
22
22
|
},
|
|
23
23
|
"main": "index.js",
|
|
24
24
|
"module": "index.js",
|
|
@@ -1449,7 +1449,21 @@ configurationRegistry.registerConfiguration({
|
|
|
1449
1449
|
"Disable and hide built-in AI features provided by GitHub Copilot, including chat and inline suggestions."
|
|
1450
1450
|
)),
|
|
1451
1451
|
default: false,
|
|
1452
|
-
scope: ConfigurationScope.WINDOW
|
|
1452
|
+
scope: ConfigurationScope.WINDOW,
|
|
1453
|
+
policy: {
|
|
1454
|
+
name: "ChatAIFeaturesDisabled",
|
|
1455
|
+
category: PolicyCategory.InteractiveSession,
|
|
1456
|
+
minimumVersion: "1.111",
|
|
1457
|
+
localization: {
|
|
1458
|
+
description: {
|
|
1459
|
+
key: "chat.disableAIFeatures",
|
|
1460
|
+
value: ( localize(
|
|
1461
|
+
5607,
|
|
1462
|
+
"Disable and hide built-in AI features provided by GitHub Copilot, including chat and inline suggestions."
|
|
1463
|
+
))
|
|
1464
|
+
}
|
|
1465
|
+
}
|
|
1466
|
+
}
|
|
1453
1467
|
},
|
|
1454
1468
|
"chat.allowAnonymousAccess": {
|
|
1455
1469
|
type: "boolean",
|