@codingame/monaco-vscode-extensions-service-override 28.4.1 → 29.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 +1 -0
- package/package.json +3 -3
- package/vscode/src/vs/platform/browserView/common/browserViewTelemetry.d.ts +34 -0
- package/vscode/src/vs/platform/browserView/common/browserViewTelemetry.js +7 -0
- package/vscode/src/vs/platform/browserView/common/browserViewUri.d.ts +21 -0
- package/vscode/src/vs/platform/browserView/common/browserViewUri.js +34 -0
- package/vscode/src/vs/platform/extensionManagement/common/extensionManagementCLI.js +28 -28
- package/vscode/src/vs/workbench/api/browser/mainThreadAuthentication.js +25 -25
- package/vscode/src/vs/workbench/api/browser/mainThreadBrowsers.d.ts +29 -0
- package/vscode/src/vs/workbench/api/browser/mainThreadBrowsers.js +147 -0
- package/vscode/src/vs/workbench/api/browser/mainThreadCLICommands.js +1 -1
- package/vscode/src/vs/workbench/api/browser/mainThreadChatAgents2.js +6 -20
- package/vscode/src/vs/workbench/api/browser/mainThreadChatDebug.d.ts +8 -1
- package/vscode/src/vs/workbench/api/browser/mainThreadChatDebug.js +160 -4
- package/vscode/src/vs/workbench/api/browser/mainThreadChatSessions.d.ts +19 -14
- package/vscode/src/vs/workbench/api/browser/mainThreadChatSessions.js +134 -49
- package/vscode/src/vs/workbench/api/browser/mainThreadComments.js +1 -1
- package/vscode/src/vs/workbench/api/browser/mainThreadCustomEditors.js +2 -2
- package/vscode/src/vs/workbench/api/browser/mainThreadDownloadService.js +1 -1
- package/vscode/src/vs/workbench/api/browser/mainThreadEditSessionIdentityParticipant.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/mainThreadGitExtensionService.d.ts +3 -1
- package/vscode/src/vs/workbench/api/browser/mainThreadGitExtensionService.js +47 -1
- package/vscode/src/vs/workbench/api/browser/mainThreadLanguageModelTools.d.ts +3 -1
- package/vscode/src/vs/workbench/api/browser/mainThreadLanguageModelTools.js +9 -4
- package/vscode/src/vs/workbench/api/browser/mainThreadLanguageModels.js +2 -2
- package/vscode/src/vs/workbench/api/browser/mainThreadMcp.d.ts +4 -1
- package/vscode/src/vs/workbench/api/browser/mainThreadMcp.js +21 -10
- package/vscode/src/vs/workbench/api/browser/mainThreadMessageService.js +4 -4
- 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/mainThreadSaveParticipant.js +1 -1
- package/vscode/src/vs/workbench/api/browser/mainThreadTask.js +1 -1
- 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/mainThreadWebviews.js +1 -1
- package/vscode/src/vs/workbench/api/browser/mainThreadWorkspace.d.ts +2 -2
- package/vscode/src/vs/workbench/api/browser/mainThreadWorkspace.js +25 -23
- package/vscode/src/vs/workbench/api/common/shared/tasks.d.ts +1 -0
- package/vscode/src/vs/workbench/contrib/browserView/common/browserEditorInput.d.ts +60 -0
- package/vscode/src/vs/workbench/contrib/browserView/common/browserEditorInput.js +222 -0
- package/vscode/src/vs/workbench/contrib/customEditor/common/customTextEditorModel.js +1 -1
- package/vscode/src/vs/workbench/contrib/git/common/gitService.d.ts +22 -0
- package/vscode/src/vs/workbench/services/extensionManagement/browser/extensionBisect.js +23 -23
- package/vscode/src/vs/workbench/services/extensionManagement/browser/webExtensionsScannerService.js +2 -2
- package/vscode/src/vs/workbench/services/extensions/common/abstractExtensionService.js +12 -12
- package/vscode/src/vs/workbench/services/extensions/common/extensionHostManager.js +1 -1
- package/vscode/src/vs/workbench/services/extensions/common/extensionRunningLocationTracker.js +1 -1
- 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/themes/browser/cssExtensionPoint.js +6 -6
|
@@ -94,25 +94,25 @@ let MainThreadFileSystemEventService = class MainThreadFileSystemEventService {
|
|
|
94
94
|
if (data.extensionNames.length === 1) {
|
|
95
95
|
if (operation === FileOperation.CREATE) {
|
|
96
96
|
message = ( localize(
|
|
97
|
-
|
|
97
|
+
2571,
|
|
98
98
|
"Extension '{0}' wants to make refactoring changes with this file creation",
|
|
99
99
|
data.extensionNames[0]
|
|
100
100
|
));
|
|
101
101
|
} else if (operation === FileOperation.COPY) {
|
|
102
102
|
message = ( localize(
|
|
103
|
-
|
|
103
|
+
2572,
|
|
104
104
|
"Extension '{0}' wants to make refactoring changes with this file copy",
|
|
105
105
|
data.extensionNames[0]
|
|
106
106
|
));
|
|
107
107
|
} else if (operation === FileOperation.MOVE) {
|
|
108
108
|
message = ( localize(
|
|
109
|
-
|
|
109
|
+
2573,
|
|
110
110
|
"Extension '{0}' wants to make refactoring changes with this file move",
|
|
111
111
|
data.extensionNames[0]
|
|
112
112
|
));
|
|
113
113
|
} else {
|
|
114
114
|
message = ( localize(
|
|
115
|
-
|
|
115
|
+
2574,
|
|
116
116
|
"Extension '{0}' wants to make refactoring changes with this file deletion",
|
|
117
117
|
data.extensionNames[0]
|
|
118
118
|
));
|
|
@@ -120,25 +120,25 @@ let MainThreadFileSystemEventService = class MainThreadFileSystemEventService {
|
|
|
120
120
|
} else {
|
|
121
121
|
if (operation === FileOperation.CREATE) {
|
|
122
122
|
message = ( localize(
|
|
123
|
-
|
|
123
|
+
2575,
|
|
124
124
|
"{0} extensions want to make refactoring changes with this file creation",
|
|
125
125
|
data.extensionNames.length
|
|
126
126
|
));
|
|
127
127
|
} else if (operation === FileOperation.COPY) {
|
|
128
128
|
message = ( localize(
|
|
129
|
-
|
|
129
|
+
2576,
|
|
130
130
|
"{0} extensions want to make refactoring changes with this file copy",
|
|
131
131
|
data.extensionNames.length
|
|
132
132
|
));
|
|
133
133
|
} else if (operation === FileOperation.MOVE) {
|
|
134
134
|
message = ( localize(
|
|
135
|
-
|
|
135
|
+
2577,
|
|
136
136
|
"{0} extensions want to make refactoring changes with this file move",
|
|
137
137
|
data.extensionNames.length
|
|
138
138
|
));
|
|
139
139
|
} else {
|
|
140
140
|
message = ( localize(
|
|
141
|
-
|
|
141
|
+
2578,
|
|
142
142
|
"{0} extensions want to make refactoring changes with this file deletion",
|
|
143
143
|
data.extensionNames.length
|
|
144
144
|
));
|
|
@@ -150,8 +150,8 @@ let MainThreadFileSystemEventService = class MainThreadFileSystemEventService {
|
|
|
150
150
|
} = await dialogService.confirm({
|
|
151
151
|
type: Severity.Info,
|
|
152
152
|
message,
|
|
153
|
-
primaryButton: ( localize(
|
|
154
|
-
cancelButton: ( localize(
|
|
153
|
+
primaryButton: ( localize(2579, "Show &&Preview")),
|
|
154
|
+
cancelButton: ( localize(2580, "Skip Changes"))
|
|
155
155
|
});
|
|
156
156
|
showPreview = true;
|
|
157
157
|
if (!confirmed) {
|
|
@@ -171,18 +171,18 @@ let MainThreadFileSystemEventService = class MainThreadFileSystemEventService {
|
|
|
171
171
|
type: Severity.Info,
|
|
172
172
|
message,
|
|
173
173
|
buttons: [{
|
|
174
|
-
label: ( localize(
|
|
174
|
+
label: ( localize(2581, "&&OK")),
|
|
175
175
|
run: () => Choice.OK
|
|
176
176
|
}, {
|
|
177
|
-
label: ( localize(
|
|
177
|
+
label: ( localize(2579, "Show &&Preview")),
|
|
178
178
|
run: () => Choice.Preview
|
|
179
179
|
}],
|
|
180
180
|
cancelButton: {
|
|
181
|
-
label: ( localize(
|
|
181
|
+
label: ( localize(2580, "Skip Changes")),
|
|
182
182
|
run: () => Choice.Cancel
|
|
183
183
|
},
|
|
184
184
|
checkbox: {
|
|
185
|
-
label: ( localize(
|
|
185
|
+
label: ( localize(2582, "Do not ask me again"))
|
|
186
186
|
}
|
|
187
187
|
});
|
|
188
188
|
if (result === Choice.Cancel) {
|
|
@@ -211,15 +211,15 @@ let MainThreadFileSystemEventService = class MainThreadFileSystemEventService {
|
|
|
211
211
|
_progressLabel(operation) {
|
|
212
212
|
switch (operation) {
|
|
213
213
|
case FileOperation.CREATE:
|
|
214
|
-
return localize(
|
|
214
|
+
return localize(2583, "Running 'File Create' participants...");
|
|
215
215
|
case FileOperation.MOVE:
|
|
216
|
-
return localize(
|
|
216
|
+
return localize(2584, "Running 'File Rename' participants...");
|
|
217
217
|
case FileOperation.COPY:
|
|
218
|
-
return localize(
|
|
218
|
+
return localize(2585, "Running 'File Copy' participants...");
|
|
219
219
|
case FileOperation.DELETE:
|
|
220
|
-
return localize(
|
|
220
|
+
return localize(2586, "Running 'File Delete' participants...");
|
|
221
221
|
case FileOperation.WRITE:
|
|
222
|
-
return localize(
|
|
222
|
+
return localize(2587, "Running 'File Write' participants...");
|
|
223
223
|
}
|
|
224
224
|
}
|
|
225
225
|
})();
|
|
@@ -307,7 +307,7 @@ registerAction2(class ResetMemento extends Action2 {
|
|
|
307
307
|
super({
|
|
308
308
|
id: "files.participants.resetChoice",
|
|
309
309
|
title: {
|
|
310
|
-
value: ( localize(
|
|
310
|
+
value: ( localize(2588, "Reset choice for 'File operation needs preview'")),
|
|
311
311
|
original: `Reset choice for 'File operation needs preview'`
|
|
312
312
|
},
|
|
313
313
|
f1: true
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { CancellationToken } from "@codingame/monaco-vscode-api/vscode/vs/base/common/cancellation";
|
|
2
2
|
import { Disposable } from "@codingame/monaco-vscode-api/vscode/vs/base/common/lifecycle";
|
|
3
3
|
import { URI } from "@codingame/monaco-vscode-api/vscode/vs/base/common/uri";
|
|
4
|
-
import { IGitExtensionDelegate, GitRef, GitRefQuery, IGitRepository } from "../../contrib/git/common/gitService.js";
|
|
4
|
+
import { IGitExtensionDelegate, GitRef, GitRefQuery, GitDiffChange, IGitRepository } from "../../contrib/git/common/gitService.js";
|
|
5
5
|
import { IGitService } from "@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/git/common/gitService.service";
|
|
6
6
|
import { IExtHostContext } from "../../services/extensions/common/extHostCustomers.js";
|
|
7
7
|
import { MainThreadGitExtensionShape } from "@codingame/monaco-vscode-api/vscode/vs/workbench/api/common/extHost.protocol";
|
|
@@ -17,5 +17,7 @@ export declare class MainThreadGitExtensionService extends Disposable implements
|
|
|
17
17
|
private _getRepositoryByUri;
|
|
18
18
|
openRepository(uri: URI): Promise<IGitRepository | undefined>;
|
|
19
19
|
getRefs(root: URI, query: GitRefQuery, token?: CancellationToken): Promise<GitRef[]>;
|
|
20
|
+
diffBetweenWithStats(root: URI, ref1: string, ref2: string, path?: string): Promise<GitDiffChange[]>;
|
|
21
|
+
diffBetweenWithStats2(root: URI, ref: string, path?: string): Promise<GitDiffChange[]>;
|
|
20
22
|
$onDidChangeRepository(handle: number): Promise<void>;
|
|
21
23
|
}
|
|
@@ -22,6 +22,15 @@ function toGitRefType(type) {
|
|
|
22
22
|
throw ( new Error(`Unknown GitRefType: ${type}`));
|
|
23
23
|
}
|
|
24
24
|
}
|
|
25
|
+
function toGitDiffChange(dto) {
|
|
26
|
+
return {
|
|
27
|
+
uri: URI.revive(dto.uri),
|
|
28
|
+
originalUri: dto.originalUri ? URI.revive(dto.originalUri) : undefined,
|
|
29
|
+
modifiedUri: dto.modifiedUri ? URI.revive(dto.modifiedUri) : undefined,
|
|
30
|
+
insertions: dto.insertions,
|
|
31
|
+
deletions: dto.deletions
|
|
32
|
+
};
|
|
33
|
+
}
|
|
25
34
|
function toGitRepositoryState(dto) {
|
|
26
35
|
return {
|
|
27
36
|
HEAD: dto?.HEAD ? {
|
|
@@ -29,10 +38,31 @@ function toGitRepositoryState(dto) {
|
|
|
29
38
|
name: dto.HEAD.name,
|
|
30
39
|
commit: dto.HEAD.commit,
|
|
31
40
|
remote: dto.HEAD.remote,
|
|
41
|
+
base: dto.HEAD.base,
|
|
32
42
|
upstream: dto.HEAD.upstream,
|
|
33
43
|
ahead: dto.HEAD.ahead,
|
|
34
44
|
behind: dto.HEAD.behind
|
|
35
|
-
} : undefined
|
|
45
|
+
} : undefined,
|
|
46
|
+
mergeChanges: dto?.mergeChanges?.map(c => ({
|
|
47
|
+
uri: URI.revive(c.uri),
|
|
48
|
+
originalUri: c.originalUri ? URI.revive(c.originalUri) : undefined,
|
|
49
|
+
modifiedUri: c.modifiedUri ? URI.revive(c.modifiedUri) : undefined
|
|
50
|
+
})) ?? [],
|
|
51
|
+
indexChanges: dto?.indexChanges?.map(c => ({
|
|
52
|
+
uri: URI.revive(c.uri),
|
|
53
|
+
originalUri: c.originalUri ? URI.revive(c.originalUri) : undefined,
|
|
54
|
+
modifiedUri: c.modifiedUri ? URI.revive(c.modifiedUri) : undefined
|
|
55
|
+
})) ?? [],
|
|
56
|
+
workingTreeChanges: dto?.workingTreeChanges?.map(c => ({
|
|
57
|
+
uri: URI.revive(c.uri),
|
|
58
|
+
originalUri: c.originalUri ? URI.revive(c.originalUri) : undefined,
|
|
59
|
+
modifiedUri: c.modifiedUri ? URI.revive(c.modifiedUri) : undefined
|
|
60
|
+
})) ?? [],
|
|
61
|
+
untrackedChanges: dto?.untrackedChanges?.map(c => ({
|
|
62
|
+
uri: URI.revive(c.uri),
|
|
63
|
+
originalUri: c.originalUri ? URI.revive(c.originalUri) : undefined,
|
|
64
|
+
modifiedUri: c.modifiedUri ? URI.revive(c.modifiedUri) : undefined
|
|
65
|
+
})) ?? []
|
|
36
66
|
};
|
|
37
67
|
}
|
|
38
68
|
let MainThreadGitExtensionService = class MainThreadGitExtensionService extends Disposable {
|
|
@@ -94,6 +124,22 @@ let MainThreadGitExtensionService = class MainThreadGitExtensionService extends
|
|
|
94
124
|
type: toGitRefType(ref.type)
|
|
95
125
|
})));
|
|
96
126
|
}
|
|
127
|
+
async diffBetweenWithStats(root, ref1, ref2, path) {
|
|
128
|
+
const handle = this._repositoryHandles.get(root);
|
|
129
|
+
if (handle === undefined) {
|
|
130
|
+
return [];
|
|
131
|
+
}
|
|
132
|
+
const result = await this._proxy.$diffBetweenWithStats(handle, ref1, ref2, path);
|
|
133
|
+
return ( result.map(toGitDiffChange));
|
|
134
|
+
}
|
|
135
|
+
async diffBetweenWithStats2(root, ref, path) {
|
|
136
|
+
const handle = this._repositoryHandles.get(root);
|
|
137
|
+
if (handle === undefined) {
|
|
138
|
+
return [];
|
|
139
|
+
}
|
|
140
|
+
const result = await this._proxy.$diffBetweenWithStats2(handle, ref, path);
|
|
141
|
+
return ( result.map(toGitDiffChange));
|
|
142
|
+
}
|
|
97
143
|
async $onDidChangeRepository(handle) {
|
|
98
144
|
const repository = this._repositories.get(handle);
|
|
99
145
|
if (!repository) {
|
|
@@ -2,6 +2,7 @@ import { CancellationToken } from "@codingame/monaco-vscode-api/vscode/vs/base/c
|
|
|
2
2
|
import { Disposable } from "@codingame/monaco-vscode-api/vscode/vs/base/common/lifecycle";
|
|
3
3
|
import { ExtensionIdentifier } from "@codingame/monaco-vscode-api/vscode/vs/platform/extensions/common/extensions";
|
|
4
4
|
import { ILogService } from "@codingame/monaco-vscode-api/vscode/vs/platform/log/common/log.service";
|
|
5
|
+
import { IProductService } from "@codingame/monaco-vscode-api/vscode/vs/platform/product/common/productService.service";
|
|
5
6
|
import { IToolInvocation, IToolProgressStep, IToolResult } from "@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/tools/languageModelToolsService";
|
|
6
7
|
import { ILanguageModelToolsService } from "@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/tools/languageModelToolsService.service";
|
|
7
8
|
import { IExtHostContext } from "../../services/extensions/common/extHostCustomers.js";
|
|
@@ -10,10 +11,11 @@ import { IToolDataDto, IToolDefinitionDto, MainThreadLanguageModelToolsShape } f
|
|
|
10
11
|
export declare class MainThreadLanguageModelTools extends Disposable implements MainThreadLanguageModelToolsShape {
|
|
11
12
|
private readonly _languageModelToolsService;
|
|
12
13
|
private readonly _logService;
|
|
14
|
+
private readonly _productService;
|
|
13
15
|
private readonly _proxy;
|
|
14
16
|
private readonly _tools;
|
|
15
17
|
private readonly _runningToolCalls;
|
|
16
|
-
constructor(extHostContext: IExtHostContext, _languageModelToolsService: ILanguageModelToolsService, _logService: ILogService);
|
|
18
|
+
constructor(extHostContext: IExtHostContext, _languageModelToolsService: ILanguageModelToolsService, _logService: ILogService, _productService: IProductService);
|
|
17
19
|
private getToolDtos;
|
|
18
20
|
$getTools(): Promise<IToolDataDto[]>;
|
|
19
21
|
$invokeTool(dto: Dto<IToolInvocation>, token?: CancellationToken): Promise<Dto<IToolResult> | SerializableObjectWithBuffers<Dto<IToolResult>>>;
|
|
@@ -5,19 +5,22 @@ import { Disposable, DisposableMap, DisposableStore } from '@codingame/monaco-vs
|
|
|
5
5
|
import { revive } from '@codingame/monaco-vscode-api/vscode/vs/base/common/marshalling';
|
|
6
6
|
import { ThemeIcon } from '@codingame/monaco-vscode-api/vscode/vs/base/common/themables';
|
|
7
7
|
import { isUriComponents, URI } from '@codingame/monaco-vscode-api/vscode/vs/base/common/uri';
|
|
8
|
+
import { ExtensionIdentifier } from '@codingame/monaco-vscode-api/vscode/vs/platform/extensions/common/extensions';
|
|
8
9
|
import { ILogService } from '@codingame/monaco-vscode-api/vscode/vs/platform/log/common/log.service';
|
|
10
|
+
import { IProductService } from '@codingame/monaco-vscode-api/vscode/vs/platform/product/common/productService.service';
|
|
9
11
|
import { toToolSetKey } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/tools/languageModelToolsContribution';
|
|
10
|
-
import { toolResultHasBuffers, ToolSet } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/tools/languageModelToolsService';
|
|
12
|
+
import { toolResultHasBuffers, ToolDataSource, ToolSet } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/tools/languageModelToolsService';
|
|
11
13
|
import { ILanguageModelToolsService } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/tools/languageModelToolsService.service';
|
|
12
14
|
import { extHostNamedCustomer } from '../../services/extensions/common/extHostCustomers.js';
|
|
13
15
|
import { SerializableObjectWithBuffers } from '@codingame/monaco-vscode-api/vscode/vs/workbench/services/extensions/common/proxyIdentifier';
|
|
14
16
|
import { ExtHostContext, MainContext } from '@codingame/monaco-vscode-api/vscode/vs/workbench/api/common/extHost.protocol';
|
|
15
17
|
|
|
16
18
|
let MainThreadLanguageModelTools = class MainThreadLanguageModelTools extends Disposable {
|
|
17
|
-
constructor(extHostContext, _languageModelToolsService, _logService) {
|
|
19
|
+
constructor(extHostContext, _languageModelToolsService, _logService, _productService) {
|
|
18
20
|
super();
|
|
19
21
|
this._languageModelToolsService = _languageModelToolsService;
|
|
20
22
|
this._logService = _logService;
|
|
23
|
+
this._productService = _productService;
|
|
21
24
|
this._tools = this._register(( new DisposableMap()));
|
|
22
25
|
this._runningToolCalls = ( new Map());
|
|
23
26
|
this._proxy = ( extHostContext.getProxy(ExtHostContext.ExtHostLanguageModelTools));
|
|
@@ -101,7 +104,8 @@ let MainThreadLanguageModelTools = class MainThreadLanguageModelTools extends Di
|
|
|
101
104
|
};
|
|
102
105
|
}
|
|
103
106
|
}
|
|
104
|
-
const
|
|
107
|
+
const isBuiltinTool = this._productService.defaultChatAgent?.chatExtensionId ? ExtensionIdentifier.equals(extensionId, this._productService.defaultChatAgent.chatExtensionId) : false;
|
|
108
|
+
const source = isBuiltinTool ? ToolDataSource.Internal : revive(definition.source);
|
|
105
109
|
const toolData = {
|
|
106
110
|
id: definition.id,
|
|
107
111
|
displayName: definition.displayName,
|
|
@@ -154,7 +158,8 @@ let MainThreadLanguageModelTools = class MainThreadLanguageModelTools extends Di
|
|
|
154
158
|
MainThreadLanguageModelTools = __decorate([
|
|
155
159
|
extHostNamedCustomer(MainContext.MainThreadLanguageModelTools),
|
|
156
160
|
( __param(1, ILanguageModelToolsService)),
|
|
157
|
-
( __param(2, ILogService))
|
|
161
|
+
( __param(2, ILogService)),
|
|
162
|
+
( __param(3, IProductService))
|
|
158
163
|
], MainThreadLanguageModelTools);
|
|
159
164
|
|
|
160
165
|
export { MainThreadLanguageModelTools };
|
|
@@ -178,7 +178,7 @@ let MainThreadLanguageModels = class MainThreadLanguageModels {
|
|
|
178
178
|
if (this._authenticationService.getProviderIds().includes(authProviderId)) {
|
|
179
179
|
return Disposable.None;
|
|
180
180
|
}
|
|
181
|
-
const accountLabel = auth.accountLabel ?? ( localize(
|
|
181
|
+
const accountLabel = auth.accountLabel ?? ( localize(2589, "Language Models"));
|
|
182
182
|
const disposables = ( new DisposableStore());
|
|
183
183
|
const provider = ( new LanguageModelAccessAuthProvider(authProviderId, auth.providerLabel, accountLabel));
|
|
184
184
|
this._authenticationService.registerAuthenticationProvider(authProviderId, provider);
|
|
@@ -261,7 +261,7 @@ class LanguageModelAccessAuthProvider {
|
|
|
261
261
|
}
|
|
262
262
|
confirmation(extensionName, _recreatingSession) {
|
|
263
263
|
return localize(
|
|
264
|
-
|
|
264
|
+
2590,
|
|
265
265
|
"The extension '{0}' wants to access the language models provided by {1}.",
|
|
266
266
|
extensionName,
|
|
267
267
|
this.label
|
|
@@ -49,7 +49,10 @@ export declare class MainThreadMcp extends Disposable implements MainThreadMcpSh
|
|
|
49
49
|
private _onDidChangeAuthSessions;
|
|
50
50
|
$logMcpAuthSetup(data: IAuthMetadataSource): void;
|
|
51
51
|
$startMcpGateway(): Promise<{
|
|
52
|
-
|
|
52
|
+
servers: {
|
|
53
|
+
label: string;
|
|
54
|
+
address: URI;
|
|
55
|
+
}[];
|
|
53
56
|
gatewayId: string;
|
|
54
57
|
} | undefined>;
|
|
55
58
|
$disposeMcpGateway(gatewayId: string): void;
|
|
@@ -327,9 +327,9 @@ let MainThreadMcp = class MainThreadMcp extends Disposable {
|
|
|
327
327
|
}
|
|
328
328
|
async continueWithIncorrectAccountPrompt(chosenAccountLabel, requestedAccountLabel) {
|
|
329
329
|
const result = await this.dialogService.prompt({
|
|
330
|
-
message: ( localize(
|
|
330
|
+
message: ( localize(2591, "Incorrect account detected")),
|
|
331
331
|
detail: ( localize(
|
|
332
|
-
|
|
332
|
+
2592,
|
|
333
333
|
"The chosen account, {0}, does not match the requested account, {1}.",
|
|
334
334
|
chosenAccountLabel,
|
|
335
335
|
requestedAccountLabel
|
|
@@ -337,10 +337,10 @@ let MainThreadMcp = class MainThreadMcp extends Disposable {
|
|
|
337
337
|
type: Severity.Warning,
|
|
338
338
|
cancelButton: true,
|
|
339
339
|
buttons: [{
|
|
340
|
-
label: ( localize(
|
|
340
|
+
label: ( localize(2593, "Keep {0}", chosenAccountLabel)),
|
|
341
341
|
run: () => chosenAccountLabel
|
|
342
342
|
}, {
|
|
343
|
-
label: ( localize(
|
|
343
|
+
label: ( localize(2594, "Login with {0}", requestedAccountLabel)),
|
|
344
344
|
run: () => requestedAccountLabel
|
|
345
345
|
}]
|
|
346
346
|
});
|
|
@@ -372,7 +372,7 @@ let MainThreadMcp = class MainThreadMcp extends Disposable {
|
|
|
372
372
|
} catch (e) {
|
|
373
373
|
if (UserInteractionRequiredError.is(e)) {
|
|
374
374
|
server.pushLog(LogLevel.Warning, ( localize(
|
|
375
|
-
|
|
375
|
+
2595,
|
|
376
376
|
"Authentication session for {0} removed, stopping server",
|
|
377
377
|
providerLabel
|
|
378
378
|
)));
|
|
@@ -394,9 +394,20 @@ let MainThreadMcp = class MainThreadMcp extends Disposable {
|
|
|
394
394
|
return undefined;
|
|
395
395
|
}
|
|
396
396
|
const gatewayId = generateUuid();
|
|
397
|
-
|
|
397
|
+
const store = ( new DisposableStore());
|
|
398
|
+
store.add(result);
|
|
399
|
+
store.add(result.onDidChangeServers(servers => {
|
|
400
|
+
this._proxy.$onDidChangeGatewayServers(gatewayId, ( servers.map(s => ({
|
|
401
|
+
label: s.label,
|
|
402
|
+
address: s.address
|
|
403
|
+
}))));
|
|
404
|
+
}));
|
|
405
|
+
this._gateways.set(gatewayId, store);
|
|
398
406
|
return {
|
|
399
|
-
|
|
407
|
+
servers: ( result.servers.map(s => ({
|
|
408
|
+
label: s.label,
|
|
409
|
+
address: s.address
|
|
410
|
+
}))),
|
|
400
411
|
gatewayId
|
|
401
412
|
};
|
|
402
413
|
}
|
|
@@ -405,18 +416,18 @@ let MainThreadMcp = class MainThreadMcp extends Disposable {
|
|
|
405
416
|
}
|
|
406
417
|
async loginPrompt(mcpLabel, providerLabel, recreatingSession) {
|
|
407
418
|
const message = recreatingSession ? ( localize(
|
|
408
|
-
|
|
419
|
+
2596,
|
|
409
420
|
"The MCP Server Definition '{0}' wants you to authenticate to {1}.",
|
|
410
421
|
mcpLabel,
|
|
411
422
|
providerLabel
|
|
412
423
|
)) : ( localize(
|
|
413
|
-
|
|
424
|
+
2597,
|
|
414
425
|
"The MCP Server Definition '{0}' wants to authenticate to {1}.",
|
|
415
426
|
mcpLabel,
|
|
416
427
|
providerLabel
|
|
417
428
|
));
|
|
418
429
|
const buttons = [{
|
|
419
|
-
label: ( localize(
|
|
430
|
+
label: ( localize(2598, "&&Allow")),
|
|
420
431
|
run() {
|
|
421
432
|
return true;
|
|
422
433
|
}
|
|
@@ -66,13 +66,13 @@ let MainThreadMessageService = class MainThreadMessageService {
|
|
|
66
66
|
sourceIsUrgent = MainThreadMessageService_1.URGENT_NOTIFICATION_SOURCES.includes(source.id);
|
|
67
67
|
}
|
|
68
68
|
if (!source) {
|
|
69
|
-
source = ( localize(
|
|
69
|
+
source = ( localize(2599, "Extension"));
|
|
70
70
|
}
|
|
71
71
|
const secondaryActions = [];
|
|
72
72
|
if (options.source) {
|
|
73
73
|
secondaryActions.push(toAction({
|
|
74
74
|
id: options.source.identifier.value,
|
|
75
|
-
label: ( localize(
|
|
75
|
+
label: ( localize(2600, "Manage Extension")),
|
|
76
76
|
run: () => {
|
|
77
77
|
return this._commandService.executeCommand("_extensions.manage", options.source.identifier.value);
|
|
78
78
|
}
|
|
@@ -111,12 +111,12 @@ let MainThreadMessageService = class MainThreadMessageService {
|
|
|
111
111
|
if (!cancelButton) {
|
|
112
112
|
if (buttons.length > 0) {
|
|
113
113
|
cancelButton = {
|
|
114
|
-
label: ( localize(
|
|
114
|
+
label: ( localize(2601, "Cancel")),
|
|
115
115
|
run: () => undefined
|
|
116
116
|
};
|
|
117
117
|
} else {
|
|
118
118
|
cancelButton = {
|
|
119
|
-
label: ( localize(
|
|
119
|
+
label: ( localize(2602, "&&OK")),
|
|
120
120
|
run: () => undefined
|
|
121
121
|
};
|
|
122
122
|
}
|
|
@@ -18,7 +18,7 @@ class ExtHostNotebookDocumentSaveParticipant {
|
|
|
18
18
|
}
|
|
19
19
|
let _warningTimeout;
|
|
20
20
|
const p = ( new Promise((resolve, reject) => {
|
|
21
|
-
_warningTimeout = setTimeout(() => reject(( new Error(( localize(
|
|
21
|
+
_warningTimeout = setTimeout(() => reject(( new Error(( localize(2603, "Aborted onWillSaveNotebookDocument-event after 1750ms"))))), 1750);
|
|
22
22
|
this._proxy.$participateInSave(workingCopy.resource, context.reason, token).then(_ => {
|
|
23
23
|
clearTimeout(_warningTimeout);
|
|
24
24
|
return undefined;
|
|
@@ -94,11 +94,11 @@ let MainThreadOutputService = class MainThreadOutputService extends Disposable {
|
|
|
94
94
|
}
|
|
95
95
|
_showChannelQuietly(channel) {
|
|
96
96
|
const statusProperties = {
|
|
97
|
-
name: ( localize(
|
|
97
|
+
name: ( localize(2604, "Show Output")),
|
|
98
98
|
text: "$(output)",
|
|
99
|
-
ariaLabel: ( localize(
|
|
99
|
+
ariaLabel: ( localize(2605, "Show {0} Output Channel", channel.label)),
|
|
100
100
|
command: `workbench.action.output.show.${channel.id}`,
|
|
101
|
-
tooltip: ( localize(
|
|
101
|
+
tooltip: ( localize(2606, "Show {0} Output Channel", channel.label)),
|
|
102
102
|
kind: "prominent"
|
|
103
103
|
};
|
|
104
104
|
if (!this._outputStatusItem.value) {
|
|
@@ -38,7 +38,7 @@ let MainThreadProgress = class MainThreadProgress {
|
|
|
38
38
|
location: ProgressLocation.Notification,
|
|
39
39
|
secondaryActions: [toAction({
|
|
40
40
|
id: extensionId,
|
|
41
|
-
label: ( localize(
|
|
41
|
+
label: ( localize(2607, "Manage Extension")),
|
|
42
42
|
run: () => this._commandService.executeCommand("_extensions.manage", extensionId)
|
|
43
43
|
})]
|
|
44
44
|
};
|
|
@@ -17,7 +17,7 @@ class ExtHostSaveParticipant {
|
|
|
17
17
|
return undefined;
|
|
18
18
|
}
|
|
19
19
|
const p = ( new Promise((resolve, reject) => {
|
|
20
|
-
setTimeout(() => reject(( new Error(( localize(
|
|
20
|
+
setTimeout(() => reject(( new Error(( localize(2608, "Aborted onWillSaveTextDocument-event after 1750ms"))))), 1750);
|
|
21
21
|
this._proxy.$participateInSave(editorModel.resource, context.reason).then(values => {
|
|
22
22
|
if (!values.every(success => success)) {
|
|
23
23
|
return Promise.reject(( new Error("listener failed")));
|
|
@@ -397,7 +397,7 @@ var TaskDTO;
|
|
|
397
397
|
}
|
|
398
398
|
command.presentation = TaskPresentationOptionsDTO.to(task.presentationOptions);
|
|
399
399
|
const source = TaskSourceDTO.to(task.source, workspace);
|
|
400
|
-
const label = ( localize(
|
|
400
|
+
const label = ( localize(2609, "{0}: {1}", source.label, task.name));
|
|
401
401
|
const definition = TaskDefinitionDTO.to(task.definition, executeOnly);
|
|
402
402
|
const id = (CustomExecutionDTO.is(task.execution) && task._id) ? task._id : `${task.source.extensionId}.${definition._key}`;
|
|
403
403
|
const result = ( new ContributedTask(
|
|
@@ -116,13 +116,13 @@ let MainThreadTunnelService = class MainThreadTunnelService extends Disposable {
|
|
|
116
116
|
}
|
|
117
117
|
async elevationPrompt(tunnelOptions, tunnel, source) {
|
|
118
118
|
return this.notificationService.prompt(Severity.Info, ( localize(
|
|
119
|
-
|
|
119
|
+
2610,
|
|
120
120
|
"The extension {0} has forwarded port {1}. You'll need to run as superuser to use port {2} locally.",
|
|
121
121
|
source,
|
|
122
122
|
tunnelOptions.remoteAddress.port,
|
|
123
123
|
tunnelOptions.localAddressPort
|
|
124
124
|
)), [{
|
|
125
|
-
label: ( localize(
|
|
125
|
+
label: ( localize(2611, "Use Port {0} as Sudo...", tunnel.tunnelRemotePort)),
|
|
126
126
|
run: async () => {
|
|
127
127
|
this.elevateionRetry = true;
|
|
128
128
|
await this.remoteExplorerService.close({
|
|
@@ -61,7 +61,7 @@ let MainThreadUriOpeners = class MainThreadUriOpeners extends Disposable {
|
|
|
61
61
|
}, token);
|
|
62
62
|
} catch (e) {
|
|
63
63
|
if (!isCancellationError(e)) {
|
|
64
|
-
const openDefaultAction = ( new Action("default", ( localize(
|
|
64
|
+
const openDefaultAction = ( new Action("default", ( localize(2612, "Open using default opener")), undefined, undefined, async () => {
|
|
65
65
|
await this.openerService.open(uri, {
|
|
66
66
|
allowTunneling: false,
|
|
67
67
|
allowContributedOpeners: defaultExternalUriOpenerId
|
|
@@ -70,7 +70,7 @@ let MainThreadUriOpeners = class MainThreadUriOpeners extends Disposable {
|
|
|
70
70
|
openDefaultAction.tooltip = ( uri.toString());
|
|
71
71
|
this.notificationService.notify({
|
|
72
72
|
severity: Severity.Error,
|
|
73
|
-
message: ( localize(
|
|
73
|
+
message: ( localize(2613, "Could not open uri with '{0}': {1}", id, (e.toString()))),
|
|
74
74
|
actions: {
|
|
75
75
|
primary: [openDefaultAction]
|
|
76
76
|
}
|
|
@@ -118,7 +118,7 @@ let MainThreadWebviews = class MainThreadWebviews extends Disposable {
|
|
|
118
118
|
<meta http-equiv="Content-type" content="text/html;charset=UTF-8">
|
|
119
119
|
<meta http-equiv="Content-Security-Policy" content="default-src 'none';">
|
|
120
120
|
</head>
|
|
121
|
-
<body>${( localize(
|
|
121
|
+
<body>${( localize(2614, "An error occurred while loading view: {0}", escape(viewType)))}</body>
|
|
122
122
|
</html>`;
|
|
123
123
|
}
|
|
124
124
|
};
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { CancellationToken } from "@codingame/monaco-vscode-api/vscode/vs/base/common/cancellation";
|
|
2
|
+
import { Disposable } from "@codingame/monaco-vscode-api/vscode/vs/base/common/lifecycle";
|
|
2
3
|
import { UriComponents } from "@codingame/monaco-vscode-api/vscode/vs/base/common/uri";
|
|
3
4
|
import { IEnvironmentService } from "@codingame/monaco-vscode-api/vscode/vs/platform/environment/common/environment.service";
|
|
4
5
|
import { IFileService } from "@codingame/monaco-vscode-api/vscode/vs/platform/files/common/files.service";
|
|
@@ -21,7 +22,7 @@ import { ITextSearchComplete, MainThreadWorkspaceShape, ResourceTrustRequestOpti
|
|
|
21
22
|
import { IEditSessionIdentityService } from "@codingame/monaco-vscode-api/vscode/vs/platform/workspace/common/editSessions.service";
|
|
22
23
|
import { ICanonicalUriService } from "@codingame/monaco-vscode-api/vscode/vs/platform/workspace/common/canonicalUri.service";
|
|
23
24
|
import { ITextFileService } from "@codingame/monaco-vscode-api/vscode/vs/workbench/services/textfile/common/textfiles.service";
|
|
24
|
-
export declare class MainThreadWorkspace implements MainThreadWorkspaceShape {
|
|
25
|
+
export declare class MainThreadWorkspace extends Disposable implements MainThreadWorkspaceShape {
|
|
25
26
|
private readonly _searchService;
|
|
26
27
|
private readonly _contextService;
|
|
27
28
|
private readonly _editSessionIdentityService;
|
|
@@ -36,7 +37,6 @@ export declare class MainThreadWorkspace implements MainThreadWorkspaceShape {
|
|
|
36
37
|
private readonly _workspaceTrustManagementService;
|
|
37
38
|
private readonly _workspaceTrustRequestService;
|
|
38
39
|
private readonly _textFileService;
|
|
39
|
-
private readonly _toDispose;
|
|
40
40
|
private readonly _activeCancelTokens;
|
|
41
41
|
private readonly _proxy;
|
|
42
42
|
private readonly _queryBuilder;
|