Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
microsoft
GitHub Repository: microsoft/vscode
Path: blob/main/src/vscode-dts/vscode.proposed.chatReferenceBinaryData.d.ts
3290 views
1
/*---------------------------------------------------------------------------------------------
2
* Copyright (c) Microsoft Corporation. All rights reserved.
3
* Licensed under the MIT License. See License.txt in the project root for license information.
4
*--------------------------------------------------------------------------------------------*/
5
6
declare module 'vscode' {
7
8
export interface ChatPromptReference {
9
/**
10
* The value of this reference. The `string | Uri | Location` types are used today, but this could expand in the future.
11
*/
12
readonly value: string | Uri | Location | ChatReferenceBinaryData | unknown;
13
}
14
15
export class ChatReferenceBinaryData {
16
/**
17
* The MIME type of the binary data.
18
*/
19
readonly mimeType: string;
20
21
/**
22
* Retrieves the binary data of the reference. This is primarily used to receive image attachments from the chat.
23
* @returns A promise that resolves to the binary data as a Uint8Array.
24
*/
25
data(): Thenable<Uint8Array>;
26
27
/**
28
* Retrieves a URI reference to the binary data, if available.
29
*/
30
readonly reference?: Uri;
31
32
/**
33
* @param mimeType The MIME type of the binary data.
34
* @param data The binary data of the reference.
35
*/
36
constructor(mimeType: string, data: () => Thenable<Uint8Array>);
37
}
38
}
39
40