Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
microsoft
GitHub Repository: microsoft/vscode
Path: blob/main/src/vs/workbench/api/common/extHostHooks.ts
5241 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
import type * as vscode from 'vscode';
7
import { CancellationToken } from '../../../base/common/cancellation.js';
8
import { createDecorator } from '../../../platform/instantiation/common/instantiation.js';
9
import { HookTypeValue } from '../../contrib/chat/common/promptSyntax/hookSchema.js';
10
import { ExtHostHooksShape } from './extHost.protocol.js';
11
12
export const IExtHostHooks = createDecorator<IExtHostHooks>('IExtHostHooks');
13
14
export interface IChatHookExecutionOptions {
15
readonly input?: unknown;
16
readonly toolInvocationToken: unknown;
17
}
18
19
export interface IExtHostHooks extends ExtHostHooksShape {
20
executeHook(hookType: HookTypeValue, options: IChatHookExecutionOptions, token?: CancellationToken): Promise<vscode.ChatHookResult[]>;
21
}
22
23