@codingame/monaco-vscode-chat-service-override 10.1.3 → 11.0.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.
Files changed (50) hide show
  1. package/chat.js +6 -3
  2. package/package.json +6 -2
  3. package/vscode/src/vs/editor/common/diff/documentDiffProvider.js +8 -0
  4. package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatAccessibilityHelp.js +84 -38
  5. package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatClearActions.js +265 -20
  6. package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatCodeblockActions.js +20 -39
  7. package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatContextActions.js +373 -216
  8. package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatCopyActions.js +4 -5
  9. package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatDeveloperActions.js +1 -1
  10. package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatFileTreeActions.js +4 -5
  11. package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatGettingStarted.js +54 -0
  12. package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatImportExport.js +6 -7
  13. package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatMoveActions.js +12 -11
  14. package/vscode/src/vs/workbench/contrib/chat/browser/actions/codeBlockOperations.js +14 -42
  15. package/vscode/src/vs/workbench/contrib/chat/browser/chat.contribution.js +82 -50
  16. package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingModifiedFileEntry.js +326 -0
  17. package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingService.js +448 -0
  18. package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingSession.js +507 -0
  19. package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingTextModelContentProviders.js +76 -0
  20. package/vscode/src/vs/workbench/contrib/chat/browser/chatEditor.js +4 -4
  21. package/vscode/src/vs/workbench/contrib/chat/browser/chatEditorActions.js +109 -0
  22. package/vscode/src/vs/workbench/contrib/chat/browser/chatEditorController.js +284 -0
  23. package/vscode/src/vs/workbench/contrib/chat/browser/chatParticipantContributions.js +116 -77
  24. package/vscode/src/vs/workbench/contrib/chat/browser/chatPasteProviders.js +100 -9
  25. package/vscode/src/vs/workbench/contrib/chat/browser/chatQuick.js +3 -3
  26. package/vscode/src/vs/workbench/contrib/chat/browser/chatResponseAccessibleView.js +1 -1
  27. package/vscode/src/vs/workbench/contrib/chat/browser/chatVariables.js +7 -9
  28. package/vscode/src/vs/workbench/contrib/chat/browser/chatViewPane.js +61 -42
  29. package/vscode/src/vs/workbench/contrib/chat/browser/contrib/chatInputEditorContrib.js +5 -5
  30. package/vscode/src/vs/workbench/contrib/chat/browser/contrib/chatInputEditorHover.js +3 -3
  31. package/vscode/src/vs/workbench/contrib/chat/{common → browser}/languageModelToolsService.js +28 -31
  32. package/vscode/src/vs/workbench/contrib/chat/browser/viewsWelcome/chatViewsWelcomeContributions.js +75 -0
  33. package/vscode/src/vs/workbench/contrib/chat/common/chatCodeMapperService.js +120 -1
  34. package/vscode/src/vs/workbench/contrib/chat/common/chatProgressTypes/chatToolInvocation.js +10 -8
  35. package/vscode/src/vs/workbench/contrib/chat/common/chatServiceImpl.js +33 -18
  36. package/vscode/src/vs/workbench/contrib/chat/common/chatWidgetHistoryService.js +1 -1
  37. package/vscode/src/vs/workbench/contrib/chat/common/ignoredFiles.js +21 -0
  38. package/vscode/src/vs/workbench/contrib/chat/common/languageModelStats.js +2 -2
  39. package/vscode/src/vs/workbench/contrib/chat/common/languageModels.js +6 -6
  40. package/vscode/src/vs/workbench/contrib/chat/common/tools/languageModelToolsContribution.js +68 -47
  41. package/vscode/src/vs/workbench/contrib/chat/common/tools/languageModelToolsParametersSchema.js +250 -0
  42. package/vscode/src/vs/workbench/contrib/chat/common/voiceChatService.js +2 -2
  43. package/vscode/src/vs/workbench/contrib/inlineChat/browser/inlineChat.contribution.js +7 -8
  44. package/vscode/src/vs/workbench/contrib/inlineChat/browser/inlineChatAccessibilityHelp.js +1 -1
  45. package/vscode/src/vs/workbench/contrib/inlineChat/browser/inlineChatAccessibleView.js +1 -1
  46. package/vscode/src/vs/workbench/contrib/inlineChat/browser/inlineChatCurrentLine.js +3 -3
  47. package/vscode/src/vs/workbench/contrib/inlineChat/browser/inlineChatNotebook.js +2 -2
  48. package/vscode/src/vs/workbench/contrib/inlineChat/browser/inlineChatSavingServiceImpl.js +65 -128
  49. package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatQuickInputActions.js +0 -170
  50. package/vscode/src/vs/workbench/contrib/chat/browser/chatGettingStarted.js +0 -131
