@codingame/monaco-vscode-extensions-service-override 1.85.0 → 1.85.2

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 (60) hide show
  1. package/extensions.js +3 -3
  2. package/package.json +3 -3
  3. package/vscode/src/vs/workbench/api/browser/mainThreadChatAgents2.js +3 -3
  4. package/vscode/src/vs/workbench/api/browser/mainThreadCustomEditors.js +1 -1
  5. package/vscode/src/vs/workbench/api/browser/mainThreadEditorTabs.js +3 -3
  6. package/vscode/src/vs/workbench/api/browser/mainThreadNotebookSaveParticipant.js +1 -1
  7. package/vscode/src/vs/workbench/api/browser/mainThreadTask.js +8 -8
  8. package/vscode/src/vs/workbench/api/browser/mainThreadTerminalService.js +1 -1
  9. package/vscode/src/vs/workbench/contrib/comments/browser/commentThreadZoneWidget.js +2 -2
  10. package/vscode/src/vs/workbench/contrib/comments/browser/commentsController.js +3 -3
  11. package/vscode/src/vs/workbench/contrib/comments/browser/commentsTreeViewer.js +2 -2
  12. package/vscode/src/vs/workbench/contrib/interactive/browser/interactiveEditorInput.js +1 -1
  13. package/override/vs/workbench/contrib/notebook/common/notebookEditorInput.js +0 -3
  14. package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatExecuteActions.js +0 -40
  15. package/vscode/src/vs/workbench/contrib/chat/browser/chatEditorInput.js +0 -141
  16. package/vscode/src/vs/workbench/contrib/chat/browser/chatFollowups.js +0 -37
  17. package/vscode/src/vs/workbench/contrib/chat/browser/chatInputPart.js +0 -342
  18. package/vscode/src/vs/workbench/contrib/chat/browser/chatListRenderer.js +0 -1197
  19. package/vscode/src/vs/workbench/contrib/chat/browser/chatMarkdownDecorationsRenderer.js +0 -117
  20. package/vscode/src/vs/workbench/contrib/chat/browser/chatOptions.js +0 -83
  21. package/vscode/src/vs/workbench/contrib/chat/browser/chatWidget.js +0 -543
  22. package/vscode/src/vs/workbench/contrib/chat/browser/codeBlockPart.css.js +0 -6
  23. package/vscode/src/vs/workbench/contrib/chat/browser/codeBlockPart.js +0 -292
  24. package/vscode/src/vs/workbench/contrib/chat/browser/contrib/chatDynamicVariables.js +0 -169
  25. package/vscode/src/vs/workbench/contrib/chat/browser/media/chat.css.js +0 -6
  26. package/vscode/src/vs/workbench/contrib/chat/common/chatModel.js +0 -255
  27. package/vscode/src/vs/workbench/contrib/chat/common/chatRequestParser.js +0 -195
  28. package/vscode/src/vs/workbench/contrib/chat/common/chatViewModel.js +0 -260
  29. package/vscode/src/vs/workbench/contrib/chat/common/chatWidgetHistoryService.js +0 -5
  30. package/vscode/src/vs/workbench/contrib/chat/common/chatWordCounter.js +0 -26
  31. package/vscode/src/vs/workbench/contrib/comments/browser/commentColors.js +0 -63
  32. package/vscode/src/vs/workbench/contrib/comments/browser/commentFormActions.js +0 -51
  33. package/vscode/src/vs/workbench/contrib/comments/browser/commentNode.js +0 -649
  34. package/vscode/src/vs/workbench/contrib/comments/browser/commentReply.js +0 -302
  35. package/vscode/src/vs/workbench/contrib/comments/browser/commentThreadAdditionalActions.js +0 -62
  36. package/vscode/src/vs/workbench/contrib/comments/browser/commentThreadBody.js +0 -251
  37. package/vscode/src/vs/workbench/contrib/comments/browser/commentThreadHeader.js +0 -109
  38. package/vscode/src/vs/workbench/contrib/comments/browser/commentThreadWidget.js +0 -335
  39. package/vscode/src/vs/workbench/contrib/comments/browser/media/review.css.js +0 -6
  40. package/vscode/src/vs/workbench/contrib/comments/browser/reactionsAction.js +0 -101
  41. package/vscode/src/vs/workbench/contrib/comments/browser/timestamp.js +0 -57
  42. package/vscode/src/vs/workbench/contrib/comments/common/commentsConfiguration.js +0 -3
  43. package/vscode/src/vs/workbench/contrib/mergeEditor/browser/mergeEditorInput.js +0 -144
  44. package/vscode/src/vs/workbench/contrib/mergeEditor/browser/mergeEditorInputModel.js +0 -482
  45. package/vscode/src/vs/workbench/contrib/mergeEditor/browser/mergeMarkers/mergeMarkersController.js +0 -6
  46. package/vscode/src/vs/workbench/contrib/mergeEditor/browser/model/diffComputer.js +0 -92
  47. package/vscode/src/vs/workbench/contrib/mergeEditor/browser/model/editing.js +0 -56
  48. package/vscode/src/vs/workbench/contrib/mergeEditor/browser/model/lineRange.js +0 -110
  49. package/vscode/src/vs/workbench/contrib/mergeEditor/browser/model/mapping.js +0 -260
  50. package/vscode/src/vs/workbench/contrib/mergeEditor/browser/model/mergeEditorModel.js +0 -616
  51. package/vscode/src/vs/workbench/contrib/mergeEditor/browser/model/modifiedBaseRange.js +0 -309
  52. package/vscode/src/vs/workbench/contrib/mergeEditor/browser/model/rangeUtils.js +0 -38
  53. package/vscode/src/vs/workbench/contrib/mergeEditor/browser/model/textModelDiffs.js +0 -167
  54. package/vscode/src/vs/workbench/contrib/mergeEditor/browser/telemetry.js +0 -80
  55. package/vscode/src/vs/workbench/contrib/mergeEditor/browser/utils.js +0 -70
  56. package/vscode/src/vs/workbench/contrib/mergeEditor/common/mergeEditor.js +0 -3
  57. package/vscode/src/vs/workbench/contrib/notebook/common/notebookEditorModel.js +0 -108
  58. package/vscode/src/vs/workbench/contrib/tasks/common/tasks.js +0 -506
  59. package/vscode/src/vs/workbench/contrib/terminal/browser/terminalProcessExtHostProxy.js +0 -132
  60. package/vscode/src/vs/workbench/services/workingCopy/common/resourceWorkingCopy.js +0 -79
