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

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 (55) hide show
  1. package/package.json +3 -3
  2. package/vscode/src/vs/workbench/api/browser/mainThreadChatAgents2.js +3 -3
  3. package/vscode/src/vs/workbench/api/browser/mainThreadCustomEditors.js +1 -1
  4. package/vscode/src/vs/workbench/api/browser/mainThreadEditorTabs.js +3 -3
  5. package/vscode/src/vs/workbench/api/browser/mainThreadNotebookSaveParticipant.js +1 -1
  6. package/vscode/src/vs/workbench/contrib/comments/browser/commentThreadZoneWidget.js +2 -2
  7. package/vscode/src/vs/workbench/contrib/comments/browser/commentsController.js +3 -3
  8. package/vscode/src/vs/workbench/contrib/comments/browser/commentsTreeViewer.js +2 -2
  9. package/vscode/src/vs/workbench/contrib/interactive/browser/interactiveEditorInput.js +1 -1
  10. package/override/vs/workbench/contrib/notebook/common/notebookEditorInput.js +0 -3
  11. package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatExecuteActions.js +0 -40
  12. package/vscode/src/vs/workbench/contrib/chat/browser/chatEditorInput.js +0 -141
  13. package/vscode/src/vs/workbench/contrib/chat/browser/chatFollowups.js +0 -37
  14. package/vscode/src/vs/workbench/contrib/chat/browser/chatInputPart.js +0 -342
  15. package/vscode/src/vs/workbench/contrib/chat/browser/chatListRenderer.js +0 -1197
  16. package/vscode/src/vs/workbench/contrib/chat/browser/chatMarkdownDecorationsRenderer.js +0 -117
  17. package/vscode/src/vs/workbench/contrib/chat/browser/chatOptions.js +0 -83
  18. package/vscode/src/vs/workbench/contrib/chat/browser/chatWidget.js +0 -543
  19. package/vscode/src/vs/workbench/contrib/chat/browser/codeBlockPart.css.js +0 -6
  20. package/vscode/src/vs/workbench/contrib/chat/browser/codeBlockPart.js +0 -292
  21. package/vscode/src/vs/workbench/contrib/chat/browser/contrib/chatDynamicVariables.js +0 -169
  22. package/vscode/src/vs/workbench/contrib/chat/browser/media/chat.css.js +0 -6
  23. package/vscode/src/vs/workbench/contrib/chat/common/chatModel.js +0 -255
  24. package/vscode/src/vs/workbench/contrib/chat/common/chatRequestParser.js +0 -195
  25. package/vscode/src/vs/workbench/contrib/chat/common/chatViewModel.js +0 -260
  26. package/vscode/src/vs/workbench/contrib/chat/common/chatWidgetHistoryService.js +0 -5
  27. package/vscode/src/vs/workbench/contrib/chat/common/chatWordCounter.js +0 -26
  28. package/vscode/src/vs/workbench/contrib/comments/browser/commentColors.js +0 -63
  29. package/vscode/src/vs/workbench/contrib/comments/browser/commentFormActions.js +0 -51
  30. package/vscode/src/vs/workbench/contrib/comments/browser/commentNode.js +0 -649
  31. package/vscode/src/vs/workbench/contrib/comments/browser/commentReply.js +0 -302
  32. package/vscode/src/vs/workbench/contrib/comments/browser/commentThreadAdditionalActions.js +0 -62
  33. package/vscode/src/vs/workbench/contrib/comments/browser/commentThreadBody.js +0 -251
  34. package/vscode/src/vs/workbench/contrib/comments/browser/commentThreadHeader.js +0 -109
  35. package/vscode/src/vs/workbench/contrib/comments/browser/commentThreadWidget.js +0 -335
  36. package/vscode/src/vs/workbench/contrib/comments/browser/media/review.css.js +0 -6
  37. package/vscode/src/vs/workbench/contrib/comments/browser/reactionsAction.js +0 -101
  38. package/vscode/src/vs/workbench/contrib/comments/browser/timestamp.js +0 -57
  39. package/vscode/src/vs/workbench/contrib/comments/common/commentsConfiguration.js +0 -3
  40. package/vscode/src/vs/workbench/contrib/mergeEditor/browser/mergeEditorInput.js +0 -144
  41. package/vscode/src/vs/workbench/contrib/mergeEditor/browser/mergeEditorInputModel.js +0 -482
  42. package/vscode/src/vs/workbench/contrib/mergeEditor/browser/mergeMarkers/mergeMarkersController.js +0 -6
  43. package/vscode/src/vs/workbench/contrib/mergeEditor/browser/model/diffComputer.js +0 -92
  44. package/vscode/src/vs/workbench/contrib/mergeEditor/browser/model/editing.js +0 -56
  45. package/vscode/src/vs/workbench/contrib/mergeEditor/browser/model/lineRange.js +0 -110
  46. package/vscode/src/vs/workbench/contrib/mergeEditor/browser/model/mapping.js +0 -260
  47. package/vscode/src/vs/workbench/contrib/mergeEditor/browser/model/mergeEditorModel.js +0 -616
  48. package/vscode/src/vs/workbench/contrib/mergeEditor/browser/model/modifiedBaseRange.js +0 -309
  49. package/vscode/src/vs/workbench/contrib/mergeEditor/browser/model/rangeUtils.js +0 -38
  50. package/vscode/src/vs/workbench/contrib/mergeEditor/browser/model/textModelDiffs.js +0 -167
  51. package/vscode/src/vs/workbench/contrib/mergeEditor/browser/telemetry.js +0 -80
  52. package/vscode/src/vs/workbench/contrib/mergeEditor/browser/utils.js +0 -70
  53. package/vscode/src/vs/workbench/contrib/mergeEditor/common/mergeEditor.js +0 -3
  54. package/vscode/src/vs/workbench/contrib/notebook/common/notebookEditorModel.js +0 -108
  55. package/vscode/src/vs/workbench/services/workingCopy/common/resourceWorkingCopy.js +0 -79
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@codingame/monaco-vscode-extensions-service-override",
3
- "version": "1.85.0",
3
+ "version": "1.85.1",
4
4
  "keywords": [],
