@theia/plugin 1.55.0-next.4 → 1.55.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/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@theia/plugin",
|
|
3
|
-
"version": "1.55.0
|
|
3
|
+
"version": "1.55.0",
|
|
4
4
|
"description": "Theia - Plugin API",
|
|
5
5
|
"types": "./src/theia.d.ts",
|
|
6
6
|
"publishConfig": {
|
|
@@ -27,10 +27,10 @@
|
|
|
27
27
|
"watch": "theiaext watch"
|
|
28
28
|
},
|
|
29
29
|
"devDependencies": {
|
|
30
|
-
"@theia/ext-scripts": "1.
|
|
30
|
+
"@theia/ext-scripts": "1.55.0"
|
|
31
31
|
},
|
|
32
32
|
"nyc": {
|
|
33
33
|
"extends": "../../configs/nyc.json"
|
|
34
34
|
},
|
|
35
|
-
"gitHead": "
|
|
35
|
+
"gitHead": "0e7a523b8e798679d2e098709c63bd7060e54c8a"
|
|
36
36
|
}
|
package/src/theia.d.ts
CHANGED
|
@@ -23,6 +23,7 @@
|
|
|
23
23
|
|
|
24
24
|
import './theia-extra';
|
|
25
25
|
import './theia.proposed.canonicalUriProvider';
|
|
26
|
+
import './theia.proposed.createFileSystemWatcher';
|
|
26
27
|
import './theia.proposed.customEditorMove';
|
|
27
28
|
import './theia.proposed.debugVisualization';
|
|
28
29
|
import './theia.proposed.diffCommand';
|
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
// *****************************************************************************
|
|
2
|
+
// Copyright (C) 2024 STMicroelectronics and others.
|
|
3
|
+
//
|
|
4
|
+
// This program and the accompanying materials are made available under the
|
|
5
|
+
// terms of the Eclipse Public License v. 2.0 which is available at
|
|
6
|
+
// http://www.eclipse.org/legal/epl-2.0.
|
|
7
|
+
//
|
|
8
|
+
// This Source Code may also be made available under the following Secondary
|
|
9
|
+
// Licenses when the conditions for such availability set forth in the Eclipse
|
|
10
|
+
// Public License v. 2.0 are satisfied: GNU General Public License, version 2
|
|
11
|
+
// with the GNU Classpath Exception which is available at
|
|
12
|
+
// https://www.gnu.org/software/classpath/license.html.
|
|
13
|
+
//
|
|
14
|
+
// SPDX-License-Identifier: EPL-2.0 OR GPL-2.0-only WITH Classpath-exception-2.0
|
|
15
|
+
// *****************************************************************************
|
|
16
|
+
/*---------------------------------------------------------------------------------------------
|
|
17
|
+
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
18
|
+
* Licensed under the MIT License. See License.txt in the project root for license information.
|
|
19
|
+
*--------------------------------------------------------------------------------------------*/
|
|
20
|
+
// code copied and modified from https://github.com/microsoft/vscode/blob/release/1.93/src/vscode-dts/vscode.proposed.createFileSystemWatcher.d.ts
|
|
21
|
+
|
|
22
|
+
declare module '@theia/plugin' {
|
|
23
|
+
|
|
24
|
+
export interface FileSystemWatcherOptions {
|
|
25
|
+
|
|
26
|
+
/**
|
|
27
|
+
* Ignore when files have been created.
|
|
28
|
+
*/
|
|
29
|
+
readonly ignoreCreateEvents?: boolean;
|
|
30
|
+
|
|
31
|
+
/**
|
|
32
|
+
* Ignore when files have been changed.
|
|
33
|
+
*/
|
|
34
|
+
readonly ignoreChangeEvents?: boolean;
|
|
35
|
+
|
|
36
|
+
/**
|
|
37
|
+
* Ignore when files have been deleted.
|
|
38
|
+
*/
|
|
39
|
+
readonly ignoreDeleteEvents?: boolean;
|
|
40
|
+
|
|
41
|
+
/**
|
|
42
|
+
* An optional set of glob patterns to exclude from watching.
|
|
43
|
+
* Glob patterns are always matched relative to the watched folder.
|
|
44
|
+
*/
|
|
45
|
+
readonly excludes: string[];
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
export namespace workspace {
|
|
49
|
+
|
|
50
|
+
/**
|
|
51
|
+
* A variant of {@link workspace.createFileSystemWatcher} that optionally allows to specify
|
|
52
|
+
* a set of glob patterns to exclude from watching.
|
|
53
|
+
*
|
|
54
|
+
* It provides the following advantages over the other {@link workspace.createFileSystemWatcher}
|
|
55
|
+
* method:
|
|
56
|
+
* - the configured excludes from `files.watcherExclude` setting are NOT applied
|
|
57
|
+
* - requests for recursive file watchers inside the opened workspace are NOT ignored
|
|
58
|
+
* - the watcher is ONLY notified for events from this request and not from any other watcher
|
|
59
|
+
*
|
|
60
|
+
* As such, this method is prefered in cases where you want full control over the watcher behavior
|
|
61
|
+
* without being impacted by settings or other watchers that are installed.
|
|
62
|
+
*/
|
|
63
|
+
export function createFileSystemWatcher(pattern: RelativePattern, options?: FileSystemWatcherOptions): FileSystemWatcher;
|
|
64
|
+
}
|
|
65
|
+
}
|
|
@@ -27,8 +27,24 @@ export module '@theia/plugin' {
|
|
|
27
27
|
readonly ranges: Range[];
|
|
28
28
|
}
|
|
29
29
|
|
|
30
|
+
export interface ConversationRequest {
|
|
31
|
+
readonly type: 'request';
|
|
32
|
+
readonly message: string;
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
export interface ConversationResponse {
|
|
36
|
+
readonly type: 'response';
|
|
37
|
+
readonly message: string;
|
|
38
|
+
readonly references?: DocumentContextItem[];
|
|
39
|
+
}
|
|
40
|
+
|
|
30
41
|
export interface MappedEditsContext {
|
|
31
|
-
documents: DocumentContextItem[][];
|
|
42
|
+
readonly documents: DocumentContextItem[][];
|
|
43
|
+
/**
|
|
44
|
+
* The conversation that led to the current code block(s).
|
|
45
|
+
* The last conversation part contains the code block(s) for which the code mapper should provide edits.
|
|
46
|
+
*/
|
|
47
|
+
readonly conversation?: (ConversationRequest | ConversationResponse)[];
|
|
32
48
|
}
|
|
33
49
|
|
|
34
50
|
/**
|
|
@@ -38,9 +54,8 @@ export module '@theia/plugin' {
|
|
|
38
54
|
/**
|
|
39
55
|
* Provide mapped edits for a given document.
|
|
40
56
|
* @param document The document to provide mapped edits for.
|
|
41
|
-
* @param codeBlocks Code blocks that come from an LLM's reply.
|
|
42
|
-
*
|
|
43
|
-
* and let the lang server decide what to do with them.
|
|
57
|
+
* @param codeBlocks Code blocks that come from an LLM's reply. "Apply in Editor" in the panel chat only sends one edit that the user clicks on, but inline chat can send
|
|
58
|
+
* multiple blocks and let the lang server decide what to do with them.
|
|
44
59
|
* @param context The context for providing mapped edits.
|
|
45
60
|
* @param token A cancellation token.
|
|
46
61
|
* @returns A provider result of text edits.
|
|
@@ -53,7 +68,33 @@ export module '@theia/plugin' {
|
|
|
53
68
|
): ProviderResult<WorkspaceEdit | null>;
|
|
54
69
|
}
|
|
55
70
|
|
|
71
|
+
export interface MappedEditsRequest {
|
|
72
|
+
readonly codeBlocks: { code: string; resource: Uri }[];
|
|
73
|
+
// for every prior response that contains codeblocks, make sure we pass the code as well as the resources based on the reported codemapper URIs
|
|
74
|
+
readonly conversation: (ConversationRequest | ConversationResponse)[];
|
|
75
|
+
}
|
|
76
|
+
|
|
77
|
+
export interface MappedEditsResponseStream {
|
|
78
|
+
textEdit(target: Uri, edits: TextEdit | TextEdit[]): void;
|
|
79
|
+
}
|
|
80
|
+
|
|
81
|
+
export interface MappedEditsResult {
|
|
82
|
+
readonly errorMessage?: string;
|
|
83
|
+
}
|
|
84
|
+
|
|
85
|
+
/**
|
|
86
|
+
* Interface for providing mapped edits for a given document.
|
|
87
|
+
*/
|
|
88
|
+
export interface MappedEditsProvider2 {
|
|
89
|
+
provideMappedEdits(
|
|
90
|
+
request: MappedEditsRequest,
|
|
91
|
+
result: MappedEditsResponseStream,
|
|
92
|
+
token: CancellationToken
|
|
93
|
+
): ProviderResult<MappedEditsResult>;
|
|
94
|
+
}
|
|
95
|
+
|
|
56
96
|
export namespace chat {
|
|
57
97
|
export function registerMappedEditsProvider(documentSelector: DocumentSelector, provider: MappedEditsProvider): Disposable;
|
|
98
|
+
export function registerMappedEditsProvider2(provider: MappedEditsProvider2): Disposable;
|
|
58
99
|
}
|
|
59
100
|
}
|