@@ -1,260 +0,0 @@
1
- import { __decorate, __param } from '../../../../../../../external/tslib/tslib.es6.js';
2
- import { Emitter } from 'monaco-editor/esm/vs/base/common/event.js';
3
- import { Disposable } from 'monaco-editor/esm/vs/base/common/lifecycle.js';
4
- import { IInstantiationService } from 'monaco-editor/esm/vs/platform/instantiation/common/instantiation.js';
5
- import { ILogService } from 'monaco-editor/esm/vs/platform/log/common/log.js';
6
- import { ChatModelInitState } from './chatModel.js';
7
- import { countWords } from './chatWordCounter.js';
8
-
9
- function isRequestVM(item) {
10
- return !!item && typeof item === 'object' && 'message' in item;
11
- }
12
- function isResponseVM(item) {
13
- return !!item && typeof item.setVote !== 'undefined';
14
- }
15
- function isWelcomeVM(item) {
16
- return !!item && typeof item === 'object' && 'content' in item;
17
- }
18
- let ChatViewModel = class ChatViewModel extends Disposable {
19
- get inputPlaceholder() {
20
- return this._inputPlaceholder ?? this._model.inputPlaceholder;
21
- }
22
- setInputPlaceholder(text) {
23
- this._inputPlaceholder = text;
24
- this._onDidChange.fire({ kind: 'changePlaceholder' });
25
- }
26
- resetInputPlaceholder() {
27
- this._inputPlaceholder = undefined;
28
- this._onDidChange.fire({ kind: 'changePlaceholder' });
29
- }
30
- get sessionId() {
31
- return this._model.sessionId;
32
- }
33
- get requestInProgress() {
34
- return this._model.requestInProgress;
35
- }
36
- get providerId() {
37
- return this._model.providerId;
38
- }
39
- get initState() {
40
- return this._model.initState;
41
- }
42
- constructor(_model, instantiationService) {
43
- super();
44
- this._model = _model;
45
- this.instantiationService = instantiationService;
46
- this._onDidDisposeModel = this._register(( new Emitter()));
47
- this.onDidDisposeModel = this._onDidDisposeModel.event;
48
- this._onDidChange = this._register(( new Emitter()));
49
- this.onDidChange = this._onDidChange.event;
50
- this._items = [];
51
- this._inputPlaceholder = undefined;
52
- _model.getRequests().forEach((request, i) => {
53
- this._items.push(( new ChatRequestViewModel(request)));
54
- if (request.response) {
55
- this.onAddResponse(request.response);
56
- }
57
- });
58
- this._register(_model.onDidDispose(() => this._onDidDisposeModel.fire()));
59
- this._register(_model.onDidChange(e => {
60
- if (e.kind === 'addRequest') {
61
- this._items.push(( new ChatRequestViewModel(e.request)));
62
- if (e.request.response) {
63
- this.onAddResponse(e.request.response);
64
- }
65
- }
66
- else if (e.kind === 'addResponse') {
67
- this.onAddResponse(e.response);
68
- }
69
- else if (e.kind === 'removeRequest') {
70
- const requestIdx = this._items.findIndex(item => isRequestVM(item) && item.id === e.requestId);
71
- if (requestIdx >= 0) {
72
- this._items.splice(requestIdx, 1);
73
- }
74
- const responseIdx = e.responseId && this._items.findIndex(item => isResponseVM(item) && item.id === e.responseId);
75
- if (typeof responseIdx === 'number' && responseIdx >= 0) {
76
- const items = this._items.splice(responseIdx, 1);
77
- const item = items[0];
78
- if (isResponseVM(item)) {
79
- item.dispose();
80
- }
81
- }
82
- }
83
- const modelEventToVmEvent = e.kind === 'addRequest' ? { kind: 'addRequest' } :
84
- e.kind === 'initialize' ? { kind: 'initialize' } :
85
- null;
86
- this._onDidChange.fire(modelEventToVmEvent);
87
- }));
88
- }
89
- onAddResponse(responseModel) {
90
- const response = this.instantiationService.createInstance(ChatResponseViewModel, responseModel);
91
- this._register(response.onDidChange(() => this._onDidChange.fire(null)));
92
- this._items.push(response);
93
- }
94
- getItems() {
95
- return [...(this._model.welcomeMessage ? [this._model.welcomeMessage] : []), ...this._items];
96
- }
97
- dispose() {
98
- super.dispose();
99
- this._items
100
- .filter((item) => item instanceof ChatResponseViewModel)
101
- .forEach((item) => item.dispose());
102
- }
103
- };
104
- ChatViewModel = ( __decorate([
105
- ( __param(1, IInstantiationService))
106
- ], ChatViewModel));
107
- class ChatRequestViewModel {
108
- get id() {
109
- return this._model.id;
110
- }
111
- get dataId() {
112
- return this.id + `_${ChatModelInitState[this._model.session.initState]}`;
113
- }
114
- get sessionId() {
115
- return this._model.session.sessionId;
116
- }
117
- get username() {
118
- return this._model.username;
119
- }
120
- get avatarIconUri() {
121
- return this._model.avatarIconUri;
122
- }
123
- get message() {
124
- return this._model.message;
125
- }
126
- get messageText() {
127
- return 'kind' in this.message ? this.message.message : this.message.text;
128
- }
129
- constructor(_model) {
130
- this._model = _model;
131
- }
132
- }
133
- let ChatResponseViewModel = class ChatResponseViewModel extends Disposable {
134
- get id() {
135
- return this._model.id;
136
- }
137
- get dataId() {
138
- return this._model.id + `_${this._modelChangeCount}` + `_${ChatModelInitState[this._model.session.initState]}`;
139
- }
140
- get providerId() {
141
- return this._model.providerId;
142
- }
143
- get sessionId() {
144
- return this._model.session.sessionId;
145
- }
146
- get username() {
147
- return this._model.username;
148
- }
149
- get avatarIconUri() {
150
- return this._model.avatarIconUri;
151
- }
152
- get agent() {
153
- return this._model.agent;
154
- }
155
- get slashCommand() {
156
- return this._model.slashCommand;
157
- }
158
- get response() {
159
- return this._model.response;
160
- }
161
- get usedContext() {
162
- return this._model.usedContext;
163
- }
164
- get contentReferences() {
165
- return this._model.contentReferences;
166
- }
167
- get progressMessages() {
168
- return this._model.progressMessages;
169
- }
170
- get isComplete() {
171
- return this._model.isComplete;
172
- }
173
- get isCanceled() {
174
- return this._model.isCanceled;
175
- }
176
- get replyFollowups() {
177
- return this._model.followups?.filter((f) => f.kind === 'reply');
178
- }
179
- get commandFollowups() {
180
- return this._model.followups?.filter((f) => f.kind === 'command');
181
- }
182
- get errorDetails() {
183
- return this._model.errorDetails;
184
- }
185
- get vote() {
186
- return this._model.vote;
187
- }
188
- get requestId() {
189
- return this._model.requestId;
190
- }
191
- get usedReferencesExpanded() {
192
- if (typeof this._usedReferencesExpanded === 'boolean') {
193
- return this._usedReferencesExpanded;
194
- }
195
- return this.response.value.length === 0;
196
- }
197
- set usedReferencesExpanded(v) {
198
- this._usedReferencesExpanded = v;
199
- }
200
- get vulnerabilitiesListExpanded() {
201
- return this._vulnerabilitiesListExpanded;
202
- }
203
- set vulnerabilitiesListExpanded(v) {
204
- this._vulnerabilitiesListExpanded = v;
205
- }
206
- get contentUpdateTimings() {
207
- return this._contentUpdateTimings;
208
- }
209
- constructor(_model, logService) {
210
- super();
211
- this._model = _model;
212
- this.logService = logService;
213
- this._modelChangeCount = 0;
214
- this._onDidChange = this._register(( new Emitter()));
215
- this.onDidChange = this._onDidChange.event;
216
- this.renderData = undefined;
217
- this._vulnerabilitiesListExpanded = false;
218
- this._contentUpdateTimings = undefined;
219
- if (!_model.isComplete) {
220
- this._contentUpdateTimings = {
221
- loadingStartTime: Date.now(),
222
- lastUpdateTime: Date.now(),
223
- impliedWordLoadRate: 0,
224
- lastWordCount: 0
225
- };
226
- }
227
- this._register(_model.onDidChange(() => {
228
- if (this._contentUpdateTimings) {
229
- const now = Date.now();
230
- const wordCount = countWords(_model.response.asString());
231
- const timeDiff = now - this._contentUpdateTimings.loadingStartTime;
232
- const impliedWordLoadRate = this._contentUpdateTimings.lastWordCount / (timeDiff / 1000);
233
- this.trace('onDidChange', `Update- got ${this._contentUpdateTimings.lastWordCount} words over ${timeDiff}ms = ${impliedWordLoadRate} words/s. ${wordCount} words are now available.`);
234
- this._contentUpdateTimings = {
235
- loadingStartTime: this._contentUpdateTimings.loadingStartTime,
236
- lastUpdateTime: now,
237
- impliedWordLoadRate,
238
- lastWordCount: wordCount
239
- };
240
- }
241
- else {
242
- this.logService.warn('ChatResponseViewModel#onDidChange: got model update but contentUpdateTimings is not initialized');
243
- }
244
- this._modelChangeCount++;
245
- this._onDidChange.fire();
246
- }));
247
- }
248
- trace(tag, message) {
249
- this.logService.trace(`ChatResponseViewModel#${tag}: ${message}`);
250
- }
251
- setVote(vote) {
252
- this._modelChangeCount++;
253
- this._model.setVote(vote);
254
- }
255
- };
256
- ChatResponseViewModel = ( __decorate([
257
- ( __param(1, ILogService))
258
- ], ChatResponseViewModel));
259
-
260
- export { ChatRequestViewModel, ChatResponseViewModel, ChatViewModel, isRequestVM, isResponseVM, isWelcomeVM };
@@ -1,5 +0,0 @@
1
- import { createDecorator } from 'monaco-editor/esm/vs/platform/instantiation/common/instantiation.js';
2
-
3
- const IChatWidgetHistoryService = ( createDecorator('IChatWidgetHistoryService'));
4
-
5
- export { IChatWidgetHistoryService };
@@ -1,26 +0,0 @@
1
- const wordSeparatorCharPattern = /[\s\|\-]/;
2
- function getNWords(str, numWordsToCount) {
3
- let wordCount = numWordsToCount;
4
- let i = 0;
5
- while (i < str.length && wordCount > 0) {
6
- while (i < str.length && str[i].match(wordSeparatorCharPattern)) {
7
- i++;
8
- }
9
- while (i < str.length && !str[i].match(wordSeparatorCharPattern)) {
10
- i++;
11
- }
12
- wordCount--;
13
- }
14
- const value = str.substring(0, i);
15
- return {
16
- value,
17
- actualWordCount: numWordsToCount - wordCount,
18
- isFullString: i >= str.length
19
- };
20
- }
21
- function countWords(str) {
22
- const result = getNWords(str, Number.MAX_SAFE_INTEGER);
23
- return result.actualWordCount;
24
- }
25
-
26
- export { countWords, getNWords };
@@ -1,63 +0,0 @@
1
- import * as languages from 'monaco-editor/esm/vs/editor/common/languages.js';
2
- import { peekViewTitleBackground } from 'monaco-editor/esm/vs/editor/contrib/peekView/browser/peekView.js';
3
- import * as nls from 'monaco-editor/esm/vs/nls.js';
4
- import { registerColor, disabledForeground, contrastBorder, listFocusOutline, transparent } from 'monaco-editor/esm/vs/platform/theme/common/colorRegistry.js';
5
-
6
- const resolvedCommentViewIcon = registerColor('commentsView.resolvedIcon', { dark: disabledForeground, light: disabledForeground, hcDark: contrastBorder, hcLight: contrastBorder }, ( nls.localizeWithPath(
7
- 'vs/workbench/contrib/comments/browser/commentColors',
8
- 'resolvedCommentIcon',
9
- 'Icon color for resolved comments.'
10
- )));
11
- const unresolvedCommentViewIcon = registerColor('commentsView.unresolvedIcon', { dark: listFocusOutline, light: listFocusOutline, hcDark: contrastBorder, hcLight: contrastBorder }, ( nls.localizeWithPath(
12
- 'vs/workbench/contrib/comments/browser/commentColors',
13
- 'unresolvedCommentIcon',
14
- 'Icon color for unresolved comments.'
15
- )));
16
- registerColor('editorCommentsWidget.replyInputBackground', { dark: peekViewTitleBackground, light: peekViewTitleBackground, hcDark: peekViewTitleBackground, hcLight: peekViewTitleBackground }, ( nls.localizeWithPath(
17
- 'vs/workbench/contrib/comments/browser/commentColors',
18
- 'commentReplyInputBackground',
19
- 'Background color for comment reply input box.'
20
- )));
21
- const resolvedCommentBorder = registerColor('editorCommentsWidget.resolvedBorder', { dark: resolvedCommentViewIcon, light: resolvedCommentViewIcon, hcDark: contrastBorder, hcLight: contrastBorder }, ( nls.localizeWithPath(
22
- 'vs/workbench/contrib/comments/browser/commentColors',
23
- 'resolvedCommentBorder',
24
- 'Color of borders and arrow for resolved comments.'
25
- )));
26
- const unresolvedCommentBorder = registerColor('editorCommentsWidget.unresolvedBorder', { dark: unresolvedCommentViewIcon, light: unresolvedCommentViewIcon, hcDark: contrastBorder, hcLight: contrastBorder }, ( nls.localizeWithPath(
27
- 'vs/workbench/contrib/comments/browser/commentColors',
28
- 'unresolvedCommentBorder',
29
- 'Color of borders and arrow for unresolved comments.'
30
- )));
31
- registerColor('editorCommentsWidget.rangeBackground', { dark: ( transparent(unresolvedCommentBorder, .1)), light: ( transparent(unresolvedCommentBorder, .1)), hcDark: ( transparent(unresolvedCommentBorder, .1)), hcLight: ( transparent(unresolvedCommentBorder, .1)) }, ( nls.localizeWithPath(
32
- 'vs/workbench/contrib/comments/browser/commentColors',
33
- 'commentThreadRangeBackground',
34
- 'Color of background for comment ranges.'
35
- )));
36
- registerColor('editorCommentsWidget.rangeActiveBackground', { dark: ( transparent(unresolvedCommentBorder, .1)), light: ( transparent(unresolvedCommentBorder, .1)), hcDark: ( transparent(unresolvedCommentBorder, .1)), hcLight: ( transparent(unresolvedCommentBorder, .1)) }, ( nls.localizeWithPath(
37
- 'vs/workbench/contrib/comments/browser/commentColors',
38
- 'commentThreadActiveRangeBackground',
39
- 'Color of background for currently selected or hovered comment range.'
40
- )));
41
- const commentThreadStateBorderColors = ( new Map([
42
- [languages.CommentThreadState.Unresolved, unresolvedCommentBorder],
43
- [languages.CommentThreadState.Resolved, resolvedCommentBorder],
44
- ]));
45
- const commentThreadStateIconColors = ( new Map([
46
- [languages.CommentThreadState.Unresolved, unresolvedCommentViewIcon],
47
- [languages.CommentThreadState.Resolved, resolvedCommentViewIcon],
48
- ]));
49
- const commentThreadStateColorVar = '--comment-thread-state-color';
50
- const commentViewThreadStateColorVar = '--comment-view-thread-state-color';
51
- const commentThreadStateBackgroundColorVar = '--comment-thread-state-background-color';
52
- function getCommentThreadStateColor(state, theme, map) {
53
- const colorId = (state !== undefined) ? map.get(state) : undefined;
54
- return (colorId !== undefined) ? theme.getColor(colorId) : undefined;
55
- }
56
- function getCommentThreadStateBorderColor(state, theme) {
57
- return getCommentThreadStateColor(state, theme, commentThreadStateBorderColors);
58
- }
59
- function getCommentThreadStateIconColor(state, theme) {
60
- return getCommentThreadStateColor(state, theme, commentThreadStateIconColors);
61
- }
62
-
63
- export { commentThreadStateBackgroundColorVar, commentThreadStateColorVar, commentViewThreadStateColorVar, getCommentThreadStateBorderColor, getCommentThreadStateIconColor };
@@ -1,51 +0,0 @@
1
- import { Button } from 'monaco-editor/esm/vs/base/browser/ui/button/button.js';
2
- import { DisposableStore } from 'monaco-editor/esm/vs/base/common/lifecycle.js';
3
- import { defaultButtonStyles } from 'monaco-editor/esm/vs/platform/theme/browser/defaultStyles.js';
4
-
5
- class CommentFormActions {
6
- constructor(container, actionHandler, maxActions) {
7
- this.container = container;
8
- this.actionHandler = actionHandler;
9
- this.maxActions = maxActions;
10
- this._buttonElements = [];
11
- this._toDispose = ( new DisposableStore());
12
- this._actions = [];
13
- }
14
- setActions(menu, hasOnlySecondaryActions = false) {
15
- this._toDispose.clear();
16
- this._buttonElements.forEach(b => b.remove());
17
- this._buttonElements = [];
18
- const groups = menu.getActions({ shouldForwardArgs: true });
19
- let isPrimary = !hasOnlySecondaryActions;
20
- for (const group of groups) {
21
- const [, actions] = group;
22
- this._actions = actions;
23
- for (const action of actions) {
24
- const button = ( new Button(this.container, { secondary: !isPrimary, ...defaultButtonStyles }));
25
- isPrimary = false;
26
- this._buttonElements.push(button.element);
27
- this._toDispose.add(button);
28
- this._toDispose.add(button.onDidClick(() => this.actionHandler(action)));
29
- button.enabled = action.enabled;
30
- button.label = action.label;
31
- if ((this.maxActions !== undefined) && (this._buttonElements.length >= this.maxActions)) {
32
- console.warn(`An extension has contributed more than the allowable number of actions to a comments menu.`);
33
- return;
34
- }
35
- }
36
- }
37
- }
38
- triggerDefaultAction() {
39
- if (this._actions.length) {
40
- const lastAction = this._actions[0];
41
- if (lastAction.enabled) {
42
- return this.actionHandler(lastAction);
43
- }
44
- }
45
- }
46
- dispose() {
47
- this._toDispose.dispose();
48
- }
49
- }
50
-
51
- export { CommentFormActions };