5
5
  "author": {
6
6
  "name": "CodinGame",
@@ -18,9 +18,9 @@
18
18
  "module": "index.js",
19
19
  "types": "index.d.ts",
20
20
  "dependencies": {
21
- "vscode": "npm:@codingame/monaco-vscode-api@1.85.0",
21
+ "vscode": "npm:@codingame/monaco-vscode-api@1.85.1",
22
22
  "monaco-editor": "0.45.0",
23
23
  "vscode-semver": "npm:semver@=5.5.0",
24
- "@codingame/monaco-vscode-files-service-override": "1.85.0"
24
+ "@codingame/monaco-vscode-files-service-override": "1.85.1"
25
25
  }
26
26
  }
@@ -9,11 +9,11 @@ import { ILanguageFeaturesService } from 'monaco-editor/esm/vs/editor/common/ser
9
9
  import { IInstantiationService } from 'monaco-editor/esm/vs/platform/instantiation/common/instantiation.js';
10
10
  import { MainContext, ExtHostContext } from 'vscode/vscode/vs/workbench/api/common/extHost.protocol';
11
11
  import { IChatWidgetService } from 'vscode/vscode/vs/workbench/contrib/chat/browser/chat';
12
- import { ChatInputPart } from '../../contrib/chat/browser/chatInputPart.js';
13
- import { AddDynamicVariableAction } from '../../contrib/chat/browser/contrib/chatDynamicVariables.js';
12
+ import { ChatInputPart } from 'vscode/vscode/vs/workbench/contrib/chat/browser/chatInputPart';
13
+ import { AddDynamicVariableAction } from 'vscode/vscode/vs/workbench/contrib/chat/browser/contrib/chatDynamicVariables';
14
14
  import { IChatAgentService } from 'vscode/vscode/vs/workbench/contrib/chat/common/chatAgents';
15
15
  import { ChatRequestAgentPart } from 'vscode/vscode/vs/workbench/contrib/chat/common/chatParserTypes';
16
- import { ChatRequestParser } from '../../contrib/chat/common/chatRequestParser.js';
16
+ import { ChatRequestParser } from 'vscode/vscode/vs/workbench/contrib/chat/common/chatRequestParser';
17
17
  import { IChatService } from 'vscode/vscode/vs/workbench/contrib/chat/common/chatService';
