@vsc-neuropilot/api-types 1.0.0-pre.1 → 1.0.0-pre.2
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/CHANGELOG.md +18 -0
- package/dist/index.d.mts +239 -172
- package/dist/index.d.mts.map +1 -1
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -14,6 +14,24 @@ This is the first release of the API. The versioning will be as follows:
|
|
|
14
14
|
|
|
15
15
|
Each higher version type can also inherit characteristics from the lower version types.
|
|
16
16
|
|
|
17
|
+
For prereleases:
|
|
18
|
+
|
|
19
|
+
- Pre-release versions (x.x.x-pre.x) are unstable releases for the designated API version. These contain work-in-progress types and annotations. Pre-release versions are not meant to be used except for trying out new API interfaces and giving feedback, and may change without prior programmatic notice. Pre-release versions are meant to be used with new builds from the `dev` branch of the base extension repo.
|
|
20
|
+
- Release candidates (x.x.x-rc.x) are stable previews for the designated API version. These contain types that are more or less finalized for the designated release. Breaking changes should not be expected, both in type signature and functionality, but will always be highlighted in the changelog if necessary. This is also meant for feedback, but only for more subtle feedback before releasing that version such that it simply just contains bug fixes and very minor changes.
|
|
21
|
+
|
|
22
|
+
## 1.0.0-pre.2
|
|
23
|
+
|
|
24
|
+
### Added
|
|
25
|
+
|
|
26
|
+
- Documentation regarding versioning to the draft 1.0.0 changelog
|
|
27
|
+
- Interfaces for setting file and text preview effects
|
|
28
|
+
- Extra file path utils and workspace utils. These are mostly for backwards compatibility.
|
|
29
|
+
|
|
30
|
+
### Changed
|
|
31
|
+
|
|
32
|
+
- Changed the interface where a `CancelEvent` can be constructed. Now, instead of being accessible freely via the public utils object, it is moved to the Companion class, inside the actionUtils object.
|
|
33
|
+
- Changed the interface where the `isPathNeuroSafe` method can be called. Now, instead of being callable from the root of the public utils object, it is nested inside the new file path utils subobject.
|
|
34
|
+
|
|
17
35
|
## 1.0.0-pre.1
|
|
18
36
|
|
|
19
37
|
Added some documentation to the package.
|
package/dist/index.d.mts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { Action, ActionData, ActionForcePriorityEnum, ActionForcePriorityEnum as ActionForcePriorityEnum$1 } from "neuro-game-sdk";
|
|
2
2
|
import { JSONSchema7Object } from "json-schema";
|
|
3
|
-
import * as vscode from "vscode";
|
|
4
|
-
import { Disposable, Event, Position, Progress, Range } from "vscode";
|
|
3
|
+
import * as vscode$1 from "vscode";
|
|
4
|
+
import { Disposable, Event, Position, Progress, Range, TextEditorDecorationType } from "vscode";
|
|
5
5
|
|
|
6
6
|
//#region src/actions/enums.d.ts
|
|
7
7
|
/** Permission level enums */
|
|
@@ -17,6 +17,165 @@ declare const enum DiffRangeType {
|
|
|
17
17
|
Removed = 2
|
|
18
18
|
}
|
|
19
19
|
//#endregion
|
|
20
|
+
//#region src/actions/classes.d.ts
|
|
21
|
+
//#region RCE context
|
|
22
|
+
type RCEStorage = Record<string | number | symbol, unknown>;
|
|
23
|
+
type ActionStatus = 'pending' | 'success' | 'failure' | 'denied' | 'exception' | 'timeout' | 'schema' | 'cancelled';
|
|
24
|
+
interface RCELifecycleMetadata {
|
|
25
|
+
events?: Disposable[];
|
|
26
|
+
preview?: {
|
|
27
|
+
dispose: () => unknown;
|
|
28
|
+
};
|
|
29
|
+
validatorResults?: {
|
|
30
|
+
sync?: ActionValidationResult[];
|
|
31
|
+
async?: ActionValidationResult[];
|
|
32
|
+
};
|
|
33
|
+
setupHooks?: boolean;
|
|
34
|
+
}
|
|
35
|
+
type SimplifiedStatusUpdateHandler = (status: ActionStatus, message?: string) => void;
|
|
36
|
+
interface RCERequestState {
|
|
37
|
+
/**
|
|
38
|
+
* The prompt used for the request. Constructed from {@link RCEAction.promptGenerator the action's promptGenerator}.
|
|
39
|
+
*/
|
|
40
|
+
prompt: string;
|
|
41
|
+
/**
|
|
42
|
+
* Whether or not the notification is visible on screen.
|
|
43
|
+
*/
|
|
44
|
+
notificationVisible: boolean;
|
|
45
|
+
/**
|
|
46
|
+
* The function to report progress on the notification.
|
|
47
|
+
* Should not be necessary to call in most circumstances.
|
|
48
|
+
* @param progress A {@link Progress} object which reports updates for the RCE request.
|
|
49
|
+
* @returns A promise that resolves when the request is resolved in some way.
|
|
50
|
+
*/
|
|
51
|
+
attachNotification: (progress: Progress<{
|
|
52
|
+
message?: string;
|
|
53
|
+
increment?: number;
|
|
54
|
+
}>) => Promise<void>;
|
|
55
|
+
/**
|
|
56
|
+
* Resolves the request, clearing timers and resources used by this object.
|
|
57
|
+
* Should not be necessary to call in most circumstances.
|
|
58
|
+
*/
|
|
59
|
+
resolve: () => void;
|
|
60
|
+
/**
|
|
61
|
+
* Whether or not the request has been resolved.
|
|
62
|
+
*/
|
|
63
|
+
resolved: boolean;
|
|
64
|
+
/**
|
|
65
|
+
* The interval timeout that reports progress to VS Code.
|
|
66
|
+
*/
|
|
67
|
+
interval?: NodeJS.Timeout | null;
|
|
68
|
+
/**
|
|
69
|
+
* The timeout object that times out the request itself.
|
|
70
|
+
*/
|
|
71
|
+
timeout?: NodeJS.Timeout | null;
|
|
72
|
+
}
|
|
73
|
+
/**
|
|
74
|
+
* RCE executes the methods of {@link RCEAction} (and therefore passes the context object) in the following order:
|
|
75
|
+
* 1. Setup hooks
|
|
76
|
+
* 2. Validators (sync)
|
|
77
|
+
* 3. Cancel events setup
|
|
78
|
+
* 4. Prompt Generator
|
|
79
|
+
* 5. Preview effects
|
|
80
|
+
* 6. Some arbitrary time in between here, event listeners for cancel events may also be fired, and the predicate will receive the context object as well.
|
|
81
|
+
* 7. Handler
|
|
82
|
+
*/
|
|
83
|
+
declare class RCEContext<T extends JSONSchema7Object | undefined = any, K = any> extends Disposable {
|
|
84
|
+
/** The name of the action currently being executed */
|
|
85
|
+
name: string;
|
|
86
|
+
/** When the execution context was created */
|
|
87
|
+
createdAt: string;
|
|
88
|
+
/**
|
|
89
|
+
* The action data received from Neuro.
|
|
90
|
+
* @see {@link ActionData}
|
|
91
|
+
*/
|
|
92
|
+
data: ActionData<T>;
|
|
93
|
+
/**
|
|
94
|
+
* The RCE action whose name corresponds to the action data Neuro sent in.
|
|
95
|
+
* @see {@link RCEAction}
|
|
96
|
+
*/
|
|
97
|
+
action: RCEAction<T, K>;
|
|
98
|
+
/**
|
|
99
|
+
* Whether or not the action was forced from an action force.
|
|
100
|
+
*/
|
|
101
|
+
readonly forced: boolean;
|
|
102
|
+
/**
|
|
103
|
+
* Metadata specific to this context lifecycle.
|
|
104
|
+
* @see {@link RCELifecycleMetadata lifecycle metadata interface}
|
|
105
|
+
*/
|
|
106
|
+
readonly lifecycle: RCELifecycleMetadata;
|
|
107
|
+
/**
|
|
108
|
+
* Data pertaining to the request for the execution.
|
|
109
|
+
* Only populated in Copilot node.
|
|
110
|
+
*/
|
|
111
|
+
request?: RCERequestState;
|
|
112
|
+
/**
|
|
113
|
+
* Ephemeral storage.
|
|
114
|
+
* Can be used to store data that needs to be accessed across different lifecycle stages of
|
|
115
|
+
* the action (validation, preview, handler), so that it doesn't need to be regenerated in
|
|
116
|
+
* each stage.
|
|
117
|
+
* This data does not persist across different executions.
|
|
118
|
+
*/
|
|
119
|
+
storage?: RCEStorage;
|
|
120
|
+
/**
|
|
121
|
+
* Updates the status of the action on the action execution history panel
|
|
122
|
+
* @param status The new status to update to
|
|
123
|
+
* @param message Message to update the status with
|
|
124
|
+
*/
|
|
125
|
+
readonly updateStatus: SimplifiedStatusUpdateHandler;
|
|
126
|
+
/**
|
|
127
|
+
* Marks this context object as done and destroys it.
|
|
128
|
+
* In normal circumstances you SHOULD NOT BE CALLING THIS FUNCTION, as RCE already handles this for you.
|
|
129
|
+
* @param success Whether or not the action attempted that spawned this context was successful.
|
|
130
|
+
*/
|
|
131
|
+
done(success: boolean): void;
|
|
132
|
+
/**
|
|
133
|
+
* Clears request timers and cancel events before handler execution.
|
|
134
|
+
* This prevents timers/events from triggering during async handler execution.
|
|
135
|
+
* You usually shouldn't need to call this, but there is no harm in doing so one or more times.
|
|
136
|
+
*/
|
|
137
|
+
clearPreHandlerResources(): void;
|
|
138
|
+
}
|
|
139
|
+
//#endregion
|
|
140
|
+
//#region RCE cancel events
|
|
141
|
+
type ReasonGenerator<T = any> = string | ((context: RCEContext, data: T) => string);
|
|
142
|
+
interface RCECancelEventInitializer<T = any> {
|
|
143
|
+
/** The reason that will be used to send to Neuro-sama. */
|
|
144
|
+
reason?: ReasonGenerator<T>;
|
|
145
|
+
/** The reason that will be used to log the cancellation. */
|
|
146
|
+
logReason?: ReasonGenerator<T>;
|
|
147
|
+
/** Events that will trigger the cancellation. If the predicate is null, the event will always trigger the cancellation. */
|
|
148
|
+
events?: [Event<T>, ((data: T) => boolean | Promise<boolean>) | null][];
|
|
149
|
+
}
|
|
150
|
+
declare class RCECancelEvent<T = any> {
|
|
151
|
+
/**
|
|
152
|
+
* Publicly-exposed event.
|
|
153
|
+
*/
|
|
154
|
+
public readonly event: Event<T>;
|
|
155
|
+
/**
|
|
156
|
+
* Event disposable using {@link Disposable VS Code's Disposable class}.
|
|
157
|
+
*/
|
|
158
|
+
public readonly disposable: Disposable;
|
|
159
|
+
/**
|
|
160
|
+
* The reason that will be used to send to Neuro-sama.
|
|
161
|
+
*/
|
|
162
|
+
public readonly reason?: ReasonGenerator<T>;
|
|
163
|
+
/**
|
|
164
|
+
* The reason that will be used to log the cancellation.
|
|
165
|
+
*/
|
|
166
|
+
public readonly logReason?: ReasonGenerator<T>;
|
|
167
|
+
/**
|
|
168
|
+
* Fires the event.
|
|
169
|
+
* @param data The data to provide in the fire.
|
|
170
|
+
*/
|
|
171
|
+
public fire(data: T): void;
|
|
172
|
+
/**
|
|
173
|
+
* Creates an instance of RCECancelEvent.
|
|
174
|
+
* @param init Initialization parameters.
|
|
175
|
+
*/
|
|
176
|
+
constructor(init?: RCECancelEventInitializer<T>);
|
|
177
|
+
}
|
|
178
|
+
//#endregion
|
|
20
179
|
//#region src/actions/types.d.ts
|
|
21
180
|
//#region Action forces
|
|
22
181
|
/**
|
|
@@ -253,165 +412,6 @@ interface DiffRange {
|
|
|
253
412
|
removedText?: string;
|
|
254
413
|
}
|
|
255
414
|
//#endregion
|
|
256
|
-
//#region src/actions/classes.d.ts
|
|
257
|
-
//#region RCE context
|
|
258
|
-
type RCEStorage = Record<string | number | symbol, unknown>;
|
|
259
|
-
type ActionStatus = 'pending' | 'success' | 'failure' | 'denied' | 'exception' | 'timeout' | 'schema' | 'cancelled';
|
|
260
|
-
interface RCELifecycleMetadata {
|
|
261
|
-
events?: Disposable[];
|
|
262
|
-
preview?: {
|
|
263
|
-
dispose: () => unknown;
|
|
264
|
-
};
|
|
265
|
-
validatorResults?: {
|
|
266
|
-
sync?: ActionValidationResult[];
|
|
267
|
-
async?: ActionValidationResult[];
|
|
268
|
-
};
|
|
269
|
-
setupHooks?: boolean;
|
|
270
|
-
}
|
|
271
|
-
type SimplifiedStatusUpdateHandler = (status: ActionStatus, message?: string) => void;
|
|
272
|
-
interface RCERequestState {
|
|
273
|
-
/**
|
|
274
|
-
* The prompt used for the request. Constructed from {@link RCEAction.promptGenerator the action's promptGenerator}.
|
|
275
|
-
*/
|
|
276
|
-
prompt: string;
|
|
277
|
-
/**
|
|
278
|
-
* Whether or not the notification is visible on screen.
|
|
279
|
-
*/
|
|
280
|
-
notificationVisible: boolean;
|
|
281
|
-
/**
|
|
282
|
-
* The function to report progress on the notification.
|
|
283
|
-
* Should not be necessary to call in most circumstances.
|
|
284
|
-
* @param progress A {@link Progress} object which reports updates for the RCE request.
|
|
285
|
-
* @returns A promise that resolves when the request is resolved in some way.
|
|
286
|
-
*/
|
|
287
|
-
attachNotification: (progress: Progress<{
|
|
288
|
-
message?: string;
|
|
289
|
-
increment?: number;
|
|
290
|
-
}>) => Promise<void>;
|
|
291
|
-
/**
|
|
292
|
-
* Resolves the request, clearing timers and resources used by this object.
|
|
293
|
-
* Should not be necessary to call in most circumstances.
|
|
294
|
-
*/
|
|
295
|
-
resolve: () => void;
|
|
296
|
-
/**
|
|
297
|
-
* Whether or not the request has been resolved.
|
|
298
|
-
*/
|
|
299
|
-
resolved: boolean;
|
|
300
|
-
/**
|
|
301
|
-
* The interval timeout that reports progress to VS Code.
|
|
302
|
-
*/
|
|
303
|
-
interval?: NodeJS.Timeout | null;
|
|
304
|
-
/**
|
|
305
|
-
* The timeout object that times out the request itself.
|
|
306
|
-
*/
|
|
307
|
-
timeout?: NodeJS.Timeout | null;
|
|
308
|
-
}
|
|
309
|
-
/**
|
|
310
|
-
* RCE executes the methods of {@link RCEAction} (and therefore passes the context object) in the following order:
|
|
311
|
-
* 1. Setup hooks
|
|
312
|
-
* 2. Validators (sync)
|
|
313
|
-
* 3. Cancel events setup
|
|
314
|
-
* 4. Prompt Generator
|
|
315
|
-
* 5. Preview effects
|
|
316
|
-
* 6. Some arbitrary time in between here, event listeners for cancel events may also be fired, and the predicate will receive the context object as well.
|
|
317
|
-
* 7. Handler
|
|
318
|
-
*/
|
|
319
|
-
declare class RCEContext<T extends JSONSchema7Object | undefined = any, K = any> extends Disposable {
|
|
320
|
-
/** The name of the action currently being executed */
|
|
321
|
-
name: string;
|
|
322
|
-
/** When the execution context was created */
|
|
323
|
-
createdAt: string;
|
|
324
|
-
/**
|
|
325
|
-
* The action data received from Neuro.
|
|
326
|
-
* @see {@link ActionData}
|
|
327
|
-
*/
|
|
328
|
-
data: ActionData<T>;
|
|
329
|
-
/**
|
|
330
|
-
* The RCE action whose name corresponds to the action data Neuro sent in.
|
|
331
|
-
* @see {@link RCEAction}
|
|
332
|
-
*/
|
|
333
|
-
action: RCEAction<T, K>;
|
|
334
|
-
/**
|
|
335
|
-
* Whether or not the action was forced from an action force.
|
|
336
|
-
*/
|
|
337
|
-
readonly forced: boolean;
|
|
338
|
-
/**
|
|
339
|
-
* Metadata specific to this context lifecycle.
|
|
340
|
-
* @see {@link RCELifecycleMetadata lifecycle metadata interface}
|
|
341
|
-
*/
|
|
342
|
-
readonly lifecycle: RCELifecycleMetadata;
|
|
343
|
-
/**
|
|
344
|
-
* Data pertaining to the request for the execution.
|
|
345
|
-
* Only populated in Copilot node.
|
|
346
|
-
*/
|
|
347
|
-
request?: RCERequestState;
|
|
348
|
-
/**
|
|
349
|
-
* Ephemeral storage.
|
|
350
|
-
* Can be used to store data that needs to be accessed across different lifecycle stages of
|
|
351
|
-
* the action (validation, preview, handler), so that it doesn't need to be regenerated in
|
|
352
|
-
* each stage.
|
|
353
|
-
* This data does not persist across different executions.
|
|
354
|
-
*/
|
|
355
|
-
storage?: RCEStorage;
|
|
356
|
-
/**
|
|
357
|
-
* Updates the status of the action on the action execution history panel
|
|
358
|
-
* @param status The new status to update to
|
|
359
|
-
* @param message Message to update the status with
|
|
360
|
-
*/
|
|
361
|
-
readonly updateStatus: SimplifiedStatusUpdateHandler;
|
|
362
|
-
/**
|
|
363
|
-
* Marks this context object as done and destroys it.
|
|
364
|
-
* In normal circumstances you SHOULD NOT BE CALLING THIS FUNCTION, as RCE already handles this for you.
|
|
365
|
-
* @param success Whether or not the action attempted that spawned this context was successful.
|
|
366
|
-
*/
|
|
367
|
-
done(success: boolean): void;
|
|
368
|
-
/**
|
|
369
|
-
* Clears request timers and cancel events before handler execution.
|
|
370
|
-
* This prevents timers/events from triggering during async handler execution.
|
|
371
|
-
* You usually shouldn't need to call this, but there is no harm in doing so one or more times.
|
|
372
|
-
*/
|
|
373
|
-
clearPreHandlerResources(): void;
|
|
374
|
-
}
|
|
375
|
-
//#endregion
|
|
376
|
-
//#region RCE cancel events
|
|
377
|
-
type ReasonGenerator<T = any> = string | ((context: RCEContext, data: T) => string);
|
|
378
|
-
interface RCECancelEventInitializer<T = any> {
|
|
379
|
-
/** The reason that will be used to send to Neuro-sama. */
|
|
380
|
-
reason?: ReasonGenerator<T>;
|
|
381
|
-
/** The reason that will be used to log the cancellation. */
|
|
382
|
-
logReason?: ReasonGenerator<T>;
|
|
383
|
-
/** Events that will trigger the cancellation. If the predicate is null, the event will always trigger the cancellation. */
|
|
384
|
-
events?: [Event<T>, ((data: T) => boolean | Promise<boolean>) | null][];
|
|
385
|
-
}
|
|
386
|
-
declare class RCECancelEvent<T = any> {
|
|
387
|
-
/**
|
|
388
|
-
* Publicly-exposed event.
|
|
389
|
-
*/
|
|
390
|
-
public readonly event: Event<T>;
|
|
391
|
-
/**
|
|
392
|
-
* Event disposable using {@link Disposable VS Code's Disposable class}.
|
|
393
|
-
*/
|
|
394
|
-
public readonly disposable: Disposable;
|
|
395
|
-
/**
|
|
396
|
-
* The reason that will be used to send to Neuro-sama.
|
|
397
|
-
*/
|
|
398
|
-
public readonly reason?: ReasonGenerator<T>;
|
|
399
|
-
/**
|
|
400
|
-
* The reason that will be used to log the cancellation.
|
|
401
|
-
*/
|
|
402
|
-
public readonly logReason?: ReasonGenerator<T>;
|
|
403
|
-
/**
|
|
404
|
-
* Fires the event.
|
|
405
|
-
* @param data The data to provide in the fire.
|
|
406
|
-
*/
|
|
407
|
-
public fire(data: T): void;
|
|
408
|
-
/**
|
|
409
|
-
* Creates an instance of RCECancelEvent.
|
|
410
|
-
* @param init Initialization parameters.
|
|
411
|
-
*/
|
|
412
|
-
constructor(init?: RCECancelEventInitializer<T>);
|
|
413
|
-
}
|
|
414
|
-
//#endregion
|
|
415
415
|
//#region src/companions/enum.d.ts
|
|
416
416
|
/**
|
|
417
417
|
* Const enum for companion contributions
|
|
@@ -467,6 +467,46 @@ declare const enum Contributions {
|
|
|
467
467
|
//#region src/companions/register.d.ts
|
|
468
468
|
declare class CompanionAPI extends Disposable {
|
|
469
469
|
constructor(data: CompanionMeta);
|
|
470
|
+
/**
|
|
471
|
+
* Utilities specific to creating actions.
|
|
472
|
+
* These are separated due to them returning Disposables that need to be handled better.
|
|
473
|
+
*/
|
|
474
|
+
actionUtils: {
|
|
475
|
+
files: {
|
|
476
|
+
/**
|
|
477
|
+
* Mark certain files with a preview effect.
|
|
478
|
+
* @param uris An array of files to mark. Direct inputs here are automatically assumed to be Neuro-safe, you must perform your own Neuro-safe checks at call time.
|
|
479
|
+
* @param promptString A string that describes what Neuro is about to do. Should match the scheme "Neuro wants to (do something)"
|
|
480
|
+
* @param absolutelyAllFiles For folders, bypass checking children for Neuro-safe path validation and highlights them anyways. Has no effect on files.
|
|
481
|
+
* @param noChildren For folders, does not mark its children in the preview effect. Has no effect on files.
|
|
482
|
+
* @returns A Disposable that, when its dispose method is called, unmarks the marked files.
|
|
483
|
+
*/
|
|
484
|
+
markPreviewFiles(uris: vscode.Uri[], promptString: string, absolutelyAllFiles = false, noChildren = false): Disposable;
|
|
485
|
+
};
|
|
486
|
+
edits: {
|
|
487
|
+
/**
|
|
488
|
+
* Set a preview cursor that matches the normal colour scheme for NeuroPilot's preview cursor.
|
|
489
|
+
* @param location A {@link Position} object where the cursor will be placed.
|
|
490
|
+
* @param prompt The prompt suffix that displays when hovering over the cursor. Must match the scheme "Neuro wants to (x)"
|
|
491
|
+
* @returns The {@link TextEditorDecorationType} that was used to create the highlight.
|
|
492
|
+
*/
|
|
493
|
+
setPreviewCursor(location: Position, prompt: string): TextEditorDecorationType;
|
|
494
|
+
/**
|
|
495
|
+
* Set a preview highlight that matches the normal colour scheme for NeuroPilot's preview highlights.
|
|
496
|
+
* @param startPosition A {@link Position} object that marks the start of the highlight.
|
|
497
|
+
* @param endPosition A {@link Position} object that marks the end of the highlight.
|
|
498
|
+
* @param prompt The prompt suffix that displays when hovering over the cursor. Must match the scheme "Neuro wants to (x)"
|
|
499
|
+
* @returns The {@link TextEditorDecorationType} that was used to create the highlight.
|
|
500
|
+
*/
|
|
501
|
+
setPreviewHighlight(startPosition: Position, endPosition: Position, prompt: string): TextEditorDecorationType;
|
|
502
|
+
};
|
|
503
|
+
/**
|
|
504
|
+
* Creates a new cancel event for RCE.
|
|
505
|
+
* Make sure to properly dispose of them when you no longer need the cancel events.
|
|
506
|
+
* If you are adding them to the cancel events array of an action, this should automatically be handled.
|
|
507
|
+
*/
|
|
508
|
+
CancelEvent: typeof RCECancelEvent;
|
|
509
|
+
};
|
|
470
510
|
/* Action registrations */
|
|
471
511
|
/**
|
|
472
512
|
* Add an action to NeuroPilot's actions registry.
|
|
@@ -691,6 +731,7 @@ interface ActionHandlerUtils {
|
|
|
691
731
|
interface ActionsListingUtils {
|
|
692
732
|
/**
|
|
693
733
|
* Get an action or an array of actions.
|
|
734
|
+
* @todo split into overloads for sanity
|
|
694
735
|
* @param action A string or array of strings of action names.
|
|
695
736
|
* @returns An action (if a string was provided), undefined (if a string was provided and nothing was found), or an array of actions (if nothing or an array was provided)
|
|
696
737
|
*/
|
|
@@ -737,7 +778,7 @@ interface DiffUtils {
|
|
|
737
778
|
* - Word diff: `/\w+|\r?\n|\s+|./g`
|
|
738
779
|
* - Character diff: `/.|\r?\n/g`
|
|
739
780
|
*/
|
|
740
|
-
calculateDiffRanges(startPosition: vscode.Position, oldText: string, newText: string, tokenRegExp?: RegExp): DiffRange[];
|
|
781
|
+
calculateDiffRanges(startPosition: vscode$1.Position, oldText: string, newText: string, tokenRegExp?: RegExp): DiffRange[];
|
|
741
782
|
/**
|
|
742
783
|
* Apply diff highlighting to a text editor based on the provided diff ranges.
|
|
743
784
|
* If you use {@link DiffUtils.calculateDiffRanges calculateDiffRanges} to calculate the
|
|
@@ -747,7 +788,38 @@ interface DiffUtils {
|
|
|
747
788
|
* If you use {@link DiffUtils.calculateDiffRanges calculateDiffRanges} to calculate these,
|
|
748
789
|
* the current text in the editor should be provided as the `newText` parameter.
|
|
749
790
|
*/
|
|
750
|
-
applyDiffHighlighting(editor: vscode.TextEditor, diffRanges: DiffRange[]): void;
|
|
791
|
+
applyDiffHighlighting(editor: vscode$1.TextEditor, diffRanges: DiffRange[]): void;
|
|
792
|
+
}
|
|
793
|
+
interface FilePathUtils {
|
|
794
|
+
/**
|
|
795
|
+
* Simplifies the file path
|
|
796
|
+
* @param fileName The path of the file
|
|
797
|
+
*/
|
|
798
|
+
simpleFileName(fileName: string): string;
|
|
799
|
+
/**
|
|
800
|
+
* Normalizes the path so it looks consistent when sending to Neuro.
|
|
801
|
+
* @param path The path to be normalized
|
|
802
|
+
*/
|
|
803
|
+
normalizePath(path: string): string;
|
|
804
|
+
/**
|
|
805
|
+
* Checks if a file is Neuro-safe, according to the rules the user has set in NeuroPilot's settings.
|
|
806
|
+
*
|
|
807
|
+
* It is recommended that you use this to check file paths if your actions are accessing a file for any reason.
|
|
808
|
+
* @param path The path to the file. This utility expects an *absolute* path.
|
|
809
|
+
*/
|
|
810
|
+
isPathNeuroSafe(path: string): boolean;
|
|
811
|
+
}
|
|
812
|
+
interface WorkspaceUtils {
|
|
813
|
+
/**
|
|
814
|
+
* Gets the full workspace uri that is normally targeted for operations.
|
|
815
|
+
* In multi-root workspaces this is the first open workspace.
|
|
816
|
+
*/
|
|
817
|
+
getWorkspaceUri(): vscode$1.Uri | undefined;
|
|
818
|
+
/**
|
|
819
|
+
* Gets the full workspace path that is normally targeted for operations.
|
|
820
|
+
* (Same as calling {@link WorkspaceUtils.getWorkspaceUri getWorkspaceUri}.fsPath)
|
|
821
|
+
*/
|
|
822
|
+
getWorkspacePath(): string | undefined;
|
|
751
823
|
}
|
|
752
824
|
interface Utils {
|
|
753
825
|
/**
|
|
@@ -767,18 +839,13 @@ interface Utils {
|
|
|
767
839
|
*/
|
|
768
840
|
diffs: DiffUtils;
|
|
769
841
|
/**
|
|
770
|
-
*
|
|
771
|
-
*
|
|
772
|
-
* It is recommended that you use this to check file paths if your actions are accessing a file for any reason.
|
|
773
|
-
* @param path The path to the file. This utility expects an *absolute* path.
|
|
842
|
+
* Utilities for working with file paths
|
|
774
843
|
*/
|
|
775
|
-
|
|
844
|
+
filePaths: FilePathUtils;
|
|
776
845
|
/**
|
|
777
|
-
*
|
|
778
|
-
* Make sure to properly dispose of them when you no longer need the cancel events.
|
|
779
|
-
* If you are adding them to the cancel events array of an action, this should automatically be handled.
|
|
846
|
+
* Utilities for getting the current workspace
|
|
780
847
|
*/
|
|
781
|
-
|
|
848
|
+
workspace: WorkspaceUtils;
|
|
782
849
|
}
|
|
783
850
|
interface NeuroPilotAPI {
|
|
784
851
|
/**
|
package/dist/index.d.mts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.mts","names":["JSONSchema7Object","ActionForcePriorityEnum","Action","NeuroClient","Range","PermissionLevel","DiffRangeType","RCECancelEvent","RCEContext","ActionStatus","CompanionAPI","ActionForceParams","COPILOT","AUTOPILOT","Record","state","query","ephemeral_context","actionNames","priority","overridePermissions","RCEAction","T","E","ActionValidationResult","Promise","RCEHandler","PromptGenerator","Thenable","displayName","validators","sync","context","async","cancelEvents","preview","dispose","handler","promptGenerator","defaultPermission","category","autoRegister","hidden","registerCondition","contextSetupHook","RCEHandlerReturns","ActionHandlerResult","success","message","retry","historyNote","ActionHandlerSuccess","InjectionBaseData","Omit","ActionsEventData","action","status","executionId","DiffLine","text","oldIndex","newIndex","DiffPlusLine","moved","Diff","lines","lineCountDeleted","lineCountInserted","DiffPlus","lineCountMoved","DiffRange","range","type","removedText","JSONSchema7Object","Disposable","Progress","Event","ActionValidationResult","RCEAction","ActionData","RCEStorage","Record","ActionStatus","RCELifecycleMetadata","events","preview","dispose","validatorResults","sync","async","setupHooks","SimplifiedStatusUpdateHandler","status","message","RCERequestState","Promise","NodeJS","Timeout","prompt","notificationVisible","attachNotification","increment","progress","resolve","resolved","interval","timeout","RCEContext","T","K","name","createdAt","data","action","forced","lifecycle","request","storage","updateStatus","done","success","clearPreHandlerResources","ReasonGenerator","context","RCECancelEventInitializer","reason","logReason","RCECancelEvent","event","disposable","fire","constructor","init","Disposable","Event","Position","ExtensionContext","Extension","ActionForceParams","ActionsEventData","InjectionBaseData","RCEAction","Contributions","CompanionAPI","CompanionMeta","Partial","constructor","data","addActions","actions","register","removeActions","registerAction","action","unregisterAction","reregisterAllActions","conservative","tryForceActions","params","strict","injectIntoAction","name","injection","force","onActionStatusChanged","sendContext","message","silent","addChangelog","version","changelog","getCursor","setCursor","location","onDidMoveCursor","extensionId","author","docs","contributes"],"sources":["../src/actions/enums.ts","../src/actions/types.d.ts","../src/actions/classes.d.ts","../src/companions/enum.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nDkC;;;;;;;;;;;;;EKiE7F,mBAAA,CAAoB,aAAA,EAAe,MAAA,CAAO,QAAA,EAAU,OAAA,UAAiB,OAAA,UAAiB,WAAA,GAAc,MAAA,GAAS,SAAA;;;;;;;;;;EAU7G,qBAAA,CAAsB,MAAA,EAAQ,MAAA,CAAO,UAAA,EAAY,UAAA,EAAY,SAAA;AAAA;AAAA,UAGvD,KAAA;;;;EAIN,gBAAA,EAAkB,qBAAA;;;;EAIlB,aAAA,EAAe,kBAAA;;;;EAIf,cAAA,EAAgB,mBAAA;;;;EAIhB,KAAA,EAAO,SAAA;;;;;;;EAOP,eAAA,CAAgB,IAAA;;;;;;EAMhB,WAAA,SAAoB,cAAA;AAAA;AAAA,UAGP,aAAA;;;;;EAKb,SAAA,SAAkB,YAAA;;;;EAIlB,KAAA,EAAO,KAAA;AAAA;AAAA,KAGN,aAAA,MAAmB,CAAA,GAAI,CAAA"}
|
|
1
|
+
{"version":3,"file":"index.d.mts","names":["JSONSchema7Object","Disposable","Progress","Event","ActionValidationResult","RCEAction","ActionData","RCEStorage","Record","ActionStatus","RCELifecycleMetadata","events","preview","dispose","validatorResults","sync","async","setupHooks","SimplifiedStatusUpdateHandler","status","message","RCERequestState","Promise","NodeJS","Timeout","prompt","notificationVisible","attachNotification","increment","progress","resolve","resolved","interval","timeout","RCEContext","T","K","name","createdAt","data","action","forced","lifecycle","request","storage","updateStatus","done","success","clearPreHandlerResources","ReasonGenerator","context","RCECancelEventInitializer","reason","logReason","RCECancelEvent","event","disposable","fire","constructor","init","JSONSchema7Object","ActionForcePriorityEnum","Action","NeuroClient","Range","PermissionLevel","DiffRangeType","RCECancelEvent","RCEContext","ActionStatus","CompanionAPI","ActionForceParams","COPILOT","AUTOPILOT","Record","state","query","ephemeral_context","actionNames","priority","overridePermissions","RCEAction","T","E","ActionValidationResult","Promise","RCEHandler","PromptGenerator","Thenable","displayName","validators","sync","context","async","cancelEvents","preview","dispose","handler","promptGenerator","defaultPermission","category","autoRegister","hidden","registerCondition","contextSetupHook","RCEHandlerReturns","ActionHandlerResult","success","message","retry","historyNote","ActionHandlerSuccess","InjectionBaseData","Omit","ActionsEventData","action","status","executionId","DiffLine","text","oldIndex","newIndex","DiffPlusLine","moved","Diff","lines","lineCountDeleted","lineCountInserted","DiffPlus","lineCountMoved","DiffRange","range","type","removedText","Disposable","Event","Position","ExtensionContext","Extension","Uri","TextEditorDecorationType","ActionForceParams","ActionsEventData","InjectionBaseData","RCEAction","Contributions","RCECancelEvent","CompanionAPI","CompanionMeta","vscode","Partial","constructor","data","actionUtils","files","markPreviewFiles","uris","promptString","absolutelyAllFiles","noChildren","edits","setPreviewCursor","location","prompt","setPreviewHighlight","startPosition","endPosition","CancelEvent","addActions","actions","register","removeActions","registerAction","action","unregisterAction","reregisterAllActions","conservative","tryForceActions","params","strict","injectIntoAction","name","injection","force","onActionStatusChanged","sendContext","message","silent","addChangelog","version","changelog","getCursor","setCursor","onDidMoveCursor","extensionId","author","docs","contributes"],"sources":["../src/actions/enums.ts","../src/actions/classes.d.ts","../src/actions/types.d.ts","../src/companions/enum.ts","../src/companions/register.d.ts","../src/companions/errors.ts","../src/index.ts"],"mappings":";;;;;;;mBACkB,eAAA;EACd,GAAA;EACA,OAAA;EACA,SAAA;AAAA;AAHJ;AAAA,mBAOkB,aAAA;EACd,KAAA;EACA,QAAA;EACA,OAAA;AAAA;;;;KCHQO,UAAAA,GAAaC,MAAAA;AAAAA,KAEbC,YAAAA;AAAAA,UAEKC,oBAAAA;EACbC,MAAAA,GAASV,UAAAA;EACTW,OAAAA;IAAYC,OAAAA;EAAAA;EACZC,gBAAAA;IACIC,IAAAA,GAAOX,sBAAAA;IACPY,KAAAA,GAAQZ,sBAAAA;EAAAA;EAEZa,UAAAA;AAAAA;AAAAA,KAGQC,6BAAAA,IAAiCC,MAAAA,EAAQV,YAAAA,EAAcW,OAAAA;AAAAA,UAElDC,eAAAA;;;AAhBjB;EAoBII,MAAAA;;;;EAIAC,mBAAAA;EAtBoB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