@theia/plugin 1.56.0 → 1.57.0-next.112

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/src/theia.d.ts CHANGED
@@ -43,6 +43,7 @@ import './theia.proposed.profileContentHandlers';
43
43
  import './theia.proposed.resolvers';
44
44
  import './theia.proposed.scmValidation';
45
45
  import './theia.proposed.shareProvider';
46
+ import './theia.proposed.terminalCompletionProvider';
46
47
  import './theia.proposed.terminalQuickFixProvider';
47
48
  import './theia.proposed.textSearchProvider';
48
49
  import './theia.proposed.timeline';
@@ -2163,7 +2164,7 @@ export module '@theia/plugin' {
2163
2164
  /**
2164
2165
  * The icon path or {@link ThemeIcon} for the QuickPickItem.
2165
2166
  */
2166
- iconPath?: Uri | { light: Uri; dark: Uri } | ThemeIcon;
2167
+ iconPath?: IconPath;
2167
2168
 
2168
2169
  /**
2169
2170
  * A human-readable string which is rendered less prominent in the same line. Supports rendering of
@@ -2740,6 +2741,21 @@ export module '@theia/plugin' {
2740
2741
  private constructor(id: string, color?: ThemeColor);
2741
2742
  }
2742
2743
 
2744
+ /**
2745
+ * Represents an icon in the UI. This is either an uri, separate uris for the light- and dark-themes,
2746
+ * or a {@link ThemeIcon theme icon}.
2747
+ */
2748
+ export type IconPath = Uri | {
2749
+ /**
2750
+ * The icon path for the light theme.
2751
+ */
2752
+ light: Uri;
2753
+ /**
2754
+ * The icon path for the dark theme.
2755
+ */
2756
+ dark: Uri;
2757
+ } | ThemeIcon;
2758
+
2743
2759
  /**
2744
2760
  * Represents the state of a window.
2745
2761
  */
@@ -3520,7 +3536,7 @@ export module '@theia/plugin' {
3520
3536
  /**
3521
3537
  * The icon path or {@link ThemeIcon} for the terminal.
3522
3538
  */
3523
- iconPath?: Uri | { light: Uri; dark: Uri } | ThemeIcon;
3539
+ iconPath?: IconPath;
3524
3540
 
3525
3541
  /**
3526
3542
  * The icon {@link ThemeColor} for the terminal.
@@ -3640,7 +3656,7 @@ export module '@theia/plugin' {
3640
3656
  /**
3641
3657
  * The icon path or {@link ThemeIcon} for the terminal.
3642
3658
  */
3643
- iconPath?: Uri | { light: Uri; dark: Uri } | ThemeIcon;
3659
+ iconPath?: IconPath;
3644
3660
 
3645
3661
  /**
3646
3662
  * The icon {@link ThemeColor} for the terminal.
@@ -6227,7 +6243,7 @@ export module '@theia/plugin' {
6227
6243
  /**
6228
6244
  * Icon for the button.
6229
6245
  */
6230
- readonly iconPath: Uri | { light: Uri; dark: Uri } | ThemeIcon;
6246
+ readonly iconPath: IconPath;
6231
6247
 
6232
6248
  /**
6233
6249
  * An optional tooltip.
@@ -6841,7 +6857,7 @@ export module '@theia/plugin' {
6841
6857
  * When `falsy`, {@link ThemeIcon.Folder Folder Theme Icon} is assigned, if item is collapsible otherwise {@link ThemeIcon.File File Theme Icon}.
6842
6858
  * When a {@link ThemeIcon ThemeIcon} is specified, icon is derived from the current file icon theme for the specified theme icon using {@link TreeItem.resourceUri resourceUri} (if provided).
6843
6859
  */
6844
- iconPath?: string | Uri | { light: string | Uri; dark: string | Uri } | ThemeIcon;
6860
+ iconPath?: string | IconPath;
6845
6861
 
6846
6862
  /**
6847
6863
  * A human readable string which is rendered less prominent.
@@ -10290,7 +10306,7 @@ export module '@theia/plugin' {
10290
10306
  * @return An array of commands, quick fixes, or refactorings or a thenable of such. The lack of a result can be
10291
10307
  * signaled by returning `undefined`, `null`, or an empty array.
10292
10308
  */
10293
- provideCodeActions(document: TextDocument, range: Range | Selection, context: CodeActionContext, token: CancellationToken): ProviderResult<(Command | T)[]>;
10309
+ provideCodeActions(document: TextDocument, range: Range | Selection, context: CodeActionContext, token: CancellationToken): ProviderResult<Array<Command | T>>;
10294
10310
 
10295
10311
  /**
10296
10312
  * Given a code action fill in its `edit`-property. Changes to
@@ -10612,7 +10628,7 @@ export module '@theia/plugin' {
10612
10628
  /**
10613
10629
  * The icon path or {@link ThemeIcon ThemeIcon} for the edit.
10614
10630
  */
10615
- iconPath?: Uri | { light: Uri; dark: Uri } | ThemeIcon;
10631
+ iconPath?: IconPath;
10616
10632
  }
10617
10633
 
10618
10634
  /**
@@ -13165,7 +13181,7 @@ export module '@theia/plugin' {
13165
13181
  * @param args The command arguments.
13166
13182
  * @param options Optional options for the started the shell.
13167
13183
  */
13168
- constructor(command: string | ShellQuotedString, args: (string | ShellQuotedString)[], options?: ShellExecutionOptions);
13184
+ constructor(command: string | ShellQuotedString, args: Array<string | ShellQuotedString>, options?: ShellExecutionOptions);
13169
13185
 
13170
13186
  /**
13171
13187
  * The shell command line. Is `undefined` if created with a command and arguments.
@@ -16547,6 +16563,30 @@ export module '@theia/plugin' {
16547
16563
  */
16548
16564
  loadDetailedCoverage?: (testRun: TestRun, fileCoverage: FileCoverage, token: CancellationToken) => Thenable<FileCoverageDetail[]>;
16549
16565
 
16566
+ /**
16567
+ * An extension-provided function that provides detailed statement and
16568
+ * function-level coverage for a single test in a file. This is the per-test
16569
+ * sibling of {@link TestRunProfile.loadDetailedCoverage}, called only if
16570
+ * a test item is provided in {@link FileCoverage.includesTests} and only
16571
+ * for files where such data is reported.
16572
+ *
16573
+ * Often {@link TestRunProfile.loadDetailedCoverage} will be called first
16574
+ * when a user opens a file, and then this method will be called if they
16575
+ * drill down into specific per-test coverage information. This method
16576
+ * should then return coverage data only for constructs the given test item
16577
+ * executed during the test run.
16578
+ *
16579
+ * The {@link FileCoverage} object passed to this function is the same
16580
+ * instance emitted on {@link TestRun.addCoverage} calls associated with this profile.
16581
+ *
16582
+ * @param testRun The test run that generated the coverage data.
16583
+ * @param fileCoverage The file coverage object to load detailed coverage for.
16584
+ * @param fromTestItem The test item to request coverage information for.
16585
+ * @param token A cancellation token that indicates the operation should be cancelled.
16586
+ * @stubbed
16587
+ */
16588
+ loadDetailedCoverageForTest?: (testRun: TestRun, fileCoverage: FileCoverage, fromTestItem: TestItem, token: CancellationToken) => Thenable<FileCoverageDetail[]>;
16589
+
16550
16590
  /**
16551
16591
  * Deletes the run profile.
16552
16592
  */
@@ -17141,6 +17181,13 @@ export module '@theia/plugin' {
17141
17181
  */
17142
17182
  declarationCoverage?: TestCoverageCount;
17143
17183
 
17184
+ /**
17185
+ * A list of {@link TestItem test cases} that generated coverage in this
17186
+ * file. If set, then {@link TestRunProfile.loadDetailedCoverageForTest}
17187
+ * should also be defined in order to retrieve detailed coverage information.
17188
+ */
17189
+ includesTests?: TestItem[];
17190
+
17144
17191
  /**
17145
17192
  * Creates a {@link FileCoverage} instance with counts filled in from
17146
17193
  * the coverage details.
@@ -17156,12 +17203,14 @@ export module '@theia/plugin' {
17156
17203
  * used to represent line coverage.
17157
17204
  * @param branchCoverage Branch coverage information
17158
17205
  * @param declarationCoverage Declaration coverage information
17206
+ * @param includesTests Test cases included in this coverage report, see {@link includesTests}
17159
17207
  */
17160
17208
  constructor(
17161
17209
  uri: Uri,
17162
17210
  statementCoverage: TestCoverageCount,
17163
17211
  branchCoverage?: TestCoverageCount,
17164
17212
  declarationCoverage?: TestCoverageCount,
17213
+ includesTests?: TestItem[],
17165
17214
  );
17166
17215
  }
17167
17216
 
@@ -17277,31 +17326,37 @@ export module '@theia/plugin' {
17277
17326
  *
17278
17327
  * *Note* that the {@link ChatParticipant.name name} of the participant and the {@link ChatCommand.name command}
17279
17328
  * are not part of the prompt.
17329
+ * @stubbed
17280
17330
  */
17281
17331
  readonly prompt: string;
17282
17332
 
17283
17333
  /**
17284
17334
  * The id of the chat participant to which this request was directed.
17335
+ * @stubbed
17285
17336
  */
17286
17337
  readonly participant: string;
17287
17338
 
17288
17339
  /**
17289
17340
  * The name of the {@link ChatCommand command} that was selected for this request.
17341
+ * @stubbed
17290
17342
  */
17291
17343
  readonly command?: string;
17292
17344
 
17293
17345
  /**
17294
17346
  * The references that were used in this message.
17347
+ * @stubbed
17295
17348
  */
17296
17349
  readonly references: ChatPromptReference[];
17297
17350
 
17298
17351
  /**
17299
17352
  * The list of tools were attached to this request.
17353
+ * @stubbed
17300
17354
  */
17301
17355
  readonly toolReferences: readonly ChatLanguageModelToolReference[];
17302
17356
 
17303
17357
  /**
17304
17358
  * @hidden
17359
+ * @stubbed
17305
17360
  */
17306
17361
  private constructor(prompt: string, command: string | undefined, references: ChatPromptReference[], participant: string, toolReferences: ChatLanguageModelToolReference[]);
17307
17362
  }
@@ -17313,21 +17368,25 @@ export module '@theia/plugin' {
17313
17368
  export class ChatResponseTurn {
17314
17369
  /**
17315
17370
  * The content that was received from the chat participant. Only the stream parts that represent actual content (not metadata) are represented.
17371
+ * @stubbed
17316
17372
  */
17317
17373
  readonly response: ReadonlyArray<ChatResponseMarkdownPart | ChatResponseFileTreePart | ChatResponseAnchorPart | ChatResponseCommandButtonPart>;
17318
17374
 
17319
17375
  /**
17320
17376
  * The result that was received from the chat participant.
17377
+ * @stubbed
17321
17378
  */
17322
17379
  readonly result: ChatResult;
17323
17380
 
17324
17381
  /**
17325
17382
  * The id of the chat participant that this response came from.
17383
+ * @stubbed
17326
17384
  */
17327
17385
  readonly participant: string;
17328
17386
 
17329
17387
  /**
17330
17388
  * The name of the command that this response came from.
17389
+ * @stubbed
17331
17390
  */
17332
17391
  readonly command?: string;
17333
17392
 
@@ -17344,6 +17403,7 @@ export module '@theia/plugin' {
17344
17403
  export interface ChatContext {
17345
17404
  /**
17346
17405
  * All of the chat messages so far in the current chat session. Currently, only chat messages for the current participant are included.
17406
+ * @stubbed
17347
17407
  */
17348
17408
  readonly history: ReadonlyArray<ChatRequestTurn | ChatResponseTurn>;
17349
17409
  }
@@ -17355,11 +17415,13 @@ export module '@theia/plugin' {
17355
17415
  export interface ChatErrorDetails {
17356
17416
  /**
17357
17417
  * An error message that is shown to the user.
17418
+ * @stubbed
17358
17419
  */
17359
17420
  message: string;
17360
17421
 
17361
17422
  /**
17362
17423
  * If set to true, the response will be partly blurred out.
17424
+ * @stubbed
17363
17425
  */
17364
17426
  responseIsFiltered?: boolean;
17365
17427
  }
@@ -17371,11 +17433,13 @@ export module '@theia/plugin' {
17371
17433
  export interface ChatResult {
17372
17434
  /**
17373
17435
  * If the request resulted in an error, this property defines the error details.
17436
+ * @stubbed
17374
17437
  */
17375
17438
  errorDetails?: ChatErrorDetails;
17376
17439
 
17377
17440
  /**
17378
17441
  * Arbitrary metadata for this result. Can be anything, but must be JSON-stringifyable.
17442
+ * @stubbed
17379
17443
  */
17380
17444
  readonly metadata?: { readonly [key: string]: any };
17381
17445
  }
@@ -17403,11 +17467,13 @@ export module '@theia/plugin' {
17403
17467
  /**
17404
17468
  * The ChatResult for which the user is providing feedback.
17405
17469
  * This object has the same properties as the result returned from the participant callback, including `metadata`, but is not the same instance.
17470
+ * @stubbed
17406
17471
  */
17407
17472
  readonly result: ChatResult;
17408
17473
 
17409
17474
  /**
17410
17475
  * The kind of feedback that was received.
17476
+ * @stubbed
17411
17477
  */
17412
17478
  readonly kind: ChatResultFeedbackKind;
17413
17479
  }
@@ -17419,22 +17485,26 @@ export module '@theia/plugin' {
17419
17485
  export interface ChatFollowup {
17420
17486
  /**
17421
17487
  * The message to send to the chat.
17488
+ * @stubbed
17422
17489
  */
17423
17490
  prompt: string;
17424
17491
 
17425
17492
  /**
17426
17493
  * A title to show the user. The prompt will be shown by default, when this is unspecified.
17494
+ * @stubbed
17427
17495
  */
17428
17496
  label?: string;
17429
17497
 
17430
17498
  /**
17431
17499
  * By default, the followup goes to the same participant/command. But this property can be set to invoke a different participant by ID.
17432
17500
  * Followups can only invoke a participant that was contributed by the same extension.
17501
+ * @stubbed
17433
17502
  */
17434
17503
  participant?: string;
17435
17504
 
17436
17505
  /**
17437
17506
  * By default, the followup goes to the same participant/command. But this property can be set to invoke a different command.
17507
+ * @stubbed
17438
17508
  */
17439
17509
  command?: string;
17440
17510
  }
@@ -17467,30 +17537,25 @@ export module '@theia/plugin' {
17467
17537
  export interface ChatParticipant {
17468
17538
  /**
17469
17539
  * A unique ID for this participant.
17540
+ * @stubbed
17470
17541
  */
17471
17542
  readonly id: string;
17472
17543
 
17473
17544
  /**
17474
17545
  * An icon for the participant shown in UI.
17546
+ * @stubbed
17475
17547
  */
17476
- iconPath?: Uri | {
17477
- /**
17478
- * The icon path for the light theme.
17479
- */
17480
- light: Uri;
17481
- /**
17482
- * The icon path for the dark theme.
17483
- */
17484
- dark: Uri;
17485
- } | ThemeIcon;
17548
+ iconPath?: IconPath;
17486
17549
 
17487
17550
  /**
17488
17551
  * The handler for requests to this participant.
17552
+ * @stubbed
17489
17553
  */
17490
17554
  requestHandler: ChatRequestHandler;
17491
17555
 
17492
17556
  /**
17493
17557
  * This provider will be called once after each request to retrieve suggested followup questions.
17558
+ * @stubbed
17494
17559
  */
17495
17560
  followupProvider?: ChatFollowupProvider;
17496
17561
 
@@ -17500,11 +17565,13 @@ export module '@theia/plugin' {
17500
17565
  *
17501
17566
  * The passed {@link ChatResultFeedback.result result} is guaranteed to be the same instance that was
17502
17567
  * previously returned from this chat participant.
17568
+ * @stubbed
17503
17569
  */
17504
17570
  onDidReceiveFeedback: Event<ChatResultFeedback>;
17505
17571
 
17506
17572
  /**
17507
17573
  * Dispose this participant and free resources.
17574
+ * @stubbed
17508
17575
  */
17509
17576
  dispose(): void;
17510
17577
  }
@@ -17516,6 +17583,7 @@ export module '@theia/plugin' {
17516
17583
  export interface ChatPromptReference {
17517
17584
  /**
17518
17585
  * A unique identifier for this kind of reference.
17586
+ * @stubbed
17519
17587
  */
17520
17588
  readonly id: string;
17521
17589
 
@@ -17524,16 +17592,19 @@ export module '@theia/plugin' {
17524
17592
  *
17525
17593
  * *Note* that the indices take the leading `#`-character into account which means they can
17526
17594
  * used to modify the prompt as-is.
17595
+ * @stubbed
17527
17596
  */
17528
17597
  readonly range?: [start: number, end: number];
17529
17598
 
17530
17599
  /**
17531
17600
  * A description of this value that could be used in an LLM prompt.
17601
+ * @stubbed
17532
17602
  */
17533
17603
  readonly modelDescription?: string;
17534
17604
 
17535
17605
  /**
17536
17606
  * The value of this reference. The `string | Uri | Location` types are used today, but this could expand in the future.
17607
+ * @stubbed
17537
17608
  */
17538
17609
  readonly value: string | Uri | Location | unknown;
17539
17610
  }
@@ -17550,11 +17621,13 @@ export module '@theia/plugin' {
17550
17621
  *
17551
17622
  * *Note* that the {@link ChatParticipant.name name} of the participant and the {@link ChatCommand.name command}
17552
17623
  * are not part of the prompt.
17624
+ * @stubbed
17553
17625
  */
17554
17626
  readonly prompt: string;
17555
17627
 
17556
17628
  /**
17557
17629
  * The name of the {@link ChatCommand command} that was selected for this request.
17630
+ * @stubbed
17558
17631
  */
17559
17632
  readonly command: string | undefined;
17560
17633
 
@@ -17566,6 +17639,7 @@ export module '@theia/plugin' {
17566
17639
  * headings which contain the resolved values. References are sorted in reverse by their range
17567
17640
  * in the prompt. That means the last reference in the prompt is the first in this list. This simplifies
17568
17641
  * string-manipulation of the prompt.
17642
+ * @stubbed
17569
17643
  */
17570
17644
  readonly references: readonly ChatPromptReference[];
17571
17645
 
@@ -17576,18 +17650,21 @@ export module '@theia/plugin' {
17576
17650
  * {@link LanguageModelChatToolMode.Required} to force the language model to generate input for the tool. Then, the
17577
17651
  * participant can use {@link lm.invokeTool} to use the tool attach the result to its request for the user's prompt. The
17578
17652
  * tool may contribute useful extra context for the user's request.
17653
+ * @stubbed
17579
17654
  */
17580
17655
  readonly toolReferences: readonly ChatLanguageModelToolReference[];
17581
17656
 
17582
17657
  /**
17583
17658
  * A token that can be passed to {@link lm.invokeTool} when invoking a tool inside the context of handling a chat request.
17584
17659
  * This associates the tool invocation to a chat session.
17660
+ * @stubbed
17585
17661
  */
17586
17662
  readonly toolInvocationToken: ChatParticipantToolToken;
17587
17663
 
17588
17664
  /**
17589
17665
  * This is the model that is currently selected in the UI. Extensions can use this or use {@link chat.selectChatModels} to
17590
17666
  * pick another model. Don't hold onto this past the lifetime of the request.
17667
+ * @stubbed
17591
17668
  */
17592
17669
  readonly model: LanguageModelChat;
17593
17670
  }
@@ -17605,6 +17682,7 @@ export module '@theia/plugin' {
17605
17682
  *
17606
17683
  * @see {@link ChatResponseStream.push}
17607
17684
  * @param value A markdown string or a string that should be interpreted as markdown. The boolean form of {@link MarkdownString.isTrusted} is NOT supported.
17685
+ * @stubbed
17608
17686
  */
17609
17687
  markdown(value: string | MarkdownString): void;
17610
17688
 
@@ -17615,6 +17693,7 @@ export module '@theia/plugin' {
17615
17693
  *
17616
17694
  * @param value A uri or location.
17617
17695
  * @param title An optional title that is rendered with value.
17696
+ * @stubbed
17618
17697
  */
17619
17698
  anchor(value: Uri | Location, title?: string): void;
17620
17699
 
@@ -17623,6 +17702,7 @@ export module '@theia/plugin' {
17623
17702
  * `push(new ChatResponseCommandButtonPart(value, title))`.
17624
17703
  *
17625
17704
  * @param command A Command that will be executed when the button is clicked.
17705
+ * @stubbed
17626
17706
  */
17627
17707
  button(command: Command): void;
17628
17708
 
@@ -17632,6 +17712,7 @@ export module '@theia/plugin' {
17632
17712
  *
17633
17713
  * @param value File tree data.
17634
17714
  * @param baseUri The base uri to which this file tree is relative.
17715
+ * @stubbed
17635
17716
  */
17636
17717
  filetree(value: ChatResponseFileTree[], baseUri: Uri): void;
17637
17718
 
@@ -17640,6 +17721,7 @@ export module '@theia/plugin' {
17640
17721
  * `push(new ChatResponseProgressPart(value))`.
17641
17722
  *
17642
17723
  * @param value A progress message
17724
+ * @stubbed
17643
17725
  */
17644
17726
  progress(value: string): void;
17645
17727
 
@@ -17651,22 +17733,15 @@ export module '@theia/plugin' {
17651
17733
  *
17652
17734
  * @param value A uri or location
17653
17735
  * @param iconPath Icon for the reference shown in UI
17736
+ * @stubbed
17654
17737
  */
17655
- reference(value: Uri | Location, iconPath?: Uri | ThemeIcon | {
17656
- /**
17657
- * The icon path for the light theme.
17658
- */
17659
- light: Uri;
17660
- /**
17661
- * The icon path for the dark theme.
17662
- */
17663
- dark: Uri;
17664
- }): void;
17738
+ reference(value: Uri | Location, iconPath?: IconPath): void;
17665
17739
 
17666
17740
  /**
17667
17741
  * Pushes a part to this stream.
17668
17742
  *
17669
17743
  * @param part A response part, rendered or metadata
17744
+ * @stubbed
17670
17745
  */
17671
17746
  push(part: ChatResponsePart): void;
17672
17747
  }
@@ -17678,6 +17753,7 @@ export module '@theia/plugin' {
17678
17753
  export class ChatResponseMarkdownPart {
17679
17754
  /**
17680
17755
  * A markdown string or a string that should be interpreted as markdown.
17756
+ * @stubbed
17681
17757
  */
17682
17758
  value: MarkdownString;
17683
17759
 
@@ -17685,6 +17761,7 @@ export module '@theia/plugin' {
17685
17761
  * Create a new ChatResponseMarkdownPart.
17686
17762
  *
17687
17763
  * @param value A markdown string or a string that should be interpreted as markdown. The boolean form of {@link MarkdownString.isTrusted} is NOT supported.
17764
+ * @stubbed
17688
17765
  */
17689
17766
  constructor(value: string | MarkdownString);
17690
17767
  }
@@ -17696,11 +17773,13 @@ export module '@theia/plugin' {
17696
17773
  export interface ChatResponseFileTree {
17697
17774
  /**
17698
17775
  * The name of the file or directory.
17776
+ * @stubbed
17699
17777
  */
17700
17778
  name: string;
17701
17779
 
17702
17780
  /**
17703
17781
  * An array of child file trees, if the current file tree is a directory.
17782
+ * @stubbed
17704
17783
  */
17705
17784
  children?: ChatResponseFileTree[];
17706
17785
  }
@@ -17712,11 +17791,13 @@ export module '@theia/plugin' {
17712
17791
  export class ChatResponseFileTreePart {
17713
17792
  /**
17714
17793
  * File tree data.
17794
+ * @stubbed
17715
17795
  */
17716
17796
  value: ChatResponseFileTree[];
17717
17797
 
17718
17798
  /**
17719
17799
  * The base uri to which this file tree is relative
17800
+ * @stubbed
17720
17801
  */
17721
17802
  baseUri: Uri;
17722
17803
 
@@ -17724,6 +17805,7 @@ export module '@theia/plugin' {
17724
17805
  * Create a new ChatResponseFileTreePart.
17725
17806
  * @param value File tree data.
17726
17807
  * @param baseUri The base uri to which this file tree is relative.
17808
+ * @stubbed
17727
17809
  */
17728
17810
  constructor(value: ChatResponseFileTree[], baseUri: Uri);
17729
17811
  }
@@ -17735,11 +17817,13 @@ export module '@theia/plugin' {
17735
17817
  export class ChatResponseAnchorPart {
17736
17818
  /**
17737
17819
  * The target of this anchor.
17820
+ * @stubbed
17738
17821
  */
17739
17822
  value: Uri | Location;
17740
17823
 
17741
17824
  /**
17742
17825
  * An optional title that is rendered with value.
17826
+ * @stubbed
17743
17827
  */
17744
17828
  title?: string;
17745
17829
 
@@ -17747,6 +17831,7 @@ export module '@theia/plugin' {
17747
17831
  * Create a new ChatResponseAnchorPart.
17748
17832
  * @param value A uri or location.
17749
17833
  * @param title An optional title that is rendered with value.
17834
+ * @stubbed
17750
17835
  */
17751
17836
  constructor(value: Uri | Location, title?: string);
17752
17837
  }
@@ -17758,12 +17843,14 @@ export module '@theia/plugin' {
17758
17843
  export class ChatResponseProgressPart {
17759
17844
  /**
17760
17845
  * The progress message
17846
+ * @stubbed
17761
17847
  */
17762
17848
  value: string;
17763
17849
 
17764
17850
  /**
17765
17851
  * Create a new ChatResponseProgressPart.
17766
17852
  * @param value A progress message
17853
+ * @stubbed
17767
17854
  */
17768
17855
  constructor(value: string);
17769
17856
  }
@@ -17775,38 +17862,23 @@ export module '@theia/plugin' {
17775
17862
  export class ChatResponseReferencePart {
17776
17863
  /**
17777
17864
  * The reference target.
17865
+ * @stubbed
17778
17866
  */
17779
17867
  value: Uri | Location;
17780
17868
 
17781
17869
  /**
17782
17870
  * The icon for the reference.
17871
+ * @stubbed
17783
17872
  */
17784
- iconPath?: Uri | ThemeIcon | {
17785
- /**
17786
- * The icon path for the light theme.
17787
- */
17788
- light: Uri;
17789
- /**
17790
- * The icon path for the dark theme.
17791
- */
17792
- dark: Uri;
17793
- };
17873
+ iconPath?: IconPath;
17794
17874
 
17795
17875
  /**
17796
17876
  * Create a new ChatResponseReferencePart.
17797
17877
  * @param value A uri or location
17798
17878
  * @param iconPath Icon for the reference shown in UI
17879
+ * @stubbed
17799
17880
  */
17800
- constructor(value: Uri | Location, iconPath?: Uri | ThemeIcon | {
17801
- /**
17802
- * The icon path for the light theme.
17803
- */
17804
- light: Uri;
17805
- /**
17806
- * The icon path for the dark theme.
17807
- */
17808
- dark: Uri;
17809
- });
17881
+ constructor(value: Uri | Location, iconPath?: IconPath);
17810
17882
  }
17811
17883
 
17812
17884
  /**
@@ -17816,12 +17888,14 @@ export module '@theia/plugin' {
17816
17888
  export class ChatResponseCommandButtonPart {
17817
17889
  /**
17818
17890
  * The command that will be executed when the button is clicked.
17891
+ * @stubbed
17819
17892
  */
17820
17893
  value: Command;
17821
17894
 
17822
17895
  /**
17823
17896
  * Create a new ChatResponseCommandButtonPart.
17824
17897
  * @param value A Command that will be executed when the button is clicked.
17898
+ * @stubbed
17825
17899
  */
17826
17900
  constructor(value: Command);
17827
17901
  }
@@ -17875,41 +17949,47 @@ export module '@theia/plugin' {
17875
17949
  *
17876
17950
  * @param content The content of the message.
17877
17951
  * @param name The optional name of a user for the message.
17952
+ * @stubbed
17878
17953
  */
17879
- static User(content: string | (LanguageModelTextPart | LanguageModelToolResultPart)[], name?: string): LanguageModelChatMessage;
17954
+ static User(content: string | Array<LanguageModelTextPart | LanguageModelToolResultPart>, name?: string): LanguageModelChatMessage;
17880
17955
 
17881
17956
  /**
17882
17957
  * Utility to create a new assistant message.
17883
17958
  *
17884
17959
  * @param content The content of the message.
17885
17960
  * @param name The optional name of a user for the message.
17961
+ * @stubbed
17886
17962
  */
17887
- static Assistant(content: string | (LanguageModelTextPart | LanguageModelToolCallPart)[], name?: string): LanguageModelChatMessage;
17963
+ static Assistant(content: string | Array<(LanguageModelTextPart | LanguageModelToolCallPart)>, name?: string): LanguageModelChatMessage;
17888
17964
 
17889
17965
  /**
17890
17966
  * The role of this message.
17967
+ * @stubbed
17891
17968
  */
17892
17969
  role: LanguageModelChatMessageRole;
17893
17970
 
17894
17971
  /**
17895
17972
  * A string or heterogeneous array of things that a message can contain as content. Some parts may be message-type
17896
17973
  * specific for some models.
17974
+ * @stubbed
17897
17975
  */
17898
- content: (LanguageModelTextPart | LanguageModelToolResultPart | LanguageModelToolCallPart)[];
17976
+ content: Array<(LanguageModelTextPart | LanguageModelToolResultPart | LanguageModelToolCallPart)>;
17899
17977
 
17900
17978
  /**
17901
17979
  * The optional name of a user for this message.
17980
+ * @stubbed
17902
17981
  */
17903
17982
  name: string | undefined;
17904
17983
 
17905
17984
  /**
17906
17985
  * Create a new user message.
17986
+ * @stubbed
17907
17987
  *
17908
17988
  * @param role The role of the message.
17909
17989
  * @param content The content of the message.
17910
17990
  * @param name The optional name of a user for the message.
17911
17991
  */
17912
- constructor(role: LanguageModelChatMessageRole, content: string | (LanguageModelTextPart | LanguageModelToolResultPart | LanguageModelToolCallPart)[], name?: string);
17992
+ constructor(role: LanguageModelChatMessageRole, content: string | Array<LanguageModelTextPart | LanguageModelToolResultPart | LanguageModelToolCallPart>, name?: string);
17913
17993
  }
17914
17994
 
17915
17995
  /**
@@ -17950,6 +18030,7 @@ export module '@theia/plugin' {
17950
18030
  * console.error(e);
17951
18031
  * }
17952
18032
  * ```
18033
+ * @stubbed
17953
18034
  */
17954
18035
  stream: AsyncIterable<LanguageModelTextPart | LanguageModelToolCallPart | unknown>;
17955
18036
 
@@ -17957,6 +18038,7 @@ export module '@theia/plugin' {
17957
18038
  * This is equivalent to filtering everything except for text parts from a {@link LanguageModelChatResponse.stream}.
17958
18039
  *
17959
18040
  * @see {@link LanguageModelChatResponse.stream}
18041
+ * @stubbed
17960
18042
  */
17961
18043
  text: AsyncIterable<string>;
17962
18044
  }
@@ -17971,34 +18053,40 @@ export module '@theia/plugin' {
17971
18053
 
17972
18054
  /**
17973
18055
  * Human-readable name of the language model.
18056
+ * @stubbed
17974
18057
  */
17975
18058
  readonly name: string;
17976
18059
 
17977
18060
  /**
17978
18061
  * Opaque identifier of the language model.
18062
+ * @stubbed
17979
18063
  */
17980
18064
  readonly id: string;
17981
18065
 
17982
18066
  /**
17983
18067
  * A well-known identifier of the vendor of the language model. An example is `copilot`, but
17984
18068
  * values are defined by extensions contributing chat models and need to be looked up with them.
18069
+ * @stubbed
17985
18070
  */
17986
18071
  readonly vendor: string;
17987
18072
 
17988
18073
  /**
17989
18074
  * Opaque family-name of the language model. Values might be `gpt-3.5-turbo`, `gpt4`, `phi2`, or `llama`
17990
18075
  * but they are defined by extensions contributing languages and subject to change.
18076
+ * @stubbed
17991
18077
  */
17992
18078
  readonly family: string;
17993
18079
 
17994
18080
  /**
17995
18081
  * Opaque version string of the model. This is defined by the extension contributing the language model
17996
18082
  * and subject to change.
18083
+ * @stubbed
17997
18084
  */
17998
18085
  readonly version: string;
17999
18086
 
18000
18087
  /**
18001
18088
  * The maximum number of tokens that can be sent to the model in a single request.
18089
+ * @stubbed
18002
18090
  */
18003
18091
  readonly maxInputTokens: number;
18004
18092
 
@@ -18026,6 +18114,7 @@ export module '@theia/plugin' {
18026
18114
  * @param options Options that control the request.
18027
18115
  * @param token A cancellation token which controls the request. See {@link CancellationTokenSource} for how to create one.
18028
18116
  * @returns A thenable that resolves to a {@link LanguageModelChatResponse}. The promise will reject when the request couldn't be made.
18117
+ * @stubbed
18029
18118
  */
18030
18119
  sendRequest(messages: LanguageModelChatMessage[], options?: LanguageModelChatRequestOptions, token?: CancellationToken): Thenable<LanguageModelChatResponse>;
18031
18120
 
@@ -18034,6 +18123,7 @@ export module '@theia/plugin' {
18034
18123
  * @param text A string or a message instance.
18035
18124
  * @param token Optional cancellation token. See {@link CancellationTokenSource} for how to create one.
18036
18125
  * @returns A thenable that resolves to the number of tokens.
18126
+ * @stubbed
18037
18127
  */
18038
18128
  countTokens(text: string | LanguageModelChatMessage, token?: CancellationToken): Thenable<number>;
18039
18129
  }
@@ -18049,24 +18139,28 @@ export module '@theia/plugin' {
18049
18139
  /**
18050
18140
  * A vendor of language models.
18051
18141
  * @see {@link LanguageModelChat.vendor}
18142
+ * @stubbed
18052
18143
  */
18053
18144
  vendor?: string;
18054
18145
 
18055
18146
  /**
18056
18147
  * A family of language models.
18057
18148
  * @see {@link LanguageModelChat.family}
18149
+ * @stubbed
18058
18150
  */
18059
18151
  family?: string;
18060
18152
 
18061
18153
  /**
18062
18154
  * The version of a language model.
18063
18155
  * @see {@link LanguageModelChat.version}
18156
+ * @stubbed
18064
18157
  */
18065
18158
  version?: string;
18066
18159
 
18067
18160
  /**
18068
18161
  * The identifier of a language model.
18069
18162
  * @see {@link LanguageModelChat.id}
18163
+ * @stubbed
18070
18164
  */
18071
18165
  id?: string;
18072
18166
  }
@@ -18085,16 +18179,19 @@ export module '@theia/plugin' {
18085
18179
  /**
18086
18180
  * The requestor does not have permissions to use this
18087
18181
  * language model
18182
+ * @stubbed
18088
18183
  */
18089
18184
  static NoPermissions(message?: string): LanguageModelError;
18090
18185
 
18091
18186
  /**
18092
18187
  * The requestor is blocked from using this language model.
18188
+ * @stubbed
18093
18189
  */
18094
18190
  static Blocked(message?: string): LanguageModelError;
18095
18191
 
18096
18192
  /**
18097
18193
  * The language model does not exist.
18194
+ * @stubbed
18098
18195
  */
18099
18196
  static NotFound(message?: string): LanguageModelError;
18100
18197
 
@@ -18104,6 +18201,7 @@ export module '@theia/plugin' {
18104
18201
  * Possible values are names of errors, like {@linkcode LanguageModelError.NotFound NotFound},
18105
18202
  * or `Unknown` for unspecified errors from the language model itself. In the latter case the
18106
18203
  * `cause`-property will contain the actual error.
18204
+ * @stubbed
18107
18205
  */
18108
18206
  readonly code: string;
18109
18207
  }
@@ -18118,12 +18216,14 @@ export module '@theia/plugin' {
18118
18216
 
18119
18217
  /**
18120
18218
  * A human-readable message that explains why access to a language model is needed and what feature is enabled by it.
18219
+ * @stubbed
18121
18220
  */
18122
18221
  justification?: string;
18123
18222
 
18124
18223
  /**
18125
18224
  * A set of options that control the behavior of the language model. These options are specific to the language model
18126
18225
  * and need to be lookup in the respective documentation.
18226
+ * @stubbed
18127
18227
  */
18128
18228
  modelOptions?: { [name: string]: any };
18129
18229
 
@@ -18137,11 +18237,13 @@ export module '@theia/plugin' {
18137
18237
  *
18138
18238
  * Then, the tool result can be provided to the LLM by creating an Assistant-type {@link LanguageModelChatMessage} with a
18139
18239
  * {@link LanguageModelToolCallPart}, followed by a User-type message with a {@link LanguageModelToolResultPart}.
18240
+ * @stubbed
18140
18241
  */
18141
18242
  tools?: LanguageModelChatTool[];
18142
18243
 
18143
18244
  /**
18144
18245
  * The tool-selecting mode to use. {@link LanguageModelChatToolMode.Auto} by default.
18246
+ * @stubbed
18145
18247
  */
18146
18248
  toolMode?: LanguageModelChatToolMode;
18147
18249
  }
@@ -18239,6 +18341,7 @@ export module '@theia/plugin' {
18239
18341
 
18240
18342
  /**
18241
18343
  * An event that fires when access information changes.
18344
+ * @stubbed
18242
18345
  */
18243
18346
  onDidChange: Event<void>;
18244
18347
 
@@ -18250,6 +18353,7 @@ export module '@theia/plugin' {
18250
18353
  * @param chat A language model chat object.
18251
18354
  * @return `true` if a request can be made, `false` if not, `undefined` if the language
18252
18355
  * model does not exist or consent hasn't been asked for.
18356
+ * @stubbed
18253
18357
  */
18254
18358
  canSendRequest(chat: LanguageModelChat): boolean | undefined;
18255
18359
 
@@ -18263,16 +18367,19 @@ export module '@theia/plugin' {
18263
18367
  export interface LanguageModelChatTool {
18264
18368
  /**
18265
18369
  * The name of the tool.
18370
+ * @stubbed
18266
18371
  */
18267
18372
  name: string;
18268
18373
 
18269
18374
  /**
18270
18375
  * The description of the tool.
18376
+ * @stubbed
18271
18377
  */
18272
18378
  description: string;
18273
18379
 
18274
18380
  /**
18275
18381
  * A JSON schema for the input this tool accepts.
18382
+ * @stubbed
18276
18383
  */
18277
18384
  inputSchema?: object;
18278
18385
  }
@@ -18301,16 +18408,19 @@ export module '@theia/plugin' {
18301
18408
  export class LanguageModelToolCallPart {
18302
18409
  /**
18303
18410
  * The ID of the tool call. This is a unique identifier for the tool call within the chat request.
18411
+ * @stubbed
18304
18412
  */
18305
18413
  callId: string;
18306
18414
 
18307
18415
  /**
18308
18416
  * The name of the tool to call.
18417
+ * @stubbed
18309
18418
  */
18310
18419
  name: string;
18311
18420
 
18312
18421
  /**
18313
18422
  * The input with which to call the tool.
18423
+ * @stubbed
18314
18424
  */
18315
18425
  input: object;
18316
18426
 
@@ -18320,6 +18430,7 @@ export module '@theia/plugin' {
18320
18430
  * @param callId The ID of the tool call.
18321
18431
  * @param name The name of the tool to call.
18322
18432
  * @param input The input with which to call the tool.
18433
+ * @stubbed
18323
18434
  */
18324
18435
  constructor(callId: string, name: string, input: object);
18325
18436
  }
@@ -18334,19 +18445,22 @@ export module '@theia/plugin' {
18334
18445
  * The ID of the tool call.
18335
18446
  *
18336
18447
  * *Note* that this should match the {@link LanguageModelToolCallPart.callId callId} of a tool call part.
18448
+ * @stubbed
18337
18449
  */
18338
18450
  callId: string;
18339
18451
 
18340
18452
  /**
18341
18453
  * The value of the tool result.
18454
+ * @stubbed
18342
18455
  */
18343
- content: (LanguageModelTextPart | LanguageModelPromptTsxPart | unknown)[];
18456
+ content: Array<LanguageModelTextPart | LanguageModelPromptTsxPart | unknown>;
18344
18457
 
18345
18458
  /**
18346
18459
  * @param callId The ID of the tool call.
18347
18460
  * @param content The content of the tool result.
18461
+ * @stubbed
18348
18462
  */
18349
- constructor(callId: string, content: (LanguageModelTextPart | LanguageModelPromptTsxPart | unknown)[]);
18463
+ constructor(callId: string, content: Array<(LanguageModelTextPart | LanguageModelPromptTsxPart | unknown)>);
18350
18464
  }
18351
18465
 
18352
18466
  /**
@@ -18356,12 +18470,14 @@ export module '@theia/plugin' {
18356
18470
  export class LanguageModelTextPart {
18357
18471
  /**
18358
18472
  * The text content of the part.
18473
+ * @stubbed
18359
18474
  */
18360
18475
  value: string;
18361
18476
 
18362
18477
  /**
18363
18478
  * Construct a text part with the given content.
18364
18479
  * @param value The text content of the part.
18480
+ * @stubbed
18365
18481
  */
18366
18482
  constructor(value: string);
18367
18483
  }
@@ -18374,12 +18490,14 @@ export module '@theia/plugin' {
18374
18490
  export class LanguageModelPromptTsxPart {
18375
18491
  /**
18376
18492
  * The value of the part.
18493
+ * @stubbed
18377
18494
  */
18378
18495
  value: unknown;
18379
18496
 
18380
18497
  /**
18381
18498
  * Construct a prompt-tsx part with the given content.
18382
18499
  * @param value The value of the part, the result of `renderPromptElementJSON` from `@vscode/prompt-tsx`.
18500
+ * @stubbed
18383
18501
  */
18384
18502
  constructor(value: unknown);
18385
18503
  }
@@ -18393,14 +18511,16 @@ export module '@theia/plugin' {
18393
18511
  * A list of tool result content parts. Includes `unknown` becauses this list may be extended with new content types in
18394
18512
  * the future.
18395
18513
  * @see {@link lm.invokeTool}.
18514
+ * @stubbed
18396
18515
  */
18397
- content: (LanguageModelTextPart | LanguageModelPromptTsxPart | unknown)[];
18516
+ content: Array<(LanguageModelTextPart | LanguageModelPromptTsxPart | unknown)>;
18398
18517
 
18399
18518
  /**
18400
18519
  * Create a LanguageModelToolResult
18401
18520
  * @param content A list of tool result content parts
18521
+ * @stubbed
18402
18522
  */
18403
- constructor(content: (LanguageModelTextPart | LanguageModelPromptTsxPart)[]);
18523
+ constructor(content: Array<(LanguageModelTextPart | LanguageModelPromptTsxPart)>);
18404
18524
  }
18405
18525
 
18406
18526
  /**
@@ -18424,18 +18544,21 @@ export module '@theia/plugin' {
18424
18544
  * confirmations will be shown.
18425
18545
  *
18426
18546
  * *Note* that a tool that invokes another tool during its invocation, can pass along the `toolInvocationToken` that it received.
18547
+ * @stubbed
18427
18548
  */
18428
18549
  toolInvocationToken: ChatParticipantToolToken | undefined;
18429
18550
 
18430
18551
  /**
18431
18552
  * The input with which to invoke the tool. The input must match the schema defined in
18432
18553
  * {@link LanguageModelToolInformation.inputSchema}
18554
+ * @stubbed
18433
18555
  */
18434
18556
  input: T;
18435
18557
 
18436
18558
  /**
18437
18559
  * Options to hint at how many tokens the tool should return in its response, and enable the tool to count tokens
18438
18560
  * accurately.
18561
+ * @stubbed
18439
18562
  */
18440
18563
  tokenizationOptions?: LanguageModelToolTokenizationOptions;
18441
18564
  }
@@ -18447,6 +18570,7 @@ export module '@theia/plugin' {
18447
18570
  export interface LanguageModelToolTokenizationOptions {
18448
18571
  /**
18449
18572
  * If known, the maximum number of tokens the tool should emit in its result.
18573
+ * @stubbed
18450
18574
  */
18451
18575
  tokenBudget: number;
18452
18576
 
@@ -18455,6 +18579,7 @@ export module '@theia/plugin' {
18455
18579
  * @param text A string.
18456
18580
  * @param token Optional cancellation token. See {@link CancellationTokenSource} for how to create one.
18457
18581
  * @returns A thenable that resolves to the number of tokens.
18582
+ * @stubbed
18458
18583
  */
18459
18584
  countTokens(text: string, token?: CancellationToken): Thenable<number>;
18460
18585
  }
@@ -18466,22 +18591,26 @@ export module '@theia/plugin' {
18466
18591
  export interface LanguageModelToolInformation {
18467
18592
  /**
18468
18593
  * A unique name for the tool.
18594
+ * @stubbed
18469
18595
  */
18470
18596
  readonly name: string;
18471
18597
 
18472
18598
  /**
18473
18599
  * A description of this tool that may be passed to a language model.
18600
+ * @stubbed
18474
18601
  */
18475
18602
  readonly description: string;
18476
18603
 
18477
18604
  /**
18478
18605
  * A JSON schema for the input this tool accepts.
18606
+ * @stubbed
18479
18607
  */
18480
18608
  readonly inputSchema: object | undefined;
18481
18609
 
18482
18610
  /**
18483
18611
  * A set of tags, declared by the tool, that roughly describe the tool's capabilities. A tool user may use these to filter
18484
18612
  * the set of tools to just ones that are relevant for the task at hand.
18613
+ * @stubbed
18485
18614
  */
18486
18615
  readonly tags: readonly string[];
18487
18616
  }
@@ -18493,6 +18622,7 @@ export module '@theia/plugin' {
18493
18622
  export interface LanguageModelToolInvocationPrepareOptions<T> {
18494
18623
  /**
18495
18624
  * The input that the tool is being invoked with.
18625
+ * @stubbed
18496
18626
  */
18497
18627
  input: T;
18498
18628
  }
@@ -18506,6 +18636,7 @@ export module '@theia/plugin' {
18506
18636
  * Invoke the tool with the given input and return a result.
18507
18637
  *
18508
18638
  * The provided {@link LanguageModelToolInvocationOptions.input} has been validated against the declared schema.
18639
+ * @stubbed
18509
18640
  */
18510
18641
  invoke(options: LanguageModelToolInvocationOptions<T>, token: CancellationToken): ProviderResult<LanguageModelToolResult>;
18511
18642
 
@@ -18516,6 +18647,7 @@ export module '@theia/plugin' {
18516
18647
  *
18517
18648
  * * *Note 1:* Must be free of side-effects.
18518
18649
  * * *Note 2:* A call to `prepareInvocation` is not necessarily followed by a call to `invoke`.
18650
+ * @stubbed
18519
18651
  */
18520
18652
  prepareInvocation?(options: LanguageModelToolInvocationPrepareOptions<T>, token: CancellationToken): ProviderResult<PreparedToolInvocation>;
18521
18653
  }
@@ -18528,11 +18660,13 @@ export module '@theia/plugin' {
18528
18660
  export interface LanguageModelToolConfirmationMessages {
18529
18661
  /**
18530
18662
  * The title of the confirmation message.
18663
+ * @stubbed
18531
18664
  */
18532
18665
  title: string;
18533
18666
 
18534
18667
  /**
18535
18668
  * The body of the confirmation message.
18669
+ * @stubbed
18536
18670
  */
18537
18671
  message: string | MarkdownString;
18538
18672
  }
@@ -18544,12 +18678,14 @@ export module '@theia/plugin' {
18544
18678
  export interface PreparedToolInvocation {
18545
18679
  /**
18546
18680
  * A customized progress message to show while the tool runs.
18681
+ * @stubbed
18547
18682
  */
18548
- invocationMessage?: string;
18683
+ invocationMessage?: string | MarkdownString;
18549
18684
 
18550
18685
  /**
18551
18686
  * The presence of this property indicates that the user should be asked to confirm before running the tool. The user
18552
18687
  * should be asked for confirmation for any tool that has a side-effect or may potentially be dangerous.
18688
+ * @stubbed
18553
18689
  */
18554
18690
  confirmationMessages?: LanguageModelToolConfirmationMessages;
18555
18691
  }
@@ -18562,6 +18698,7 @@ export module '@theia/plugin' {
18562
18698
  export interface ChatLanguageModelToolReference {
18563
18699
  /**
18564
18700
  * The tool name. Refers to a tool listed in {@link lm.tools}.
18701
+ * @stubbed
18565
18702
  */
18566
18703
  readonly name: string;
18567
18704
 
@@ -18571,6 +18708,7 @@ export module '@theia/plugin' {
18571
18708
  *
18572
18709
  * *Note* that the indices take the leading `#`-character into account which means they can be used to modify the prompt
18573
18710
  * as-is.
18711
+ * @stubbed
18574
18712
  */
18575
18713
  readonly range?: [start: number, end: number];
18576
18714
  }