18
18
  import { extHostNamedCustomer } from '../../services/extensions/common/extHostCustomers.js';
19
19
 
@@ -30,7 +30,7 @@ import { IEditorService } from 'vscode/vscode/vs/workbench/services/editor/commo
30
30
  import { IWorkbenchEnvironmentService } from 'vscode/vscode/vs/workbench/services/environment/common/environmentService';
31
31
  import { IExtensionService } from 'vscode/vscode/vs/workbench/services/extensions/common/extensions';
32
32
  import { IPathService } from 'vscode/vscode/vs/workbench/services/path/common/pathService';
33
- import { ResourceWorkingCopy } from '../../services/workingCopy/common/resourceWorkingCopy.js';
33
+ import { ResourceWorkingCopy } from 'vscode/vscode/vs/workbench/services/workingCopy/common/resourceWorkingCopy';
34
34
  import { NO_TYPE_ID } from 'vscode/vscode/vs/workbench/services/workingCopy/common/workingCopy';
35
35
  import { IWorkingCopyFileService } from 'vscode/vscode/vs/workbench/services/workingCopy/common/workingCopyFileService';
36
36
  import { IWorkingCopyService } from 'vscode/vscode/vs/workbench/services/workingCopy/common/workingCopyService';
@@ -8,7 +8,7 @@ import { editorGroupToColumn, columnToEditorGroup } from 'vscode/vscode/vs/workb
8
8
  import { IEditorGroupsService, preferredSideBySideGroupDirection } from 'vscode/vscode/vs/workbench/services/editor/common/editorGroupsService';
9
9
  import { IEditorService, SIDE_GROUP } from 'vscode/vscode/vs/workbench/services/editor/common/editorService';
10
10
  import { AbstractTextResourceEditorInput } from 'vscode/vscode/vs/workbench/common/editor/textResourceEditorInput';
11
- import { NotebookEditorInput } from '../../../../../../override/vs/workbench/contrib/notebook/common/notebookEditorInput.js';
11
+ import { NotebookEditorInput } from 'vscode/vscode/vs/workbench/contrib/notebook/common/notebookEditorInput';
12
12
  import { CustomEditorInput } from 'vscode/vscode/vs/workbench/contrib/customEditor/browser/customEditorInput';
13
13
  import { URI } from 'monaco-editor/esm/vs/base/common/uri.js';
14
14
  import { WebviewInput } from 'vscode/vscode/vs/workbench/contrib/webviewPanel/browser/webviewEditorInput';
@@ -18,9 +18,9 @@ import { SideBySideEditorInput } from 'vscode/vscode/vs/workbench/common/editor/
18
18
  import { isEqual } from 'monaco-editor/esm/vs/base/common/resources.js';
19
19
  import { isGroupEditorMoveEvent } from 'vscode/vscode/vs/workbench/common/editor/editorGroupModel';
20
20
  import { InteractiveEditorInput } from '../../contrib/interactive/browser/interactiveEditorInput.js';
21
- import { MergeEditorInput } from '../../contrib/mergeEditor/browser/mergeEditorInput.js';
21
+ import { MergeEditorInput } from 'vscode/vscode/vs/workbench/contrib/mergeEditor/browser/mergeEditorInput';
22
22
  import { ILogService } from 'monaco-editor/esm/vs/platform/log/common/log.js';
23
- import { ChatEditorInput } from '../../contrib/chat/browser/chatEditorInput.js';
23
+ import { ChatEditorInput } from 'vscode/vscode/vs/workbench/contrib/chat/browser/chatEditorInput';
24
24
 
