@codingame/monaco-vscode-xterm-addons-common 24.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (26) hide show
  1. package/empty.js +1 -0
  2. package/package.json +51 -0
  3. package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatContext.d.ts +25 -0
  4. package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatContext.js +315 -0
  5. package/vscode/src/vs/workbench/contrib/chat/browser/chatPasteProviders.d.ts +49 -0
  6. package/vscode/src/vs/workbench/contrib/chat/browser/chatPasteProviders.js +379 -0
  7. package/vscode/src/vs/workbench/contrib/chat/browser/promptSyntax/attachInstructionsAction.d.ts +17 -0
  8. package/vscode/src/vs/workbench/contrib/chat/browser/promptSyntax/attachInstructionsAction.js +101 -0
  9. package/vscode/src/vs/workbench/contrib/chat/browser/promptSyntax/newPromptFileActions.d.ts +4 -0
  10. package/vscode/src/vs/workbench/contrib/chat/browser/promptSyntax/newPromptFileActions.js +201 -0
  11. package/vscode/src/vs/workbench/contrib/chat/browser/promptSyntax/pickers/askForPromptName.d.ts +7 -0
  12. package/vscode/src/vs/workbench/contrib/chat/browser/promptSyntax/pickers/askForPromptName.js +79 -0
  13. package/vscode/src/vs/workbench/contrib/chat/browser/promptSyntax/pickers/askForPromptSourceFolder.d.ts +8 -0
  14. package/vscode/src/vs/workbench/contrib/chat/browser/promptSyntax/pickers/askForPromptSourceFolder.js +145 -0
  15. package/vscode/src/vs/workbench/contrib/chat/browser/promptSyntax/pickers/promptFilePickers.d.ts +73 -0
  16. package/vscode/src/vs/workbench/contrib/chat/browser/promptSyntax/pickers/promptFilePickers.js +468 -0
  17. package/vscode/src/vs/workbench/contrib/terminal/browser/terminalUri.d.ts +18 -0
  18. package/vscode/src/vs/workbench/contrib/terminal/browser/terminalUri.js +48 -0
  19. package/vscode/src/vs/workbench/contrib/terminal/browser/xterm/decorationAddon.d.ts +80 -0
  20. package/vscode/src/vs/workbench/contrib/terminal/browser/xterm/decorationAddon.js +583 -0
  21. package/vscode/src/vs/workbench/contrib/terminal/browser/xterm/markNavigationAddon.d.ts +64 -0
  22. package/vscode/src/vs/workbench/contrib/terminal/browser/xterm/markNavigationAddon.js +582 -0
  23. package/vscode/src/vs/workbench/contrib/terminal/browser/xterm/xtermAddonImporter.d.ts +25 -0
  24. package/vscode/src/vs/workbench/contrib/terminal/browser/xterm/xtermAddonImporter.js +43 -0
  25. package/vscode/src/vs/workbench/contrib/terminal/browser/xterm/xtermTerminal.d.ts +187 -0
  26. package/vscode/src/vs/workbench/contrib/terminal/browser/xterm/xtermTerminal.js +867 -0