@@ -1,170 +0,0 @@
1
- import { Codicon } from 'vscode/vscode/vs/base/common/codicons';
2
- import { ICodeEditorService } from 'vscode/vscode/vs/editor/browser/services/codeEditorService';
3
- import { Selection } from 'vscode/vscode/vs/editor/common/core/selection';
4
- import { localize2, localize } from 'vscode/vscode/vs/nls';
5
- import { registerAction2, Action2, MenuId } from 'vscode/vscode/vs/platform/actions/common/actions';
6
- import 'vscode/vscode/vs/workbench/contrib/chat/browser/actions/chatActions';
7
- import { IQuickChatService } from 'vscode/vscode/vs/workbench/contrib/chat/browser/chat.service';
8
- import { CONTEXT_CHAT_ENABLED } from 'vscode/vscode/vs/workbench/contrib/chat/common/chatContextKeys';
9
- import { InlineChatController } from 'vscode/vscode/vs/workbench/contrib/inlineChat/browser/inlineChatController';
10
- import { CHAT_CATEGORY, ASK_QUICK_QUESTION_ACTION_ID } from 'vscode/vscode/vs/workbench/contrib/chat/browser/actions/chatConstants';
11
- export { ASK_QUICK_QUESTION_ACTION_ID } from 'vscode/vscode/vs/workbench/contrib/chat/browser/actions/chatConstants';
12
-
13
- function registerQuickChatActions() {
14
- registerAction2(QuickChatGlobalAction);
15
- registerAction2(AskQuickChatAction);
16
- registerAction2(class OpenInChatViewAction extends Action2 {
17
- constructor() {
18
- super({
19
- id: 'workbench.action.quickchat.openInChatView',
20
- title: ( localize2(7337, "Open in Chat View")),
21
- f1: false,
22
- category: CHAT_CATEGORY,
23
- icon: Codicon.commentDiscussion,
24
- menu: {
25
- id: MenuId.ChatInputSide,
26
- group: 'navigation',
27
- order: 10
28
- }
29
- });
30
- }
31
- run(accessor) {
32
- const quickChatService = accessor.get(IQuickChatService);
33
- quickChatService.openInChatView();
34
- }
35
- });
36
- registerAction2(class CloseQuickChatAction extends Action2 {
37
- constructor() {
38
- super({
39
- id: 'workbench.action.quickchat.close',
40
- title: ( localize2(7338, "Close Quick Chat")),
41
- f1: false,
42
- category: CHAT_CATEGORY,
43
- icon: Codicon.close,
44
- menu: {
45
- id: MenuId.ChatInputSide,
46
- group: 'navigation',
47
- order: 20
48
- }
49
- });
50
- }
51
- run(accessor) {
52
- const quickChatService = accessor.get(IQuickChatService);
53
- quickChatService.close();
54
- }
55
- });
56
- registerAction2(class LaunchInlineChatFromQuickChatAction extends Action2 {
57
- constructor() {
58
- super({
59
- id: 'workbench.action.quickchat.launchInlineChat',
60
- title: ( localize2(7339, "Launch Inline Chat")),
61
- f1: false,
62
- category: CHAT_CATEGORY
63
- });
64
- }
65
- async run(accessor) {
66
- const quickChatService = accessor.get(IQuickChatService);
67
- const codeEditorService = accessor.get(ICodeEditorService);
68
- if (quickChatService.focused) {
69
- quickChatService.close();
70
- }
71
- const codeEditor = codeEditorService.getActiveCodeEditor();
72
- if (!codeEditor) {
73
- return;
74
- }
75
- const controller = InlineChatController.get(codeEditor);
76
- if (!controller) {
77
- return;
78
- }
79
- await controller.run();
80
- controller.focus();
81
- }
82
- });
83
- }
84
- class QuickChatGlobalAction extends Action2 {
85
- constructor() {
86
- super({
87
- id: ASK_QUICK_QUESTION_ACTION_ID,
88
- title: ( localize2(7340, 'Quick Chat')),
89
- precondition: CONTEXT_CHAT_ENABLED,
90
- icon: Codicon.commentDiscussion,
91
- f1: false,
92
- category: CHAT_CATEGORY,
93
- keybinding: {
94
- weight: 200 ,
95
- primary: 2048 | 1024 | 39 ,
96
- linux: {
97
- primary: 2048 | 1024 | 512 | 39
98
- }
99
- },
100
- menu: {
101
- id: MenuId.ChatCommandCenter,
102
- group: 'c_quickChat',
103
- order: 5
104
- },
105
- metadata: {
106
- description: ( localize(7341, 'Toggle the quick chat')),
107
- args: [{
108
- name: 'args',
109
- schema: {
110
- anyOf: [
111
- {
112
- type: 'object',
113
- required: ['query'],
114
- properties: {
115
- query: {
116
- description: ( localize(7342, "The query to open the quick chat with")),
117
- type: 'string'
118
- },
119
- isPartialQuery: {
120
- description: ( localize(7343, "Whether the query is partial; it will wait for more user input")),
121
- type: 'boolean'
122
- }
123
- },
124
- },
125
- {
126
- type: 'string',
127
- description: ( localize(7342, "The query to open the quick chat with"))
128
- }
129
- ]
130
- }
131
- }]
132
- },
133
- });
134
- }
135
- run(accessor, query) {
136
- const quickChatService = accessor.get(IQuickChatService);
137
- let options;
138
- switch (typeof query) {
139
- case 'string':
140
- options = { query };
141
- break;
142
- case 'object':
143
- options = query;
144
- break;
145
- }
146
- if (options?.query) {
147
- options.selection = ( (new Selection(1, options.query.length + 1, 1, options.query.length + 1)));
148
- }
149
- quickChatService.toggle(options);
150
- }
151
- }
152
- class AskQuickChatAction extends Action2 {
153
- constructor() {
154
- super({
155
- id: `workbench.action.openQuickChat`,
156
- category: CHAT_CATEGORY,
157
- title: ( localize2(7344, "Open Quick Chat")),
158
- f1: true
159
- });
160
- }
161
- run(accessor, query) {
162
- const quickChatService = accessor.get(IQuickChatService);
163
- quickChatService.toggle(query ? {
164
- query,
165
- selection: ( (new Selection(1, query.length + 1, 1, query.length + 1)))
166
- } : undefined);
167
- }
168
- }
169
-
170
- export { registerQuickChatActions };
@@ -1,131 +0,0 @@
1
- import { __decorate, __param } from 'vscode/external/tslib/tslib.es6.js';
2
- import { Registry } from 'vscode/vscode/vs/platform/registry/common/platform';
3
- import { Disposable, MutableDisposable } from 'vscode/vscode/vs/base/common/lifecycle';
4
- import { ContextKeyExpr } from 'vscode/vscode/vs/platform/contextkey/common/contextkey';
5
- import { IContextKeyService } from 'vscode/vscode/vs/platform/contextkey/common/contextkey.service';
6
- import { NumberBadge } from 'vscode/vscode/vs/workbench/services/activity/common/activity';
7
- import { IActivityService } from 'vscode/vscode/vs/workbench/services/activity/common/activity.service';
8
- import { IProductService } from 'vscode/vscode/vs/platform/product/common/productService.service';
9
- import { ExtensionIdentifier } from 'vscode/vscode/vs/platform/extensions/common/extensions';
10
- import { IStorageService } from 'vscode/vscode/vs/platform/storage/common/storage.service';
11
- import { IExtensionService } from 'vscode/vscode/vs/workbench/services/extensions/common/extensions.service';
12
- import { Extensions } from 'vscode/vscode/vs/platform/configuration/common/configurationRegistry';
13
- import { applicationConfigurationNodeBase } from 'vscode/vscode/vs/workbench/common/configuration';
14
- import { localize } from 'vscode/vscode/vs/nls';
15
- import { IConfigurationService } from 'vscode/vscode/vs/platform/configuration/common/configuration.service';
16
- import { CHAT_VIEW_ID } from 'vscode/vscode/vs/workbench/contrib/chat/browser/chat';
17
- import { ICommandService } from 'vscode/vscode/vs/platform/commands/common/commands.service';
18
- import { IExtensionManagementService } from 'vscode/vscode/vs/platform/extensionManagement/common/extensionManagement.service';
19
-
20
- const showChatGettingStartedConfigKey = 'workbench.panel.chat.view.experimental.showGettingStarted';
21
- let ChatGettingStartedContribution = class ChatGettingStartedContribution extends Disposable {
22
- static { this.ID = 'workbench.contrib.chatGettingStarted'; }
23
- constructor(contextService, productService, storageService, activityService, extensionService, commandService, configurationService, extensionManagementService) {
24
- super();
25
- this.contextService = contextService;
26
- this.productService = productService;
27
- this.storageService = storageService;
28
- this.activityService = activityService;
29
- this.extensionService = extensionService;
30
- this.commandService = commandService;
31
- this.configurationService = configurationService;
32
- this.extensionManagementService = extensionManagementService;
33
- this.showChatGettingStartedDisposable = this._register(( (new MutableDisposable())));
34
- if (!this.productService.gitHubEntitlement) {
35
- return;
36
- }
37
- if (this.storageService.get(showChatGettingStartedConfigKey, -1 ) !== undefined) {
38
- return;
39
- }
40
- this.extensionManagementService.getInstalled().then(async (exts) => {
41
- const installed = exts.find(value => ExtensionIdentifier.equals(value.identifier.id, this.productService.gitHubEntitlement.extensionId));
42
- if (!installed) {
43
- this.registerListeners();
44
- return;
45
- }
46
- this.storageService.store(showChatGettingStartedConfigKey, 'installed', -1 , 1 );
47
- });
48
- }
49
- registerListeners() {
50
- this._register(this.extensionService.onDidChangeExtensions(async (result) => {
51
- if (this.storageService.get(showChatGettingStartedConfigKey, -1 ) !== undefined) {
52
- return;
53
- }
54
- for (const ext of result.added) {
55
- if (ExtensionIdentifier.equals(this.productService.gitHubEntitlement.extensionId, ext.identifier)) {
56
- this.displayBadge();
57
- return;
58
- }
59
- }
60
- }));
61
- this.extensionService.onDidChangeExtensionsStatus(async (event) => {
62
- if (this.storageService.get(showChatGettingStartedConfigKey, -1 ) !== undefined) {
63
- return;
64
- }
65
- for (const ext of event) {
66
- if (ExtensionIdentifier.equals(this.productService.gitHubEntitlement.extensionId, ext.value)) {
67
- const extensionStatus = this.extensionService.getExtensionsStatus();
68
- if (extensionStatus[ext.value].activationTimes) {
69
- this.displayChatPanel();
70
- return;
71
- }
72
- }
73
- }
74
- });
75
- this._register(this.contextService.onDidChangeContext(event => {
76
- if (this.storageService.get(showChatGettingStartedConfigKey, -1 ) === undefined) {
77
- return;
78
- }
79
- if (event.affectsSome(( (new Set([`view.${CHAT_VIEW_ID}.visible`]))))) {
80
- if (this.contextService.contextMatchesRules(ContextKeyExpr.deserialize(`${CHAT_VIEW_ID}.visible`))) {
81
- this.showChatGettingStartedDisposable.clear();
82
- }
83
- }
84
- }));
85
- }
86
- async displayBadge() {
87
- const showGettingStartedExp = this.configurationService.inspect(showChatGettingStartedConfigKey).value ?? '';
88
- if (!showGettingStartedExp || showGettingStartedExp !== 'showBadge') {
89
- return;
90
- }
91
- const badge = ( (new NumberBadge(1, () => ( localize(7353, 'Open Chat Panel')))));
92
- this.showChatGettingStartedDisposable.value = this.activityService.showViewActivity(CHAT_VIEW_ID, { badge });
93
- this.storageService.store(showChatGettingStartedConfigKey, showGettingStartedExp, -1 , 1 );
94
- }
95
- async displayChatPanel() {
96
- const showGettingStartedExp = this.configurationService.inspect(showChatGettingStartedConfigKey).value ?? '';
97
- if (!showGettingStartedExp || showGettingStartedExp !== 'showChatPanel') {
98
- return;
99
- }
100
- this.commandService.executeCommand(`${CHAT_VIEW_ID}.focus`);
101
- this.storageService.store(showChatGettingStartedConfigKey, showGettingStartedExp, -1 , 1 );
102
- }
103
- };
104
- ChatGettingStartedContribution = ( (__decorate([
105
- ( (__param(0, IContextKeyService))),
106
- ( (__param(1, IProductService))),
107
- ( (__param(2, IStorageService))),
108
- ( (__param(3, IActivityService))),
109
- ( (__param(4, IExtensionService))),
110
- ( (__param(5, ICommandService))),
111
- ( (__param(6, IConfigurationService))),
112
- ( (__param(7, IExtensionManagementService)))
113
- ], ChatGettingStartedContribution)));
114
- const configurationRegistry = ( (Registry.as(Extensions.Configuration)));
115
- configurationRegistry.registerConfiguration({
116
- ...applicationConfigurationNodeBase,
117
- properties: {
118
- 'workbench.panel.chat.view.experimental.showGettingStarted': {
119
- scope: 2 ,
120
- type: 'string',
121
- default: '',
122
- tags: ['experimental'],
123
- description: ( localize(
124
- 7354,
125
- "When enabled, shows a getting started experiments in the chat panel."
126
- ))
127
- }
128
- }
129
- });
130
-
131
- export { ChatGettingStartedContribution };