mirror of
https://github.com/Microsoft/vscode
synced 2024-06-30 23:04:56 +00:00
contentTypes for tools
This commit is contained in:
parent
484cd68eff
commit
9d809f4def
14
src/vscode-dts/vscode.proposed.chatTools.d.ts
vendored
14
src/vscode-dts/vscode.proposed.chatTools.d.ts
vendored
|
@ -5,6 +5,15 @@
|
|||
|
||||
declare module 'vscode' {
|
||||
|
||||
export interface LanguageModelToolResult {
|
||||
/**
|
||||
* The result can contain arbitrary representations of the content. An example might be 'prompt-tsx' to indicate an element that can be rendered with the @vscode/prompt-tsx library.
|
||||
*/
|
||||
[contentType: string]: any;
|
||||
|
||||
string: string;
|
||||
}
|
||||
|
||||
export namespace lm {
|
||||
/**
|
||||
* Register a LanguageModelTool. The tool must also be registered in the package.json `languageModelTools` contribution point.
|
||||
|
@ -18,8 +27,9 @@ declare module 'vscode' {
|
|||
|
||||
/**
|
||||
* Invoke a tool with the given parameters.
|
||||
* Could request a set of contentTypes to be returned so they don't all need to be computed.
|
||||
*/
|
||||
export function invokeTool(toolId: string, parameters: Object, token: CancellationToken): Thenable<string>;
|
||||
export function invokeTool(toolId: string, parameters: Object, token: CancellationToken): Thenable<LanguageModelToolResult>;
|
||||
}
|
||||
|
||||
export interface LanguageModelToolDescription {
|
||||
|
@ -30,6 +40,6 @@ declare module 'vscode' {
|
|||
}
|
||||
|
||||
export interface LanguageModelTool {
|
||||
invoke(parameters: any, token: CancellationToken): Thenable<string>;
|
||||
invoke(parameters: any, token: CancellationToken): Thenable<LanguageModelToolResult>;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue
Block a user