@codingame/monaco-vscode-extensions-service-override 19.1.3 → 20.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.
- package/index.js +3 -0
- package/package.json +27 -27
- package/vscode/src/vs/platform/extensionManagement/common/extensionManagementCLI.js +28 -28
- package/vscode/src/vs/workbench/api/browser/mainThreadAuthentication.d.ts +10 -3
- package/vscode/src/vs/workbench/api/browser/mainThreadAuthentication.js +85 -22
- package/vscode/src/vs/workbench/api/browser/mainThreadBulkEdits.js +1 -1
- package/vscode/src/vs/workbench/api/browser/mainThreadCLICommands.js +1 -1
- package/vscode/src/vs/workbench/api/browser/mainThreadChatAgents2.js +9 -6
- package/vscode/src/vs/workbench/api/browser/mainThreadChatOutputRenderer.d.ts +18 -0
- package/vscode/src/vs/workbench/api/browser/mainThreadChatOutputRenderer.js +44 -0
- package/vscode/src/vs/workbench/api/browser/mainThreadChatSessions.d.ts +42 -0
- package/vscode/src/vs/workbench/api/browser/mainThreadChatSessions.js +247 -0
- package/vscode/src/vs/workbench/api/browser/mainThreadClipboard.d.ts +3 -1
- package/vscode/src/vs/workbench/api/browser/mainThreadClipboard.js +9 -3
- package/vscode/src/vs/workbench/api/browser/mainThreadComments.d.ts +1 -1
- package/vscode/src/vs/workbench/api/browser/mainThreadComments.js +1 -1
- package/vscode/src/vs/workbench/api/browser/mainThreadCustomEditors.js +6 -6
- package/vscode/src/vs/workbench/api/browser/mainThreadDataChannels.d.ts +9 -0
- package/vscode/src/vs/workbench/api/browser/mainThreadDataChannels.js +23 -0
- package/vscode/src/vs/workbench/api/browser/mainThreadDocumentsAndEditors.js +1 -1
- package/vscode/src/vs/workbench/api/browser/mainThreadEditSessionIdentityParticipant.js +1 -1
- package/vscode/src/vs/workbench/api/browser/mainThreadEditorTabs.d.ts +1 -1
- package/vscode/src/vs/workbench/api/browser/mainThreadEditorTabs.js +10 -10
- package/vscode/src/vs/workbench/api/browser/mainThreadEditors.d.ts +1 -1
- package/vscode/src/vs/workbench/api/browser/mainThreadEditors.js +1 -1
- package/vscode/src/vs/workbench/api/browser/mainThreadExtensionService.js +11 -11
- package/vscode/src/vs/workbench/api/browser/mainThreadFileSystemEventService.js +20 -20
- package/vscode/src/vs/workbench/api/browser/mainThreadLanguageFeatures.d.ts +3 -3
- package/vscode/src/vs/workbench/api/browser/mainThreadLanguageFeatures.js +12 -6
- package/vscode/src/vs/workbench/api/browser/mainThreadLanguageModelTools.js +1 -0
- package/vscode/src/vs/workbench/api/browser/mainThreadLanguageModels.d.ts +8 -9
- package/vscode/src/vs/workbench/api/browser/mainThreadLanguageModels.js +38 -37
- package/vscode/src/vs/workbench/api/browser/mainThreadMcp.js +11 -8
- package/vscode/src/vs/workbench/api/browser/mainThreadMessageService.js +4 -4
- package/vscode/src/vs/workbench/api/browser/mainThreadNotebook.js +1 -1
- package/vscode/src/vs/workbench/api/browser/mainThreadNotebookDocumentsAndEditors.js +2 -2
- package/vscode/src/vs/workbench/api/browser/mainThreadNotebookEditors.d.ts +2 -2
- package/vscode/src/vs/workbench/api/browser/mainThreadNotebookEditors.js +2 -2
- package/vscode/src/vs/workbench/api/browser/mainThreadNotebookSaveParticipant.js +1 -1
- package/vscode/src/vs/workbench/api/browser/mainThreadOutputService.js +3 -3
- package/vscode/src/vs/workbench/api/browser/mainThreadProgress.js +1 -1
- package/vscode/src/vs/workbench/api/browser/mainThreadSCM.d.ts +5 -1
- package/vscode/src/vs/workbench/api/browser/mainThreadSCM.js +21 -8
- package/vscode/src/vs/workbench/api/browser/mainThreadSaveParticipant.js +1 -1
- package/vscode/src/vs/workbench/api/browser/mainThreadSecretState.d.ts +2 -0
- package/vscode/src/vs/workbench/api/browser/mainThreadSecretState.js +25 -8
- package/vscode/src/vs/workbench/api/browser/mainThreadTask.js +1 -1
- package/vscode/src/vs/workbench/api/browser/mainThreadTerminalService.d.ts +1 -1
- package/vscode/src/vs/workbench/api/browser/mainThreadTerminalService.js +5 -2
- package/vscode/src/vs/workbench/api/browser/mainThreadTerminalShellIntegration.d.ts +3 -1
- package/vscode/src/vs/workbench/api/browser/mainThreadTerminalShellIntegration.js +9 -2
- package/vscode/src/vs/workbench/api/browser/mainThreadTunnelService.js +2 -2
- package/vscode/src/vs/workbench/api/browser/mainThreadUriOpeners.js +2 -2
- package/vscode/src/vs/workbench/api/browser/mainThreadWebviewManager.js +3 -0
- package/vscode/src/vs/workbench/api/browser/mainThreadWebviewPanels.d.ts +1 -1
- package/vscode/src/vs/workbench/api/browser/mainThreadWebviewPanels.js +4 -4
- package/vscode/src/vs/workbench/api/browser/mainThreadWebviews.d.ts +3 -3
- package/vscode/src/vs/workbench/api/browser/mainThreadWebviews.js +2 -2
- package/vscode/src/vs/workbench/api/browser/mainThreadWorkspace.js +5 -5
- package/vscode/src/vs/workbench/contrib/customEditor/common/customTextEditorModel.js +1 -1
- package/vscode/src/vs/workbench/contrib/editTelemetry/browser/telemetry/forwardingTelemetryService.d.ts +30 -0
- package/vscode/src/vs/workbench/contrib/editTelemetry/browser/telemetry/forwardingTelemetryService.js +67 -0
- package/vscode/src/vs/workbench/services/extensionManagement/browser/extensionBisect.js +23 -23
- package/vscode/src/vs/workbench/services/extensions/browser/webWorkerExtensionHost.js +1 -1
- package/vscode/src/vs/workbench/services/extensions/common/abstractExtensionService.d.ts +3 -5
- package/vscode/src/vs/workbench/services/extensions/common/abstractExtensionService.js +32 -22
- package/vscode/src/vs/workbench/services/extensions/common/extensionHostManager.d.ts +2 -5
- package/vscode/src/vs/workbench/services/extensions/common/extensionHostManager.js +1 -1
- package/vscode/src/vs/workbench/services/extensions/common/extensionHostManagers.d.ts +2 -5
- package/vscode/src/vs/workbench/services/extensions/common/extensionsProposedApi.js +1 -1
- package/vscode/src/vs/workbench/services/extensions/common/extensionsUtil.js +4 -4
- package/vscode/src/vs/workbench/services/extensions/common/lazyCreateExtensionHostManager.d.ts +4 -7
- package/vscode/src/vs/workbench/services/extensions/common/lazyCreateExtensionHostManager.js +9 -11
|
@@ -19,15 +19,15 @@ import { IUriIdentityService } from '@codingame/monaco-vscode-api/vscode/vs/plat
|
|
|
19
19
|
import { IChatWidgetService } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/browser/chat.service';
|
|
20
20
|
import { IChatAgentService } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/chatAgents.service';
|
|
21
21
|
import { IChatEditingService } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/chatEditingService.service';
|
|
22
|
-
import { ChatRequestAgentPart } from '@codingame/monaco-vscode-
|
|
23
|
-
import { ChatRequestParser } from '@codingame/monaco-vscode-
|
|
22
|
+
import { ChatRequestAgentPart } from '@codingame/monaco-vscode-b994942c-360d-5b68-8a33-77d4bde6b714-common/vscode/vs/workbench/contrib/chat/common/chatParserTypes';
|
|
23
|
+
import { ChatRequestParser } from '@codingame/monaco-vscode-0af61f78-dfc5-57ba-8d32-66268c8de38d-common/vscode/vs/workbench/contrib/chat/common/chatRequestParser';
|
|
24
24
|
import { IChatService } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/chatService.service';
|
|
25
25
|
import { ChatModeKind, ChatAgentLocation } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/constants';
|
|
26
26
|
import { extHostNamedCustomer } from '../../services/extensions/common/extHostCustomers.js';
|
|
27
27
|
import { IExtensionService } from '@codingame/monaco-vscode-api/vscode/vs/workbench/services/extensions/common/extensions.service';
|
|
28
28
|
import { ExtHostContext, MainContext } from '@codingame/monaco-vscode-api/vscode/vs/workbench/api/common/extHost.protocol';
|
|
29
29
|
import { NotebookDto } from './mainThreadNotebookDto.js';
|
|
30
|
-
import { addDynamicVariableActionId } from '@codingame/monaco-vscode-
|
|
30
|
+
import { addDynamicVariableActionId } from '@codingame/monaco-vscode-6f931a91-88ea-5232-897f-a17ec3929ba5-common/vscode/vs/workbench/contrib/chat/browser/contrib/chatDynamicVariablesConstant';
|
|
31
31
|
|
|
32
32
|
class MainThreadChatTask {
|
|
33
33
|
get onDidAddProgress() { return this._onDidAddProgress.event; }
|
|
@@ -135,6 +135,9 @@ let MainThreadChatAgents2 = class MainThreadChatAgents2 extends Disposable {
|
|
|
135
135
|
this._pendingProgress.delete(request.requestId);
|
|
136
136
|
}
|
|
137
137
|
},
|
|
138
|
+
setRequestTools: (requestId, tools) => {
|
|
139
|
+
this._proxy.$setRequestTools(requestId, tools);
|
|
140
|
+
},
|
|
138
141
|
setRequestPaused: (requestId, isPaused) => {
|
|
139
142
|
this._proxy.$setRequestPaused(handle, requestId, isPaused);
|
|
140
143
|
},
|
|
@@ -167,7 +170,7 @@ let MainThreadChatAgents2 = class MainThreadChatAgents2 extends Disposable {
|
|
|
167
170
|
slashCommands: [],
|
|
168
171
|
disambiguation: [],
|
|
169
172
|
locations: [ChatAgentLocation.Panel],
|
|
170
|
-
modes: [ChatModeKind.Ask]
|
|
173
|
+
modes: [ChatModeKind.Ask, ChatModeKind.Agent, ChatModeKind.Edit],
|
|
171
174
|
}, impl);
|
|
172
175
|
}
|
|
173
176
|
else {
|
|
@@ -195,7 +198,7 @@ let MainThreadChatAgents2 = class MainThreadChatAgents2 extends Disposable {
|
|
|
195
198
|
chunks.forEach(item => {
|
|
196
199
|
const [progress, responsePartHandle] = Array.isArray(item) ? item : [item];
|
|
197
200
|
const revivedProgress = progress.kind === 'notebookEdit'
|
|
198
|
-
? ChatNotebookEdit.fromChatEdit(
|
|
201
|
+
? ChatNotebookEdit.fromChatEdit(progress)
|
|
199
202
|
: revive(progress);
|
|
200
203
|
if (revivedProgress.kind === 'notebookEdit'
|
|
201
204
|
|| revivedProgress.kind === 'textEdit'
|
|
@@ -376,7 +379,7 @@ var ChatNotebookEdit;
|
|
|
376
379
|
function fromChatEdit(part) {
|
|
377
380
|
return {
|
|
378
381
|
kind: 'notebookEdit',
|
|
379
|
-
uri: part.uri,
|
|
382
|
+
uri: URI.revive(part.uri),
|
|
380
383
|
done: part.done,
|
|
381
384
|
edits: ( part.edits.map(NotebookDto.fromCellEditOperationDto))
|
|
382
385
|
};
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { Disposable } from "@codingame/monaco-vscode-api/vscode/vs/base/common/lifecycle";
|
|
2
|
+
import { UriComponents } from "@codingame/monaco-vscode-api/vscode/vs/base/common/uri";
|
|
3
|
+
import { ExtensionIdentifier } from "@codingame/monaco-vscode-api/vscode/vs/platform/extensions/common/extensions";
|
|
4
|
+
import { IChatOutputRendererService } from "@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/browser/chatOutputItemRenderer.service";
|
|
5
|
+
import { IExtHostContext } from "../../services/extensions/common/extHostCustomers.js";
|
|
6
|
+
import { MainThreadChatOutputRendererShape } from "@codingame/monaco-vscode-api/vscode/vs/workbench/api/common/extHost.protocol";
|
|
7
|
+
import { MainThreadWebviews } from "./mainThreadWebviews.js";
|
|
8
|
+
export declare class MainThreadChatOutputRenderer extends Disposable implements MainThreadChatOutputRendererShape {
|
|
9
|
+
private readonly _mainThreadWebview;
|
|
10
|
+
private readonly _rendererService;
|
|
11
|
+
private readonly _proxy;
|
|
12
|
+
private _webviewHandlePool;
|
|
13
|
+
private readonly registeredRenderers;
|
|
14
|
+
constructor(extHostContext: IExtHostContext, _mainThreadWebview: MainThreadWebviews, _rendererService: IChatOutputRendererService);
|
|
15
|
+
dispose(): void;
|
|
16
|
+
$registerChatOutputRenderer(viewType: string, extensionId: ExtensionIdentifier, extensionLocation: UriComponents): void;
|
|
17
|
+
$unregisterChatOutputRenderer(viewType: string): void;
|
|
18
|
+
}
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
|
|
2
|
+
import { __decorate, __param } from '@codingame/monaco-vscode-api/external/tslib/tslib.es6';
|
|
3
|
+
import { VSBuffer } from '@codingame/monaco-vscode-api/vscode/vs/base/common/buffer';
|
|
4
|
+
import { Disposable } from '@codingame/monaco-vscode-api/vscode/vs/base/common/lifecycle';
|
|
5
|
+
import { URI } from '@codingame/monaco-vscode-api/vscode/vs/base/common/uri';
|
|
6
|
+
import { IChatOutputRendererService } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/browser/chatOutputItemRenderer.service';
|
|
7
|
+
import { ExtHostContext } from '@codingame/monaco-vscode-api/vscode/vs/workbench/api/common/extHost.protocol';
|
|
8
|
+
|
|
9
|
+
let MainThreadChatOutputRenderer = class MainThreadChatOutputRenderer extends Disposable {
|
|
10
|
+
constructor(extHostContext, _mainThreadWebview, _rendererService) {
|
|
11
|
+
super();
|
|
12
|
+
this._mainThreadWebview = _mainThreadWebview;
|
|
13
|
+
this._rendererService = _rendererService;
|
|
14
|
+
this._webviewHandlePool = 0;
|
|
15
|
+
this.registeredRenderers = ( new Map());
|
|
16
|
+
this._proxy = ( extHostContext.getProxy(ExtHostContext.ExtHostChatOutputRenderer));
|
|
17
|
+
}
|
|
18
|
+
dispose() {
|
|
19
|
+
super.dispose();
|
|
20
|
+
this.registeredRenderers.forEach(disposable => disposable.dispose());
|
|
21
|
+
this.registeredRenderers.clear();
|
|
22
|
+
}
|
|
23
|
+
$registerChatOutputRenderer(viewType, extensionId, extensionLocation) {
|
|
24
|
+
this._rendererService.registerRenderer(viewType, {
|
|
25
|
+
renderOutputPart: async (mime, data, webview, token) => {
|
|
26
|
+
const webviewHandle = `chat-output-${++this._webviewHandlePool}`;
|
|
27
|
+
this._mainThreadWebview.addWebview(webviewHandle, webview, {
|
|
28
|
+
serializeBuffersForPostMessage: true,
|
|
29
|
+
});
|
|
30
|
+
this._proxy.$renderChatOutput(viewType, mime, VSBuffer.wrap(data), webviewHandle, token);
|
|
31
|
+
},
|
|
32
|
+
}, {
|
|
33
|
+
extension: { id: extensionId, location: URI.revive(extensionLocation) }
|
|
34
|
+
});
|
|
35
|
+
}
|
|
36
|
+
$unregisterChatOutputRenderer(viewType) {
|
|
37
|
+
this.registeredRenderers.get(viewType)?.dispose();
|
|
38
|
+
}
|
|
39
|
+
};
|
|
40
|
+
MainThreadChatOutputRenderer = ( __decorate([
|
|
41
|
+
( __param(2, IChatOutputRendererService))
|
|
42
|
+
], MainThreadChatOutputRenderer));
|
|
43
|
+
|
|
44
|
+
export { MainThreadChatOutputRenderer };
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
import { Disposable } from "@codingame/monaco-vscode-api/vscode/vs/base/common/lifecycle";
|
|
2
|
+
import { IDialogService } from "@codingame/monaco-vscode-api/vscode/vs/platform/dialogs/common/dialogs.service";
|
|
3
|
+
import { ILogService } from "@codingame/monaco-vscode-api/vscode/vs/platform/log/common/log.service";
|
|
4
|
+
import { IChatContentInlineReference } from "@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/chatService";
|
|
5
|
+
import { IChatSessionsService } from "@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/chatSessionsService.service";
|
|
6
|
+
import { EditorGroupColumn } from "@codingame/monaco-vscode-a17e9d37-b6c1-5556-8402-5db73960fae3-common/vscode/vs/workbench/services/editor/common/editorGroupColumn";
|
|
7
|
+
import { IEditorService } from "@codingame/monaco-vscode-api/vscode/vs/workbench/services/editor/common/editorService.service";
|
|
8
|
+
import { IExtHostContext } from "../../services/extensions/common/extHostCustomers.js";
|
|
9
|
+
import { Dto } from "@codingame/monaco-vscode-api/vscode/vs/workbench/services/extensions/common/proxyIdentifier";
|
|
10
|
+
import { IViewsService } from "@codingame/monaco-vscode-api/vscode/vs/workbench/services/views/common/viewsService.service";
|
|
11
|
+
import { IChatProgressDto, MainThreadChatSessionsShape } from "@codingame/monaco-vscode-api/vscode/vs/workbench/api/common/extHost.protocol";
|
|
12
|
+
export declare class MainThreadChatSessions extends Disposable implements MainThreadChatSessionsShape {
|
|
13
|
+
private readonly _extHostContext;
|
|
14
|
+
private readonly _chatSessionsService;
|
|
15
|
+
private readonly _dialogService;
|
|
16
|
+
private readonly _editorService;
|
|
17
|
+
private readonly _logService;
|
|
18
|
+
private readonly _viewsService;
|
|
19
|
+
private readonly _itemProvidersRegistrations;
|
|
20
|
+
private readonly _contentProvidersRegisterations;
|
|
21
|
+
private readonly _activeProgressEmitters;
|
|
22
|
+
private readonly _completionEmitters;
|
|
23
|
+
private readonly _pendingProgressChunks;
|
|
24
|
+
private readonly _proxy;
|
|
25
|
+
constructor(_extHostContext: IExtHostContext, _chatSessionsService: IChatSessionsService, _dialogService: IDialogService, _editorService: IEditorService, _logService: ILogService, _viewsService: IViewsService);
|
|
26
|
+
$registerChatSessionItemProvider(handle: number, chatSessionType: string): void;
|
|
27
|
+
$onDidChangeChatSessionItems(chatSessionType: string): void;
|
|
28
|
+
private _provideChatSessionItems;
|
|
29
|
+
private _provideChatSessionContent;
|
|
30
|
+
$unregisterChatSessionItemProvider(handle: number): void;
|
|
31
|
+
$registerChatSessionContentProvider(handle: number, chatSessionType: string): void;
|
|
32
|
+
$unregisterChatSessionContentProvider(handle: number): void;
|
|
33
|
+
$handleProgressChunk(handle: number, sessionId: string, requestId: string, chunks: (IChatProgressDto | [
|
|
34
|
+
IChatProgressDto,
|
|
35
|
+
number
|
|
36
|
+
])[]): Promise<void>;
|
|
37
|
+
$handleProgressComplete(handle: number, sessionId: string, requestId: string): void;
|
|
38
|
+
$handleAnchorResolve(handle: number, sessionId: string, requestId: string, requestHandle: string, anchor: Dto<IChatContentInlineReference>): void;
|
|
39
|
+
dispose(): void;
|
|
40
|
+
private _reviveIconPath;
|
|
41
|
+
$showChatSession(chatSessionType: string, sessionId: string, position: EditorGroupColumn | undefined): Promise<void>;
|
|
42
|
+
}
|
|
@@ -0,0 +1,247 @@
|
|
|
1
|
+
|
|
2
|
+
import { __decorate, __param } from '@codingame/monaco-vscode-api/external/tslib/tslib.es6';
|
|
3
|
+
import { raceCancellationError } from '@codingame/monaco-vscode-api/vscode/vs/base/common/async';
|
|
4
|
+
import { Emitter } from '@codingame/monaco-vscode-api/vscode/vs/base/common/event';
|
|
5
|
+
import { Disposable, DisposableMap } from '@codingame/monaco-vscode-api/vscode/vs/base/common/lifecycle';
|
|
6
|
+
import { revive } from '@codingame/monaco-vscode-api/vscode/vs/base/common/marshalling';
|
|
7
|
+
import { URI } from '@codingame/monaco-vscode-api/vscode/vs/base/common/uri';
|
|
8
|
+
import { localize } from '@codingame/monaco-vscode-api/vscode/vs/nls';
|
|
9
|
+
import { IDialogService } from '@codingame/monaco-vscode-api/vscode/vs/platform/dialogs/common/dialogs.service';
|
|
10
|
+
import { ILogService } from '@codingame/monaco-vscode-api/vscode/vs/platform/log/common/log.service';
|
|
11
|
+
import { ChatViewId } from '@codingame/monaco-vscode-b994942c-360d-5b68-8a33-77d4bde6b714-common/vscode/vs/workbench/contrib/chat/browser/chat';
|
|
12
|
+
import { IChatSessionsService } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/chatSessionsService.service';
|
|
13
|
+
import { ChatSessionUri } from '@codingame/monaco-vscode-b994942c-360d-5b68-8a33-77d4bde6b714-common/vscode/vs/workbench/contrib/chat/common/chatUri';
|
|
14
|
+
import { IEditorService } from '@codingame/monaco-vscode-api/vscode/vs/workbench/services/editor/common/editorService.service';
|
|
15
|
+
import { extHostNamedCustomer } from '../../services/extensions/common/extHostCustomers.js';
|
|
16
|
+
import { IViewsService } from '@codingame/monaco-vscode-api/vscode/vs/workbench/services/views/common/viewsService.service';
|
|
17
|
+
import { ExtHostContext, MainContext } from '@codingame/monaco-vscode-api/vscode/vs/workbench/api/common/extHost.protocol';
|
|
18
|
+
|
|
19
|
+
let MainThreadChatSessions = class MainThreadChatSessions extends Disposable {
|
|
20
|
+
constructor(_extHostContext, _chatSessionsService, _dialogService, _editorService, _logService, _viewsService) {
|
|
21
|
+
super();
|
|
22
|
+
this._extHostContext = _extHostContext;
|
|
23
|
+
this._chatSessionsService = _chatSessionsService;
|
|
24
|
+
this._dialogService = _dialogService;
|
|
25
|
+
this._editorService = _editorService;
|
|
26
|
+
this._logService = _logService;
|
|
27
|
+
this._viewsService = _viewsService;
|
|
28
|
+
this._itemProvidersRegistrations = this._register(( new DisposableMap()));
|
|
29
|
+
this._contentProvidersRegisterations = this._register(( new DisposableMap()));
|
|
30
|
+
this._activeProgressEmitters = ( new Map());
|
|
31
|
+
this._completionEmitters = ( new Map());
|
|
32
|
+
this._pendingProgressChunks = ( new Map());
|
|
33
|
+
this._proxy = ( this._extHostContext.getProxy(ExtHostContext.ExtHostChatSessions));
|
|
34
|
+
}
|
|
35
|
+
$registerChatSessionItemProvider(handle, chatSessionType) {
|
|
36
|
+
const provider = {
|
|
37
|
+
chatSessionType,
|
|
38
|
+
provideChatSessionItems: (token) => this._provideChatSessionItems(handle, token)
|
|
39
|
+
};
|
|
40
|
+
this._itemProvidersRegistrations.set(handle, this._chatSessionsService.registerChatSessionItemProvider(provider));
|
|
41
|
+
}
|
|
42
|
+
$onDidChangeChatSessionItems(chatSessionType) {
|
|
43
|
+
this._chatSessionsService.notifySessionItemsChange(chatSessionType);
|
|
44
|
+
}
|
|
45
|
+
async _provideChatSessionItems(handle, token) {
|
|
46
|
+
try {
|
|
47
|
+
const sessions = await this._proxy.$provideChatSessionItems(handle, token);
|
|
48
|
+
return ( sessions.map(session => ({
|
|
49
|
+
...session,
|
|
50
|
+
id: session.id,
|
|
51
|
+
iconPath: session.iconPath ? this._reviveIconPath(session.iconPath) : undefined
|
|
52
|
+
})));
|
|
53
|
+
}
|
|
54
|
+
catch (error) {
|
|
55
|
+
this._logService.error('Error providing chat sessions:', error);
|
|
56
|
+
}
|
|
57
|
+
return [];
|
|
58
|
+
}
|
|
59
|
+
async _provideChatSessionContent(providerHandle, id, token) {
|
|
60
|
+
try {
|
|
61
|
+
const sessionContent = await raceCancellationError(this._proxy.$provideChatSessionContent(providerHandle, id, token), token);
|
|
62
|
+
const progressEmitter = ( new Emitter());
|
|
63
|
+
const completionEmitter = ( new Emitter());
|
|
64
|
+
let progressEvent = undefined;
|
|
65
|
+
let interruptActiveResponseCallback = undefined;
|
|
66
|
+
if (sessionContent.hasActiveResponseCallback) {
|
|
67
|
+
const requestId = 'ongoing';
|
|
68
|
+
progressEvent = progressEmitter.event;
|
|
69
|
+
const progressKey = `${providerHandle}_${id}_${requestId}`;
|
|
70
|
+
interruptActiveResponseCallback = async () => {
|
|
71
|
+
return this._dialogService.confirm({
|
|
72
|
+
message: ( localize(2445, 'Are you sure you want to interrupt the active session?'))
|
|
73
|
+
}).then(confirmed => {
|
|
74
|
+
if (confirmed.confirmed) {
|
|
75
|
+
this._proxy.$interruptChatSessionActiveResponse(providerHandle, id, requestId);
|
|
76
|
+
return true;
|
|
77
|
+
}
|
|
78
|
+
else {
|
|
79
|
+
progressEmitter.fire([{
|
|
80
|
+
kind: 'progressMessage',
|
|
81
|
+
content: { value: '' }
|
|
82
|
+
}]);
|
|
83
|
+
return false;
|
|
84
|
+
}
|
|
85
|
+
});
|
|
86
|
+
};
|
|
87
|
+
this._activeProgressEmitters.set(progressKey, progressEmitter);
|
|
88
|
+
this._completionEmitters.set(progressKey, completionEmitter);
|
|
89
|
+
}
|
|
90
|
+
let requestHandler;
|
|
91
|
+
if (sessionContent.hasRequestHandler) {
|
|
92
|
+
requestHandler = async (request, progress, history, token) => {
|
|
93
|
+
const progressKey = `${providerHandle}_${id}_${request.requestId}`;
|
|
94
|
+
const _progressEmitter = ( new Emitter());
|
|
95
|
+
this._activeProgressEmitters.set(progressKey, _progressEmitter);
|
|
96
|
+
_progressEmitter.event(e => {
|
|
97
|
+
progress(e);
|
|
98
|
+
});
|
|
99
|
+
await this._proxy.$invokeChatSessionRequestHandler(providerHandle, id, request, [], token);
|
|
100
|
+
};
|
|
101
|
+
}
|
|
102
|
+
const onWillDisposeEventEmitter = ( new Emitter());
|
|
103
|
+
return {
|
|
104
|
+
id: sessionContent.id,
|
|
105
|
+
onWillDispose: onWillDisposeEventEmitter.event,
|
|
106
|
+
history: ( sessionContent.history.map(turn => {
|
|
107
|
+
if (turn.type === 'request') {
|
|
108
|
+
return { type: 'request', prompt: turn.prompt };
|
|
109
|
+
}
|
|
110
|
+
return {
|
|
111
|
+
type: 'response',
|
|
112
|
+
parts: ( turn.parts.map(part => revive(part)))
|
|
113
|
+
};
|
|
114
|
+
})),
|
|
115
|
+
progressEvent: progressEvent,
|
|
116
|
+
requestHandler: requestHandler,
|
|
117
|
+
interruptActiveResponseCallback: interruptActiveResponseCallback,
|
|
118
|
+
dispose: () => {
|
|
119
|
+
onWillDisposeEventEmitter.fire();
|
|
120
|
+
onWillDisposeEventEmitter.dispose();
|
|
121
|
+
progressEmitter.dispose();
|
|
122
|
+
completionEmitter.dispose();
|
|
123
|
+
this._proxy.$disposeChatSessionContent(providerHandle, sessionContent.id);
|
|
124
|
+
},
|
|
125
|
+
};
|
|
126
|
+
}
|
|
127
|
+
catch (error) {
|
|
128
|
+
this._logService.error(`Error providing chat session content for handle ${providerHandle} and id ${id}:`, error);
|
|
129
|
+
throw error;
|
|
130
|
+
}
|
|
131
|
+
}
|
|
132
|
+
$unregisterChatSessionItemProvider(handle) {
|
|
133
|
+
this._itemProvidersRegistrations.deleteAndDispose(handle);
|
|
134
|
+
}
|
|
135
|
+
$registerChatSessionContentProvider(handle, chatSessionType) {
|
|
136
|
+
const provider = {
|
|
137
|
+
chatSessionType,
|
|
138
|
+
provideChatSessionContent: (id, token) => this._provideChatSessionContent(handle, id, token)
|
|
139
|
+
};
|
|
140
|
+
this._contentProvidersRegisterations.set(handle, this._chatSessionsService.registerChatSessionContentProvider(provider));
|
|
141
|
+
}
|
|
142
|
+
$unregisterChatSessionContentProvider(handle) {
|
|
143
|
+
this._contentProvidersRegisterations.deleteAndDispose(handle);
|
|
144
|
+
}
|
|
145
|
+
async $handleProgressChunk(handle, sessionId, requestId, chunks) {
|
|
146
|
+
const progressKey = `${handle}_${sessionId}_${requestId}`;
|
|
147
|
+
const progressEmitter = this._activeProgressEmitters.get(progressKey);
|
|
148
|
+
if (!progressEmitter) {
|
|
149
|
+
const existingChunks = this._pendingProgressChunks.get(progressKey) || [];
|
|
150
|
+
this._pendingProgressChunks.set(progressKey, [...existingChunks, ...chunks]);
|
|
151
|
+
this._logService.debug(`Storing pending progress chunks for handle ${handle}, sessionId ${sessionId}, requestId ${requestId}`);
|
|
152
|
+
return;
|
|
153
|
+
}
|
|
154
|
+
const pendingChunks = this._pendingProgressChunks.get(progressKey);
|
|
155
|
+
if (pendingChunks && pendingChunks.length > 0) {
|
|
156
|
+
this._logService.debug(`Flushing ${pendingChunks.length} pending progress chunks for handle ${handle}, sessionId ${sessionId}, requestId ${requestId}`);
|
|
157
|
+
const pendingProgressParts = ( pendingChunks.map(chunk => {
|
|
158
|
+
const [progress] = Array.isArray(chunk) ? chunk : [chunk];
|
|
159
|
+
return revive(progress);
|
|
160
|
+
}));
|
|
161
|
+
progressEmitter.fire(pendingProgressParts);
|
|
162
|
+
this._pendingProgressChunks.delete(progressKey);
|
|
163
|
+
}
|
|
164
|
+
const chatProgressParts = ( chunks.map(chunk => {
|
|
165
|
+
const [progress] = Array.isArray(chunk) ? chunk : [chunk];
|
|
166
|
+
return revive(progress);
|
|
167
|
+
}));
|
|
168
|
+
progressEmitter.fire(chatProgressParts);
|
|
169
|
+
}
|
|
170
|
+
$handleProgressComplete(handle, sessionId, requestId) {
|
|
171
|
+
const progressKey = `${handle}_${sessionId}_${requestId}`;
|
|
172
|
+
const progressEmitter = this._activeProgressEmitters.get(progressKey);
|
|
173
|
+
const completionEmitter = this._completionEmitters.get(progressKey);
|
|
174
|
+
if (!progressEmitter) {
|
|
175
|
+
this._logService.warn(`No progress emitter found for handle ${handle} and requestId ${requestId}`);
|
|
176
|
+
return;
|
|
177
|
+
}
|
|
178
|
+
const completionProgress = {
|
|
179
|
+
kind: 'progressMessage',
|
|
180
|
+
content: { value: 'Session completed', isTrusted: false }
|
|
181
|
+
};
|
|
182
|
+
progressEmitter.fire([completionProgress]);
|
|
183
|
+
if (completionEmitter) {
|
|
184
|
+
completionEmitter.fire();
|
|
185
|
+
}
|
|
186
|
+
progressEmitter.dispose();
|
|
187
|
+
completionEmitter?.dispose();
|
|
188
|
+
this._activeProgressEmitters.delete(progressKey);
|
|
189
|
+
this._completionEmitters.delete(progressKey);
|
|
190
|
+
this._pendingProgressChunks.delete(progressKey);
|
|
191
|
+
}
|
|
192
|
+
$handleAnchorResolve(handle, sessionId, requestId, requestHandle, anchor) {
|
|
193
|
+
}
|
|
194
|
+
dispose() {
|
|
195
|
+
for (const emitter of ( this._activeProgressEmitters.values())) {
|
|
196
|
+
emitter.dispose();
|
|
197
|
+
}
|
|
198
|
+
this._activeProgressEmitters.clear();
|
|
199
|
+
for (const emitter of ( this._completionEmitters.values())) {
|
|
200
|
+
emitter.dispose();
|
|
201
|
+
}
|
|
202
|
+
this._completionEmitters.clear();
|
|
203
|
+
this._pendingProgressChunks.clear();
|
|
204
|
+
super.dispose();
|
|
205
|
+
}
|
|
206
|
+
_reviveIconPath(iconPath) {
|
|
207
|
+
if (!iconPath) {
|
|
208
|
+
return undefined;
|
|
209
|
+
}
|
|
210
|
+
if (typeof iconPath === 'object' && 'id' in iconPath) {
|
|
211
|
+
return iconPath;
|
|
212
|
+
}
|
|
213
|
+
if (typeof iconPath === 'object' && 'scheme' in iconPath) {
|
|
214
|
+
return URI.revive(iconPath);
|
|
215
|
+
}
|
|
216
|
+
if (typeof iconPath === 'object' && ('light' in iconPath && 'dark' in iconPath)) {
|
|
217
|
+
return {
|
|
218
|
+
light: URI.revive(iconPath.light),
|
|
219
|
+
dark: URI.revive(iconPath.dark)
|
|
220
|
+
};
|
|
221
|
+
}
|
|
222
|
+
return undefined;
|
|
223
|
+
}
|
|
224
|
+
async $showChatSession(chatSessionType, sessionId, position) {
|
|
225
|
+
const sessionUri = ChatSessionUri.forSession(chatSessionType, sessionId);
|
|
226
|
+
if (typeof position === 'undefined') {
|
|
227
|
+
const chatPanel = await this._viewsService.openView(ChatViewId);
|
|
228
|
+
await chatPanel?.loadSession(sessionUri);
|
|
229
|
+
}
|
|
230
|
+
else {
|
|
231
|
+
await this._editorService.openEditor({
|
|
232
|
+
resource: sessionUri,
|
|
233
|
+
options: { pinned: true },
|
|
234
|
+
}, position);
|
|
235
|
+
}
|
|
236
|
+
}
|
|
237
|
+
};
|
|
238
|
+
MainThreadChatSessions = __decorate([
|
|
239
|
+
extHostNamedCustomer(MainContext.MainThreadChatSessions),
|
|
240
|
+
( __param(1, IChatSessionsService)),
|
|
241
|
+
( __param(2, IDialogService)),
|
|
242
|
+
( __param(3, IEditorService)),
|
|
243
|
+
( __param(4, ILogService)),
|
|
244
|
+
( __param(5, IViewsService))
|
|
245
|
+
], MainThreadChatSessions);
|
|
246
|
+
|
|
247
|
+
export { MainThreadChatSessions };
|
|
@@ -1,8 +1,10 @@
|
|
|
1
1
|
import { MainThreadClipboardShape } from "@codingame/monaco-vscode-api/vscode/vs/workbench/api/common/extHost.protocol";
|
|
2
2
|
import { IClipboardService } from "@codingame/monaco-vscode-api/vscode/vs/platform/clipboard/common/clipboardService.service";
|
|
3
|
+
import { ILogService } from "@codingame/monaco-vscode-api/vscode/vs/platform/log/common/log.service";
|
|
3
4
|
export declare class MainThreadClipboard implements MainThreadClipboardShape {
|
|
4
5
|
private readonly _clipboardService;
|
|
5
|
-
|
|
6
|
+
private readonly _logService;
|
|
7
|
+
constructor(_context: any, _clipboardService: IClipboardService, _logService: ILogService);
|
|
6
8
|
dispose(): void;
|
|
7
9
|
$readText(): Promise<string>;
|
|
8
10
|
$writeText(value: string): Promise<void>;
|
|
@@ -3,23 +3,29 @@ import { __decorate, __param } from '@codingame/monaco-vscode-api/external/tslib
|
|
|
3
3
|
import { extHostNamedCustomer } from '../../services/extensions/common/extHostCustomers.js';
|
|
4
4
|
import { MainContext } from '@codingame/monaco-vscode-api/vscode/vs/workbench/api/common/extHost.protocol';
|
|
5
5
|
import { IClipboardService } from '@codingame/monaco-vscode-api/vscode/vs/platform/clipboard/common/clipboardService.service';
|
|
6
|
+
import { ILogService } from '@codingame/monaco-vscode-api/vscode/vs/platform/log/common/log.service';
|
|
6
7
|
|
|
7
8
|
let MainThreadClipboard = class MainThreadClipboard {
|
|
8
|
-
constructor(_context, _clipboardService) {
|
|
9
|
+
constructor(_context, _clipboardService, _logService) {
|
|
9
10
|
this._clipboardService = _clipboardService;
|
|
11
|
+
this._logService = _logService;
|
|
10
12
|
}
|
|
11
13
|
dispose() {
|
|
12
14
|
}
|
|
13
15
|
$readText() {
|
|
14
|
-
|
|
16
|
+
this._logService.trace('MainThreadClipboard#readText');
|
|
17
|
+
const readText = this._clipboardService.readText();
|
|
18
|
+
return readText;
|
|
15
19
|
}
|
|
16
20
|
$writeText(value) {
|
|
21
|
+
this._logService.trace('MainThreadClipboard#writeText with text.length : ', value.length);
|
|
17
22
|
return this._clipboardService.writeText(value);
|
|
18
23
|
}
|
|
19
24
|
};
|
|
20
25
|
MainThreadClipboard = __decorate([
|
|
21
26
|
extHostNamedCustomer(MainContext.MainThreadClipboard),
|
|
22
|
-
( __param(1, IClipboardService))
|
|
27
|
+
( __param(1, IClipboardService)),
|
|
28
|
+
( __param(2, ILogService))
|
|
23
29
|
], MainThreadClipboard);
|
|
24
30
|
|
|
25
31
|
export { MainThreadClipboard };
|
|
@@ -10,7 +10,7 @@ import { ICommentController } from "@codingame/monaco-vscode-comments-service-ov
|
|
|
10
10
|
import { ICommentService } from "@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/comments/browser/commentService.service";
|
|
11
11
|
import { CommentProviderFeatures, ExtHostCommentsShape, MainThreadCommentsShape, CommentThreadChanges } from "@codingame/monaco-vscode-api/vscode/vs/workbench/api/common/extHost.protocol";
|
|
12
12
|
import { IViewDescriptorService } from "@codingame/monaco-vscode-api/vscode/vs/workbench/common/views.service";
|
|
13
|
-
import { ICellRange } from "@codingame/monaco-vscode-
|
|
13
|
+
import { ICellRange } from "@codingame/monaco-vscode-670aae94-7f88-54d7-90ea-6fcbef423557-common/vscode/vs/workbench/contrib/notebook/common/notebookRange";
|
|
14
14
|
import { IViewsService } from "@codingame/monaco-vscode-api/vscode/vs/workbench/services/views/common/viewsService.service";
|
|
15
15
|
import { MarshalledCommentThread } from "../../common/comments.js";
|
|
16
16
|
import { IEditorService } from "@codingame/monaco-vscode-api/vscode/vs/workbench/services/editor/common/editorService.service";
|
|
@@ -424,7 +424,7 @@ class MainThreadCommentController extends Disposable {
|
|
|
424
424
|
};
|
|
425
425
|
}
|
|
426
426
|
}
|
|
427
|
-
const commentsViewIcon = registerIcon('comments-view-icon', Codicon.commentDiscussion, ( localize(
|
|
427
|
+
const commentsViewIcon = registerIcon('comments-view-icon', Codicon.commentDiscussion, ( localize(2446, 'View icon of the comments view.')));
|
|
428
428
|
let MainThreadComments = class MainThreadComments extends Disposable {
|
|
429
429
|
constructor(extHostContext, _commentService, _viewsService, _viewDescriptorService, _uriIdentityService, _editorService) {
|
|
430
430
|
super();
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
|
|
2
2
|
import { __decorate, __param } from '@codingame/monaco-vscode-api/external/tslib/tslib.es6';
|
|
3
|
-
import { multibyteAwareBtoa } from '@codingame/monaco-vscode-api/vscode/vs/base/
|
|
3
|
+
import { multibyteAwareBtoa } from '@codingame/monaco-vscode-api/vscode/vs/base/common/strings';
|
|
4
4
|
import { createCancelablePromise } from '@codingame/monaco-vscode-api/vscode/vs/base/common/async';
|
|
5
5
|
import { CancellationToken } from '@codingame/monaco-vscode-api/vscode/vs/base/common/cancellation';
|
|
6
6
|
import { onUnexpectedError, isCancellationError } from '@codingame/monaco-vscode-api/vscode/vs/base/common/errors';
|
|
@@ -25,16 +25,16 @@ import { ExtHostContext } from '@codingame/monaco-vscode-api/vscode/vs/workbench
|
|
|
25
25
|
import { CustomEditorInput } from '@codingame/monaco-vscode-7f39b6f1-3542-5430-8760-0f404d7a7cee-common/vscode/vs/workbench/contrib/customEditor/browser/customEditorInput';
|
|
26
26
|
import { ICustomEditorService } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/customEditor/common/customEditor.service';
|
|
27
27
|
import { CustomTextEditorModel } from '../../contrib/customEditor/common/customTextEditorModel.js';
|
|
28
|
-
import { ExtensionKeyedWebviewOriginStore } from '@codingame/monaco-vscode-
|
|
28
|
+
import { ExtensionKeyedWebviewOriginStore } from '@codingame/monaco-vscode-a654b07e-8806-5425-b124-18f03ba8e11a-common/vscode/vs/workbench/contrib/webview/browser/webview';
|
|
29
29
|
import { IWebviewWorkbenchService } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/webviewPanel/browser/webviewWorkbenchService.service';
|
|
30
|
-
import { editorGroupToColumn } from '@codingame/monaco-vscode-
|
|
30
|
+
import { editorGroupToColumn } from '@codingame/monaco-vscode-a17e9d37-b6c1-5556-8402-5db73960fae3-common/vscode/vs/workbench/services/editor/common/editorGroupColumn';
|
|
31
31
|
import { IEditorGroupsService } from '@codingame/monaco-vscode-api/vscode/vs/workbench/services/editor/common/editorGroupsService.service';
|
|
32
32
|
import { IEditorService } from '@codingame/monaco-vscode-api/vscode/vs/workbench/services/editor/common/editorService.service';
|
|
33
33
|
import { IWorkbenchEnvironmentService } from '@codingame/monaco-vscode-api/vscode/vs/workbench/services/environment/common/environmentService.service';
|
|
34
34
|
import { IExtensionService } from '@codingame/monaco-vscode-api/vscode/vs/workbench/services/extensions/common/extensions.service';
|
|
35
35
|
import { IPathService } from '@codingame/monaco-vscode-api/vscode/vs/workbench/services/path/common/pathService.service';
|
|
36
36
|
import { ResourceWorkingCopy } from '@codingame/monaco-vscode-6f931a91-88ea-5232-897f-a17ec3929ba5-common/vscode/vs/workbench/services/workingCopy/common/resourceWorkingCopy';
|
|
37
|
-
import { NO_TYPE_ID, WorkingCopyCapabilities } from '@codingame/monaco-vscode-
|
|
37
|
+
import { NO_TYPE_ID, WorkingCopyCapabilities } from '@codingame/monaco-vscode-caeb744c-8e3f-5c11-80fb-0f057d24d544-common/vscode/vs/workbench/services/workingCopy/common/workingCopy';
|
|
38
38
|
import { IWorkingCopyFileService } from '@codingame/monaco-vscode-api/vscode/vs/workbench/services/workingCopy/common/workingCopyFileService.service';
|
|
39
39
|
import { IWorkingCopyService } from '@codingame/monaco-vscode-api/vscode/vs/workbench/services/workingCopy/common/workingCopyService.service';
|
|
40
40
|
import { IUriIdentityService } from '@codingame/monaco-vscode-api/vscode/vs/platform/uriIdentity/common/uriIdentity.service';
|
|
@@ -303,7 +303,7 @@ let MainThreadCustomEditorModel = MainThreadCustomEditorModel_1 = class MainThre
|
|
|
303
303
|
this._register(workingCopyService.registerWorkingCopy(this));
|
|
304
304
|
this._register(extensionService.onWillStop(e => {
|
|
305
305
|
e.veto(true, ( localize(
|
|
306
|
-
|
|
306
|
+
2447,
|
|
307
307
|
"An extension provided editor for '{0}' is still open that would close otherwise.",
|
|
308
308
|
this.name
|
|
309
309
|
)));
|
|
@@ -371,7 +371,7 @@ let MainThreadCustomEditorModel = MainThreadCustomEditorModel_1 = class MainThre
|
|
|
371
371
|
this._undoService.pushElement({
|
|
372
372
|
type: UndoRedoElementType.Resource,
|
|
373
373
|
resource: this._editorResource,
|
|
374
|
-
label: label ?? ( localize(
|
|
374
|
+
label: label ?? ( localize(2448, "Edit")),
|
|
375
375
|
code: 'undoredo.customEditorEdit',
|
|
376
376
|
undo: () => this.undo(),
|
|
377
377
|
redo: () => this.redo(),
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { Disposable } from "@codingame/monaco-vscode-api/vscode/vs/base/common/lifecycle";
|
|
2
|
+
import { IDataChannelService } from "@codingame/monaco-vscode-api/vscode/vs/workbench/services/dataChannel/common/dataChannel.service";
|
|
3
|
+
import { IExtHostContext } from "../../services/extensions/common/extHostCustomers.js";
|
|
4
|
+
import { MainThreadDataChannelsShape } from "@codingame/monaco-vscode-api/vscode/vs/workbench/api/common/extHost.protocol";
|
|
5
|
+
export declare class MainThreadDataChannels extends Disposable implements MainThreadDataChannelsShape {
|
|
6
|
+
private readonly _dataChannelService;
|
|
7
|
+
private readonly _proxy;
|
|
8
|
+
constructor(extHostContext: IExtHostContext, _dataChannelService: IDataChannelService);
|
|
9
|
+
}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
|
|
2
|
+
import { __decorate, __param } from '@codingame/monaco-vscode-api/external/tslib/tslib.es6';
|
|
3
|
+
import { Disposable } from '@codingame/monaco-vscode-api/vscode/vs/base/common/lifecycle';
|
|
4
|
+
import { IDataChannelService } from '@codingame/monaco-vscode-api/vscode/vs/workbench/services/dataChannel/common/dataChannel.service';
|
|
5
|
+
import { extHostNamedCustomer } from '../../services/extensions/common/extHostCustomers.js';
|
|
6
|
+
import { ExtHostContext, MainContext } from '@codingame/monaco-vscode-api/vscode/vs/workbench/api/common/extHost.protocol';
|
|
7
|
+
|
|
8
|
+
let MainThreadDataChannels = class MainThreadDataChannels extends Disposable {
|
|
9
|
+
constructor(extHostContext, _dataChannelService) {
|
|
10
|
+
super();
|
|
11
|
+
this._dataChannelService = _dataChannelService;
|
|
12
|
+
this._proxy = ( extHostContext.getProxy(ExtHostContext.ExtHostDataChannels));
|
|
13
|
+
this._register(this._dataChannelService.onDidSendData(e => {
|
|
14
|
+
this._proxy.$onDidReceiveData(e.channelId, e.data);
|
|
15
|
+
}));
|
|
16
|
+
}
|
|
17
|
+
};
|
|
18
|
+
MainThreadDataChannels = __decorate([
|
|
19
|
+
extHostNamedCustomer(MainContext.MainThreadDataChannels),
|
|
20
|
+
( __param(1, IDataChannelService))
|
|
21
|
+
], MainThreadDataChannels);
|
|
22
|
+
|
|
23
|
+
export { MainThreadDataChannels };
|
|
@@ -13,7 +13,7 @@ import { MainThreadDocuments } from './mainThreadDocuments.js';
|
|
|
13
13
|
import { MainThreadTextEditor } from './mainThreadEditor.js';
|
|
14
14
|
import { MainThreadTextEditors } from './mainThreadEditors.js';
|
|
15
15
|
import { ExtHostContext, MainContext } from '@codingame/monaco-vscode-api/vscode/vs/workbench/api/common/extHost.protocol';
|
|
16
|
-
import { editorGroupToColumn } from '@codingame/monaco-vscode-
|
|
16
|
+
import { editorGroupToColumn } from '@codingame/monaco-vscode-a17e9d37-b6c1-5556-8402-5db73960fae3-common/vscode/vs/workbench/services/editor/common/editorGroupColumn';
|
|
17
17
|
import { IEditorService } from '@codingame/monaco-vscode-api/vscode/vs/workbench/services/editor/common/editorService.service';
|
|
18
18
|
import { IEditorGroupsService } from '@codingame/monaco-vscode-api/vscode/vs/workbench/services/editor/common/editorGroupsService.service';
|
|
19
19
|
import { ITextFileService } from '@codingame/monaco-vscode-api/vscode/vs/workbench/services/textfile/common/textfiles.service';
|
|
@@ -14,7 +14,7 @@ class ExtHostEditSessionIdentityCreateParticipant {
|
|
|
14
14
|
}
|
|
15
15
|
async participate(workspaceFolder, token) {
|
|
16
16
|
const p = ( new Promise((resolve, reject) => {
|
|
17
|
-
setTimeout(() => reject(( new Error(( localize(
|
|
17
|
+
setTimeout(() => reject(( new Error(( localize(2449, "Aborted onWillCreateEditSessionIdentity-event after 10000ms"))))), this.timeout);
|
|
18
18
|
this._proxy.$onWillCreateEditSessionIdentity(workspaceFolder.uri, token, this.timeout).then(resolve, reject);
|
|
19
19
|
}));
|
|
20
20
|
return raceCancellationError(p, token);
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { IConfigurationService } from "@codingame/monaco-vscode-api/vscode/vs/platform/configuration/common/configuration.service";
|
|
2
2
|
import { ILogService } from "@codingame/monaco-vscode-api/vscode/vs/platform/log/common/log.service";
|
|
3
3
|
import { MainThreadEditorTabsShape } from "@codingame/monaco-vscode-api/vscode/vs/workbench/api/common/extHost.protocol";
|
|
4
|
-
import { EditorGroupColumn } from "@codingame/monaco-vscode-
|
|
4
|
+
import { EditorGroupColumn } from "@codingame/monaco-vscode-a17e9d37-b6c1-5556-8402-5db73960fae3-common/vscode/vs/workbench/services/editor/common/editorGroupColumn";
|
|
5
5
|
import { IEditorGroupsService } from "@codingame/monaco-vscode-api/vscode/vs/workbench/services/editor/common/editorGroupsService.service";
|
|
6
6
|
import { IEditorService } from "@codingame/monaco-vscode-api/vscode/vs/workbench/services/editor/common/editorService.service";
|
|
7
7
|
import { IExtHostContext } from "../../services/extensions/common/extHostCustomers.js";
|