25
25
  let MainThreadEditorTabs = class MainThreadEditorTabs {
26
26
  constructor(extHostContext, _editorGroupsService, _configurationService, _logService, editorService) {
@@ -5,7 +5,7 @@ import { extHostCustomer } from '../../services/extensions/common/extHostCustome
5
5
  import { ExtHostContext } from 'vscode/vscode/vs/workbench/api/common/extHost.protocol';
6
6
  import { raceCancellationError } from 'monaco-editor/esm/vs/base/common/async.js';
7
7
  import { IWorkingCopyFileService } from 'vscode/vscode/vs/workbench/services/workingCopy/common/workingCopyFileService';
8
- import { NotebookFileWorkingCopyModel } from '../../contrib/notebook/common/notebookEditorModel.js';
8
+ import { NotebookFileWorkingCopyModel } from 'vscode/vscode/vs/workbench/contrib/notebook/common/notebookEditorModel';
9
9
 
10
10
  class ExtHostNotebookDocumentSaveParticipant {
11
11
  constructor(extHostContext) {
@@ -12,8 +12,8 @@ import { CommentGlyphWidget } from './commentGlyphWidget.js';
12
12
  import { ICommentService } from 'vscode/vscode/vs/workbench/contrib/comments/browser/commentService';
13
13
  import { EDITOR_FONT_DEFAULTS } from 'monaco-editor/esm/vs/editor/common/config/editorOptions.js';
14
14
  import { ServiceCollection } from 'monaco-editor/esm/vs/platform/instantiation/common/serviceCollection.js';
15
- import { CommentThreadWidget } from './commentThreadWidget.js';
16
- import { commentThreadStateColorVar, commentThreadStateBackgroundColorVar, getCommentThreadStateBorderColor } from './commentColors.js';
15
+ import { CommentThreadWidget } from 'vscode/vscode/vs/workbench/contrib/comments/browser/commentThreadWidget';
16
+ import { commentThreadStateColorVar, commentThreadStateBackgroundColorVar, getCommentThreadStateBorderColor } from 'vscode/vscode/vs/workbench/contrib/comments/browser/commentColors';
17
17
  import { peekViewBorder } from 'monaco-editor/esm/vs/editor/contrib/peekView/browser/peekView.js';
18
18
  import { IConfigurationService } from 'monaco-editor/esm/vs/platform/configuration/common/configuration.js';
19
19
 
@@ -5,7 +5,7 @@ import { findFirstIdxMonotonousOrArrLen } from 'monaco-editor/esm/vs/base/common
5
5
  import { createCancelablePromise, Delayer } from 'monaco-editor/esm/vs/base/common/async.js';
6
6
  import { onUnexpectedError } from 'monaco-editor/esm/vs/base/common/errors.js';
7
7
  import { DisposableStore, dispose } from 'monaco-editor/esm/vs/base/common/lifecycle.js';
8
- import './media/review.css.js';
8
+ import 'vscode/vscode/vs/workbench/contrib/comments/browser/media/review.css';
9
9
  import { ICodeEditorService } from 'monaco-editor/esm/vs/editor/browser/services/codeEditorService.js';
10
10
  import { Range } from 'monaco-editor/esm/vs/editor/common/core/range.js';
11
11
  import { EditorType } from 'monaco-editor/esm/vs/editor/common/editorCommon.js';
@@ -23,8 +23,8 @@ import { EmbeddedCodeEditorWidget } from 'monaco-editor/esm/vs/editor/browser/wi
23
23
  import { IViewsService } from 'vscode/vscode/vs/workbench/common/views';
24
24
  import { COMMENTS_VIEW_ID } from './commentsTreeViewer.js';
25
25
  import { IConfigurationService } from 'monaco-editor/esm/vs/platform/configuration/common/configuration.js';
26
- import { COMMENTS_SECTION } from '../common/commentsConfiguration.js';
27
- import { COMMENTEDITOR_DECORATION_KEY } from './commentReply.js';
26
+ import { COMMENTS_SECTION } from 'vscode/vscode/vs/workbench/contrib/comments/common/commentsConfiguration';
27
+ import { COMMENTEDITOR_DECORATION_KEY } from 'vscode/vscode/vs/workbench/contrib/comments/browser/commentReply';
28
28
  import { Emitter } from 'monaco-editor/esm/vs/base/common/event.js';
29
29
  import { IContextKeyService } from 'monaco-editor/esm/vs/platform/contextkey/common/contextkey.js';
30
30
  import { CommentThreadRangeDecorator } from './commentThreadRangeDecorator.js';
@@ -10,10 +10,10 @@ import { IContextKeyService } from 'monaco-editor/esm/vs/platform/contextkey/com
10
10
  import { IListService, WorkbenchObjectTree } from 'monaco-editor/esm/vs/platform/list/browser/listService.js';
11
11
  import { IThemeService } from 'monaco-editor/esm/vs/platform/theme/common/themeService.js';
12
12
  import { IInstantiationService } from 'monaco-editor/esm/vs/platform/instantiation/common/instantiation.js';
13
- import { TimestampWidget } from './timestamp.js';
13
+ import { TimestampWidget } from 'vscode/vscode/vs/workbench/contrib/comments/browser/timestamp';
14
14
  import { Codicon } from 'monaco-editor/esm/vs/base/common/codicons.js';
15
15
  import { ThemeIcon } from 'monaco-editor/esm/vs/base/common/themables.js';
16
- import { commentViewThreadStateColorVar, getCommentThreadStateIconColor } from './commentColors.js';
16
+ import { commentViewThreadStateColorVar, getCommentThreadStateIconColor } from 'vscode/vscode/vs/workbench/contrib/comments/browser/commentColors';
17
17
  import { CommentThreadState } from 'monaco-editor/esm/vs/editor/common/languages.js';
18
18
  import { FilterOptions } from './commentsFilterOptions.js';
19
19
  import { basename } from 'monaco-editor/esm/vs/base/common/resources.js';
@@ -9,7 +9,7 @@ import { IInstantiationService } from 'monaco-editor/esm/vs/platform/instantiati
9
9
  import { EditorInput } from 'vscode/vscode/vs/workbench/common/editor/editorInput';
10
10
  import { IInteractiveDocumentService } from 'vscode/vscode/vs/workbench/contrib/interactive/browser/interactiveDocumentService';
11
11
  import { IInteractiveHistoryService } from './interactiveHistoryService.js';
12
- import { NotebookEditorInput } from '../../../../../../../override/vs/workbench/contrib/notebook/common/notebookEditorInput.js';
12
+ import { NotebookEditorInput } from 'vscode/vscode/vs/workbench/contrib/notebook/common/notebookEditorInput';
13
13
  import { INotebookService } from 'vscode/vscode/vs/workbench/contrib/notebook/common/notebookService';
14
14
  import { IFileDialogService } from 'vscode/vscode/vs/platform/dialogs/common/dialogs';
15
15
 
@@ -1,3 +0,0 @@
1
- class NotebookEditorInput {}
2
-
3
- export { NotebookEditorInput };
@@ -1,40 +0,0 @@
1
- import { Codicon } from 'monaco-editor/esm/vs/base/common/codicons.js';
2
- import { localizeWithPath } from 'monaco-editor/esm/vs/nls.js';
3
- import { Action2, MenuId } from 'monaco-editor/esm/vs/platform/actions/common/actions.js';
4
- import { CHAT_CATEGORY } from 'vscode/vscode/vs/workbench/contrib/chat/browser/actions/chatActions';
5
- import { IChatWidgetService } from 'vscode/vscode/vs/workbench/contrib/chat/browser/chat';
6
- import { CONTEXT_CHAT_INPUT_HAS_TEXT, CONTEXT_CHAT_REQUEST_IN_PROGRESS } from 'vscode/vscode/vs/workbench/contrib/chat/common/chatContextKeys';
7
-
8
- class SubmitAction extends Action2 {
9
- static { this.ID = 'workbench.action.chat.submit'; }
10
- constructor() {
11
- super({
12
- id: SubmitAction.ID,
13
- title: {
14
- value: ( localizeWithPath(
15
- 'vs/workbench/contrib/chat/browser/actions/chatExecuteActions',
16
- 'interactive.submit.label',
17
- "Submit"
18
- )),
19
- original: 'Submit'
20
- },
21
- f1: false,
22
- category: CHAT_CATEGORY,
23
- icon: Codicon.send,
24
- precondition: CONTEXT_CHAT_INPUT_HAS_TEXT,
25
- menu: {
26
- id: MenuId.ChatExecute,
27
- when: ( CONTEXT_CHAT_REQUEST_IN_PROGRESS.negate()),
28
- group: 'navigation',
29
- },
30
- });
31
- }
32
- run(accessor, ...args) {
33
- const context = args[0];
34
- const widgetService = accessor.get(IChatWidgetService);
35
- const widget = context?.widget ?? widgetService.lastFocusedWidget;
36
- widget?.acceptInput(context?.inputValue);
37
- }
38
- }
39
-
40
- export { SubmitAction };
@@ -1,141 +0,0 @@
1
- import { __decorate, __param } from '../../../../../../../external/tslib/tslib.es6.js';
2
- import { CancellationToken } from 'monaco-editor/esm/vs/base/common/cancellation.js';
3
- import { Emitter } from 'monaco-editor/esm/vs/base/common/event.js';
4
- import { toDisposable, Disposable } from 'monaco-editor/esm/vs/base/common/lifecycle.js';
5
- import { Schemas } from 'monaco-editor/esm/vs/base/common/network.js';
6
- import { URI } from 'monaco-editor/esm/vs/base/common/uri.js';
7
- import * as nls from 'monaco-editor/esm/vs/nls.js';
8
- import { EditorInput } from 'vscode/vscode/vs/workbench/common/editor/editorInput';
9
- import { IChatService } from 'vscode/vscode/vs/workbench/contrib/chat/common/chatService';
10
-
11
- var ChatEditorInput_1;
12
- let ChatEditorInput = class ChatEditorInput extends EditorInput {
13
- static { ChatEditorInput_1 = this; }
14
- static { this.countsInUse = ( new Set()); }
15
- static { this.TypeID = 'workbench.input.chatSession'; }
16
- static { this.EditorID = 'workbench.editor.chatSession'; }
17
- static getNewEditorUri() {
18
- const handle = Math.floor(Math.random() * 1e9);
19
- return ChatUri.generate(handle);
20
- }
21
- static getNextCount() {
22
- let count = 0;
23
- while (( ChatEditorInput_1.countsInUse.has(count))) {
24
- count++;
25
- }
26
- return count;
27
- }
28
- constructor(resource, options, chatService) {
29
- super();
30
- this.resource = resource;
31
- this.options = options;
32
- this.chatService = chatService;
33
- const parsed = ChatUri.parse(resource);
34
- if (typeof parsed?.handle !== 'number') {
35
- throw new Error('Invalid chat URI');
36
- }
37
- this.sessionId = 'sessionId' in options.target ? options.target.sessionId : undefined;
38
- this.providerId = 'providerId' in options.target ? options.target.providerId : undefined;
39
- this.inputCount = ChatEditorInput_1.getNextCount();
40
- ChatEditorInput_1.countsInUse.add(this.inputCount);
41
- this._register(toDisposable(() => ChatEditorInput_1.countsInUse.delete(this.inputCount)));
42
- }
43
- get editorId() {
44
- return ChatEditorInput_1.EditorID;
45
- }
46
- get capabilities() {
47
- return super.capabilities | 8 ;
48
- }
49
- matches(otherInput) {
50
- return otherInput instanceof ChatEditorInput_1 && ( otherInput.resource.toString()) === ( this.resource.toString());
51
- }
52
- get typeId() {
53
- return ChatEditorInput_1.TypeID;
54
- }
55
- getName() {
56
- return this.model?.title || ( nls.localizeWithPath(
57
- 'vs/workbench/contrib/chat/browser/chatEditorInput',
58
- 'chatEditorName',
59
- "Chat"
60
- )) + (this.inputCount > 0 ? ` ${this.inputCount + 1}` : '');
61
- }
62
- getLabelExtraClasses() {
63
- return ['chat-editor-label'];
64
- }
65
- async resolve() {
66
- if (typeof this.sessionId === 'string') {
67
- this.model = this.chatService.getOrRestoreSession(this.sessionId);
68
- }
69
- else if (typeof this.providerId === 'string') {
70
- this.model = this.chatService.startSession(this.providerId, CancellationToken.None);
71
- }
72
- else if ('data' in this.options.target) {
73
- this.model = this.chatService.loadSessionFromContent(this.options.target.data);
74
- }
75
- if (!this.model) {
76
- return null;
77
- }
78
- this.sessionId = this.model.sessionId;
79
- this.providerId = this.model.providerId;
80
- this._register(this.model.onDidChange(() => this._onDidChangeLabel.fire()));
81
- return this._register(( new ChatEditorModel(this.model)));
82
- }
83
- dispose() {
84
- super.dispose();
85
- if (this.sessionId) {
86
- this.chatService.clearSession(this.sessionId);
87
- }
88
- }
89
- };
90
- ChatEditorInput = ChatEditorInput_1 = ( __decorate([
91
- ( __param(2, IChatService))
92
- ], ChatEditorInput));
93
- class ChatEditorModel extends Disposable {
94
- constructor(model) {
95
- super();
96
- this.model = model;
97
- this._onWillDispose = this._register(( new Emitter()));
98
- this.onWillDispose = this._onWillDispose.event;
99
- this._isDisposed = false;
100
- this._isResolved = false;
101
- }
102
- async resolve() {
103
- this._isResolved = true;
104
- }
105
- isResolved() {
106
- return this._isResolved;
107
- }
108
- isDisposed() {
109
- return this._isDisposed;
110
- }
111
- dispose() {
112
- super.dispose();
113
- this._isDisposed = true;
114
- }
115
- }
116
- var ChatUri;
117
- ( (function(ChatUri) {
118
- ChatUri.scheme = Schemas.vscodeChatSesssion;
119
- function generate(handle) {
120
- return ( URI.from({ scheme: ChatUri.scheme, path: `chat-${handle}` }));
121
- }
122
- ChatUri.generate = generate;
123
- function parse(resource) {
124
- if (resource.scheme !== ChatUri.scheme) {
125
- return undefined;
126
- }
127
- const match = resource.path.match(/chat-(\d+)/);
128
- const handleStr = match?.[1];
129
- if (typeof handleStr !== 'string') {
130
- return undefined;
131
- }
132
- const handle = parseInt(handleStr);
133
- if (isNaN(handle)) {
134
- return undefined;
135
- }
136
- return { handle };
137
- }
138
- ChatUri.parse = parse;
139
- })(ChatUri || (ChatUri = {})));
140
-
141
- export { ChatEditorInput, ChatEditorModel, ChatUri };
@@ -1,37 +0,0 @@
1
- import * as dom from 'monaco-editor/esm/vs/base/browser/dom.js';
2
- import { Button } from 'monaco-editor/esm/vs/base/browser/ui/button/button.js';
3
- import { MarkdownString } from 'monaco-editor/esm/vs/base/common/htmlContent.js';
4
- import { Disposable } from 'monaco-editor/esm/vs/base/common/lifecycle.js';
5
- import { ContextKeyExpr } from 'monaco-editor/esm/vs/platform/contextkey/common/contextkey.js';
6
-
7
- const $ = dom.$;
8
- class ChatFollowups extends Disposable {
9
- constructor(container, followups, options, clickHandler, contextService) {
10
- super();
11
- this.options = options;
12
- this.clickHandler = clickHandler;
13
- this.contextService = contextService;
14
- const followupsContainer = dom.append(container, $('.interactive-session-followups'));
15
- followups.forEach(followup => this.renderFollowup(followupsContainer, followup));
16
- }
17
- renderFollowup(container, followup) {
18
- if (followup.kind === 'command' && followup.when && !this.contextService.contextMatchesRules(ContextKeyExpr.deserialize(followup.when))) {
19
- return;
20
- }
21
- const tooltip = 'tooltip' in followup ? followup.tooltip : undefined;
22
- const button = this._register(( new Button(container, { ...this.options, supportIcons: true, title: tooltip })));
23
- if (followup.kind === 'reply') {
24
- button.element.classList.add('interactive-followup-reply');
25
- }
26
- else if (followup.kind === 'command') {
27
- button.element.classList.add('interactive-followup-command');
28
- }
29
- const label = followup.kind === 'reply' ?
30
- '$(sparkle) ' + (followup.title || followup.message) :
31
- followup.title;
32
- button.label = ( new MarkdownString(label, { supportThemeIcons: true }));
33
- this._register(button.onDidClick(() => this.clickHandler(followup)));
34
- }
35
- }
36
-
37
- export { ChatFollowups };