package/empty.js ADDED
@@ -0,0 +1 @@
1
+ export {}
package/package.json ADDED
@@ -0,0 +1,51 @@
1
+ {
2
+ "name": "@codingame/monaco-vscode-xterm-addons-common",
3
+ "version": "24.1.0",
4
+ "private": false,
5
+ "description": "VSCode public API plugged on the monaco editor - common package depending on xterm addons",
6
+ "keywords": [],
7
+ "author": {
8
+ "name": "CodinGame",
9
+ "url": "http://www.codingame.com"
10
+ },
11
+ "license": "MIT",
12
+ "repository": {
13
+ "type": "git",
14
+ "url": "git+ssh://git@github.com/CodinGame/monaco-vscode-api.git"
15
+ },
16
+ "type": "module",
17
+ "dependencies": {
18
+ "@codingame/monaco-vscode-api": "24.1.0",
19
+ "@xterm/addon-clipboard": "0.2.0-beta.120",
20
+ "@xterm/addon-image": "0.9.0-beta.137",
21
+ "@xterm/addon-ligatures": "0.10.0-beta.137",
22
+ "@xterm/addon-progress": "0.2.0-beta.43",
23
+ "@xterm/addon-search": "0.16.0-beta.137",
24
+ "@xterm/addon-serialize": "0.14.0-beta.137",
25
+ "@xterm/addon-unicode11": "0.9.0-beta.137",
26
+ "@xterm/addon-webgl": "0.19.0-beta.137"
27
+ },
28
+ "exports": {
29
+ ".": {
30
+ "default": "./empty.js"
31
+ },
32
+ "./vscode/*.css": {
33
+ "default": "./vscode/src/*.css"
34
+ },
35
+ "./vscode/*": {
36
+ "types": "./vscode/src/*.d.ts",
37
+ "default": "./vscode/src/*.js"
38
+ },
39
+ "./*": {
40
+ "types": "./*.d.ts",
41
+ "default": "./*.js"
42
+ }
43
+ },
44
+ "typesVersions": {
45
+ "*": {
46
+ "vscode/*": [
47
+ "./vscode/src/*.d.ts"
48
+ ]
49
+ }
50
+ }
51
+ }
@@ -0,0 +1,25 @@
1
+ import { Disposable } from "@codingame/monaco-vscode-api/vscode/vs/base/common/lifecycle";
2
+ import { ThemeIcon } from "@codingame/monaco-vscode-api/vscode/vs/base/common/themables";
3
+ import { IInstantiationService } from "@codingame/monaco-vscode-api/vscode/vs/platform/instantiation/common/instantiation";
4
+ import { IWorkbenchContribution } from "@codingame/monaco-vscode-api/vscode/vs/workbench/common/contributions";
5
+ import { IChatContextValueItem } from "@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/browser/chatContextPickService";
6
+ import { IChatContextPickService } from "@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/browser/chatContextPickService.service";
7
+ import { IChatRequestVariableEntry } from "@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/chatVariableEntries";
8
+ import { IChatWidget } from "@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/browser/chat";
9
+ import { ITerminalService } from "@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/terminal/browser/terminal.service";
10
+ import { URI } from "@codingame/monaco-vscode-api/vscode/vs/base/common/uri";
11
+ export declare class ChatContextContributions extends Disposable implements IWorkbenchContribution {
12
+ static readonly ID = "chat.contextContributions";
13
+ constructor(instantiationService: IInstantiationService, contextPickService: IChatContextPickService);
14
+ }
15
+ export declare class TerminalContext implements IChatContextValueItem {
16
+ private readonly _resource;
17
+ private readonly _terminalService;
18
+ readonly type = "valuePick";
19
+ readonly icon: ThemeIcon;
20
+ readonly label: string;
21
+ constructor(_resource: URI, _terminalService: ITerminalService);
22
+ isEnabled(widget: IChatWidget): boolean;
23
+ asAttachment(widget: IChatWidget): Promise<IChatRequestVariableEntry | undefined>;
24
+ private asValue;
25
+ }
@@ -0,0 +1,315 @@
1
+
2
+ import { __decorate, __param } from '@codingame/monaco-vscode-api/external/tslib/tslib.es6';
3
+ import { CancellationToken } from '@codingame/monaco-vscode-api/vscode/vs/base/common/cancellation';
4
+ import { Codicon } from '@codingame/monaco-vscode-api/vscode/vs/base/common/codicons';
5
+ import { Disposable, DisposableStore } from '@codingame/monaco-vscode-api/vscode/vs/base/common/lifecycle';
6
+ import { isElectron } from '@codingame/monaco-vscode-api/vscode/vs/base/common/platform';
7
+ import { dirname } from '@codingame/monaco-vscode-api/vscode/vs/base/common/resources';
8
+ import { localize } from '@codingame/monaco-vscode-api/vscode/vs/nls';
9
+ import { IClipboardService } from '@codingame/monaco-vscode-api/vscode/vs/platform/clipboard/common/clipboardService.service';
10
+ import { IInstantiationService } from '@codingame/monaco-vscode-api/vscode/vs/platform/instantiation/common/instantiation';
11
+ import { ILabelService } from '@codingame/monaco-vscode-api/vscode/vs/platform/label/common/label.service';
12
+ import { EditorResourceAccessor, SideBySideEditor } from '@codingame/monaco-vscode-api/vscode/vs/workbench/common/editor';
13
+ import { DiffEditorInput } from '@codingame/monaco-vscode-api/vscode/vs/workbench/common/editor/diffEditorInput';
14
+ import { IEditorService } from '@codingame/monaco-vscode-api/vscode/vs/workbench/services/editor/common/editorService.service';
15
+ import { IHostService } from '@codingame/monaco-vscode-api/vscode/vs/workbench/services/host/browser/host.service';
16
+ import { UntitledTextEditorInput } from '@codingame/monaco-vscode-api/vscode/vs/workbench/services/untitled/common/untitledTextEditorInput';
17
+ import { FileEditorInput } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/files/browser/editors/fileEditorInput';
18
+ import { NotebookEditorInput } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/notebook/common/notebookEditorInput';
19
+ import { IChatContextPickService } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/browser/chatContextPickService.service';
20
+ import { IChatEditingService } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/chatEditingService.service';
21
+ import { toToolSetVariableEntry, toToolVariableEntry, OmittedState } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/chatVariableEntries';
22
+ import { ToolSet, ToolDataSource } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/languageModelToolsService';
23
+ import { isImage } from '../chatPasteProviders.js';
24
+ import { convertBufferToScreenshotVariable } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/browser/contrib/screenshot';
25
+ import { imageToHash } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/browser/imageUtils';
26
+ import { ChatInstructionsPickerPick } from '../promptSyntax/attachInstructionsAction.js';
27
+ import { ITerminalService } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/terminal/browser/terminal.service';
28
+ import { TerminalCapability } from '@codingame/monaco-vscode-api/vscode/vs/platform/terminal/common/capabilities/capabilities';
29
+
30
+ let ChatContextContributions = class ChatContextContributions extends Disposable {
31
+ static { this.ID = 'chat.contextContributions'; }
32
+ constructor(instantiationService, contextPickService) {
33
+ super();
34
+ this._store.add(contextPickService.registerChatContextItem(instantiationService.createInstance(ToolsContextPickerPick)));
35
+ this._store.add(contextPickService.registerChatContextItem(instantiationService.createInstance(ChatInstructionsPickerPick)));
36
+ this._store.add(contextPickService.registerChatContextItem(instantiationService.createInstance(OpenEditorContextValuePick)));
37
+ this._store.add(contextPickService.registerChatContextItem(instantiationService.createInstance(RelatedFilesContextPickerPick)));
38
+ this._store.add(contextPickService.registerChatContextItem(instantiationService.createInstance(ClipboardImageContextValuePick)));
39
+ this._store.add(contextPickService.registerChatContextItem(instantiationService.createInstance(ScreenshotContextValuePick)));
40
+ }
41
+ };
42
+ ChatContextContributions = ( __decorate([
43
+ ( __param(0, IInstantiationService)),
44
+ ( __param(1, IChatContextPickService))
45
+ ], ChatContextContributions));
46
+ class ToolsContextPickerPick {
47
+ constructor() {
48
+ this.type = 'pickerPick';
49
+ this.label = ( localize(4681, 'Tools...'));
50
+ this.icon = Codicon.tools;
51
+ this.ordinal = -500;
52
+ }
53
+ isEnabled(widget) {
54
+ return !!widget.attachmentCapabilities.supportsToolAttachments;
55
+ }
56
+ asPicker(widget) {
57
+ const items = [];
58
+ for (const [entry, enabled] of widget.input.selectedToolsModel.entriesMap.get()) {
59
+ if (enabled) {
60
+ if (entry instanceof ToolSet) {
61
+ items.push({
62
+ toolInfo: ToolDataSource.classify(entry.source),
63
+ label: entry.referenceName,
64
+ description: entry.description,
65
+ asAttachment: () => toToolSetVariableEntry(entry)
66
+ });
67
+ }
68
+ else {
69
+ items.push({
70
+ toolInfo: ToolDataSource.classify(entry.source),
71
+ label: entry.toolReferenceName ?? entry.displayName,
72
+ description: entry.userDescription ?? entry.modelDescription,
73
+ asAttachment: () => toToolVariableEntry(entry)
74
+ });
75
+ }
76
+ }
77
+ }
78
+ items.sort((a, b) => {
79
+ let res = a.toolInfo.ordinal - b.toolInfo.ordinal;
80
+ if (res === 0) {
81
+ res = a.toolInfo.label.localeCompare(b.toolInfo.label);
82
+ }
83
+ if (res === 0) {
84
+ res = a.label.localeCompare(b.label);
85
+ }
86
+ return res;
87
+ });
88
+ let lastGroupLabel;
89
+ const picks = [];
90
+ for (const item of items) {
91
+ if (lastGroupLabel !== item.toolInfo.label) {
92
+ picks.push({ type: 'separator', label: item.toolInfo.label });
93
+ lastGroupLabel = item.toolInfo.label;
94
+ }
95
+ picks.push(item);
96
+ }
97
+ return {
98
+ placeholder: ( localize(4682, 'Select a tool')),
99
+ picks: Promise.resolve(picks)
100
+ };
101
+ }
102
+ }
103
+ let OpenEditorContextValuePick = class OpenEditorContextValuePick {
104
+ constructor(_editorService, _labelService) {
105
+ this._editorService = _editorService;
106
+ this._labelService = _labelService;
107
+ this.type = 'valuePick';
108
+ this.label = ( localize(4683, 'Open Editors'));
109
+ this.icon = Codicon.file;
110
+ this.ordinal = 800;
111
+ }
112
+ isEnabled() {
113
+ return this._editorService.editors.filter(e => e instanceof FileEditorInput || e instanceof DiffEditorInput || e instanceof UntitledTextEditorInput).length > 0;
114
+ }
115
+ async asAttachment() {
116
+ const result = [];
117
+ for (const editor of this._editorService.editors) {
118
+ if (!(editor instanceof FileEditorInput || editor instanceof DiffEditorInput || editor instanceof UntitledTextEditorInput || editor instanceof NotebookEditorInput)) {
119
+ continue;
120
+ }
121
+ const uri = EditorResourceAccessor.getOriginalUri(editor, { supportSideBySide: SideBySideEditor.PRIMARY });
122
+ if (!uri) {
123
+ continue;
124
+ }
125
+ result.push({
126
+ kind: 'file',
127
+ id: ( uri.toString()),
128
+ value: uri,
129
+ name: this._labelService.getUriBasenameLabel(uri),
130
+ });
131
+ }
132
+ return result;
133
+ }
134
+ };
135
+ OpenEditorContextValuePick = ( __decorate([
136
+ ( __param(0, IEditorService)),
137
+ ( __param(1, ILabelService))
138
+ ], OpenEditorContextValuePick));
139
+ let RelatedFilesContextPickerPick = class RelatedFilesContextPickerPick {
140
+ constructor(_chatEditingService, _labelService) {
141
+ this._chatEditingService = _chatEditingService;
142
+ this._labelService = _labelService;
143
+ this.type = 'pickerPick';
144
+ this.label = ( localize(4684, 'Related Files'));
145
+ this.icon = Codicon.sparkle;
146
+ this.ordinal = 300;
147
+ }
148
+ isEnabled(widget) {
149
+ return this._chatEditingService.hasRelatedFilesProviders() && (Boolean(widget.getInput()) || widget.attachmentModel.fileAttachments.length > 0);
150
+ }
151
+ asPicker(widget) {
152
+ const picks = (async () => {
153
+ const chatSessionResource = widget.viewModel?.sessionResource;
154
+ if (!chatSessionResource) {
155
+ return [];
156
+ }
157
+ const relatedFiles = await this._chatEditingService.getRelatedFiles(chatSessionResource, widget.getInput(), widget.attachmentModel.fileAttachments, CancellationToken.None);
158
+ if (!relatedFiles) {
159
+ return [];
160
+ }
161
+ const attachments = widget.attachmentModel.getAttachmentIDs();
162
+ return this._chatEditingService.getRelatedFiles(chatSessionResource, widget.getInput(), widget.attachmentModel.fileAttachments, CancellationToken.None)
163
+ .then((files) => (files ?? []).reduce((acc, cur) => {
164
+ acc.push({ type: 'separator', label: cur.group });
165
+ for (const file of cur.files) {
166
+ const label = this._labelService.getUriBasenameLabel(file.uri);
167
+ acc.push({
168
+ label: label,
169
+ description: this._labelService.getUriLabel(dirname(file.uri), { relative: true }),
170
+ disabled: ( attachments.has(( file.uri.toString()))),
171
+ asAttachment: () => {
172
+ return {
173
+ kind: 'file',
174
+ id: ( file.uri.toString()),
175
+ value: file.uri,
176
+ name: label,
177
+ omittedState: OmittedState.NotOmitted
178
+ };
179
+ }
180
+ });
181
+ }
182
+ return acc;
183
+ }, []));
184
+ })();
185
+ return {
186
+ placeholder: ( localize(4685, 'Add related files to your working set')),
187
+ picks,
188
+ };
189
+ }
190
+ };
191
+ RelatedFilesContextPickerPick = ( __decorate([
192
+ ( __param(0, IChatEditingService)),
193
+ ( __param(1, ILabelService))
194
+ ], RelatedFilesContextPickerPick));
195
+ let ClipboardImageContextValuePick = class ClipboardImageContextValuePick {
196
+ constructor(_clipboardService) {
197
+ this._clipboardService = _clipboardService;
198
+ this.type = 'valuePick';
199
+ this.label = ( localize(4686, 'Image from Clipboard'));
200
+ this.icon = Codicon.fileMedia;
201
+ }
202
+ async isEnabled(widget) {
203
+ if (!widget.attachmentCapabilities.supportsImageAttachments) {
204
+ return false;
205
+ }
206
+ if (!widget.input.selectedLanguageModel?.metadata.capabilities?.vision) {
207
+ return false;
208
+ }
209
+ const imageData = await this._clipboardService.readImage();
210
+ return isImage(imageData);
211
+ }
212
+ async asAttachment() {
213
+ const fileBuffer = await this._clipboardService.readImage();
214
+ return {
215
+ id: await imageToHash(fileBuffer),
216
+ name: ( localize(4687, 'Pasted Image')),
217
+ fullName: ( localize(4687, 'Pasted Image')),
218
+ value: fileBuffer,
219
+ kind: 'image',
220
+ };
221
+ }
222
+ };
223
+ ClipboardImageContextValuePick = ( __decorate([
224
+ ( __param(0, IClipboardService))
225
+ ], ClipboardImageContextValuePick));
226
+ let TerminalContext = class TerminalContext {
227
+ constructor(_resource, _terminalService) {
228
+ this._resource = _resource;
229
+ this._terminalService = _terminalService;
230
+ this.type = 'valuePick';
231
+ this.icon = Codicon.terminal;
232
+ this.label = ( localize(4688, 'Terminal'));
233
+ }
234
+ isEnabled(widget) {
235
+ const terminal = this._terminalService.getInstanceFromResource(this._resource);
236
+ return !!widget.attachmentCapabilities.supportsTerminalAttachments && terminal?.isDisposed === false;
237
+ }
238
+ async asAttachment(widget) {
239
+ const terminal = this._terminalService.getInstanceFromResource(this._resource);
240
+ if (!terminal) {
241
+ return;
242
+ }
243
+ const params = ( new URLSearchParams(this._resource.query));
244
+ const command = terminal.capabilities.get(TerminalCapability.CommandDetection)?.commands.find(cmd => cmd.id === params.get('command'));
245
+ if (!command) {
246
+ return;
247
+ }
248
+ const attachment = {
249
+ kind: 'terminalCommand',
250
+ id: `terminalCommand:${Date.now()}}`,
251
+ value: this.asValue(command),
252
+ name: command.command,
253
+ command: command.command,
254
+ output: command.getOutput(),
255
+ exitCode: command.exitCode,
256
+ resource: this._resource
257
+ };
258
+ const cleanup = ( new DisposableStore());
259
+ let disposed = false;
260
+ const disposeCleanup = () => {
261
+ if (disposed) {
262
+ return;
263
+ }
264
+ disposed = true;
265
+ cleanup.dispose();
266
+ };
267
+ cleanup.add(widget.attachmentModel.onDidChange(e => {
268
+ if (e.deleted.includes(attachment.id)) {
269
+ disposeCleanup();
270
+ }
271
+ }));
272
+ cleanup.add(terminal.onDisposed(() => {
273
+ widget.attachmentModel.delete(attachment.id);
274
+ widget.refreshParsedInput();
275
+ disposeCleanup();
276
+ }));
277
+ return attachment;
278
+ }
279
+ asValue(command) {
280
+ let value = `Command: ${command.command}`;
281
+ const output = command.getOutput();
282
+ if (output) {
283
+ value += `\nOutput:\n${output}`;
284
+ }
285
+ if (typeof command.exitCode === 'number') {
286
+ value += `\nExit Code: ${command.exitCode}`;
287
+ }
288
+ return value;
289
+ }
290
+ };
291
+ TerminalContext = ( __decorate([
292
+ ( __param(1, ITerminalService))
293
+ ], TerminalContext));
294
+ let ScreenshotContextValuePick = class ScreenshotContextValuePick {
295
+ constructor(_hostService) {
296
+ this._hostService = _hostService;
297
+ this.type = 'valuePick';
298
+ this.icon = Codicon.deviceCamera;
299
+ this.label = (isElectron
300
+ ? ( localize(4689, 'Screenshot Window'))
301
+ : ( localize(4690, 'Screenshot')));
302
+ }
303
+ async isEnabled(widget) {
304
+ return !!widget.attachmentCapabilities.supportsImageAttachments && !!widget.input.selectedLanguageModel?.metadata.capabilities?.vision;
305
+ }
306
+ async asAttachment() {
307
+ const blob = await this._hostService.getScreenshot();
308
+ return blob && convertBufferToScreenshotVariable(blob);
309
+ }
310
+ };
311
+ ScreenshotContextValuePick = ( __decorate([
312
+ ( __param(0, IHostService))
313
+ ], ScreenshotContextValuePick));
314
+
315
+ export { ChatContextContributions, TerminalContext };
@@ -0,0 +1,49 @@
1
+ import { CancellationToken } from "@codingame/monaco-vscode-api/vscode/vs/base/common/cancellation";
2
+ import { IReadonlyVSDataTransfer } from "@codingame/monaco-vscode-api/vscode/vs/base/common/dataTransfer";
3
+ import { HierarchicalKind } from "@codingame/monaco-vscode-api/vscode/vs/base/common/hierarchicalKind";
4
+ import { Disposable } from "@codingame/monaco-vscode-api/vscode/vs/base/common/lifecycle";
5
+ import { IRange } from "@codingame/monaco-vscode-api/vscode/vs/editor/common/core/range";
6
+ import { DocumentPasteContext, DocumentPasteEditProvider, DocumentPasteEditsSession } from "@codingame/monaco-vscode-api/vscode/vs/editor/common/languages";
7
+ import { ITextModel } from "@codingame/monaco-vscode-api/vscode/vs/editor/common/model";
8
+ import { ILanguageFeaturesService } from "@codingame/monaco-vscode-api/vscode/vs/editor/common/services/languageFeatures.service";
9
+ import { IModelService } from "@codingame/monaco-vscode-api/vscode/vs/editor/common/services/model.service";
10
+ import { IEnvironmentService } from "@codingame/monaco-vscode-api/vscode/vs/platform/environment/common/environment.service";
11
+ import { IFileService } from "@codingame/monaco-vscode-api/vscode/vs/platform/files/common/files.service";
12
+ import { IInstantiationService } from "@codingame/monaco-vscode-api/vscode/vs/platform/instantiation/common/instantiation";
13
+ import { ILogService } from "@codingame/monaco-vscode-api/vscode/vs/platform/log/common/log.service";
14
+ import { IExtensionService } from "@codingame/monaco-vscode-api/vscode/vs/workbench/services/extensions/common/extensions.service";
15
+ import { IChatWidgetService } from "@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/browser/chat.service";
16
+ export declare class PasteImageProvider implements DocumentPasteEditProvider {
17
+ private readonly chatWidgetService;
18
+ private readonly extensionService;
19
+ private readonly fileService;
20
+ private readonly environmentService;
21
+ private readonly logService;
22
+ private readonly imagesFolder;
23
+ readonly kind: HierarchicalKind;
24
+ readonly providedPasteEditKinds: HierarchicalKind[];
25
+ readonly copyMimeTypes: never[];
26
+ readonly pasteMimeTypes: string[];
27
+ constructor(chatWidgetService: IChatWidgetService, extensionService: IExtensionService, fileService: IFileService, environmentService: IEnvironmentService, logService: ILogService);
28
+ provideDocumentPasteEdits(model: ITextModel, ranges: readonly IRange[], dataTransfer: IReadonlyVSDataTransfer, context: DocumentPasteContext, token: CancellationToken): Promise<DocumentPasteEditsSession | undefined>;
29
+ }
30
+ export declare function isImage(array: Uint8Array): boolean;
31
+ export declare class CopyTextProvider implements DocumentPasteEditProvider {
32
+ readonly providedPasteEditKinds: never[];
33
+ readonly copyMimeTypes: string[];
34
+ readonly pasteMimeTypes: never[];
35
+ prepareDocumentPaste(model: ITextModel, ranges: readonly IRange[], dataTransfer: IReadonlyVSDataTransfer, token: CancellationToken): Promise<undefined | IReadonlyVSDataTransfer>;
36
+ }
37
+ export declare class PasteTextProvider implements DocumentPasteEditProvider {
38
+ private readonly chatWidgetService;
39
+ private readonly modelService;
40
+ readonly kind: HierarchicalKind;
41
+ readonly providedPasteEditKinds: HierarchicalKind[];
42
+ readonly copyMimeTypes: never[];
43
+ readonly pasteMimeTypes: string[];
44
+ constructor(chatWidgetService: IChatWidgetService, modelService: IModelService);
45
+ provideDocumentPasteEdits(model: ITextModel, ranges: readonly IRange[], dataTransfer: IReadonlyVSDataTransfer, _context: DocumentPasteContext, token: CancellationToken): Promise<DocumentPasteEditsSession | undefined>;
46
+ }
47
+ export declare class ChatPasteProvidersFeature extends Disposable {
48
+ constructor(instaService: IInstantiationService, languageFeaturesService: ILanguageFeaturesService, chatWidgetService: IChatWidgetService, extensionService: IExtensionService, fileService: IFileService, modelService: IModelService, environmentService: IEnvironmentService, logService: ILogService);
49
+ }