You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: src/@types/vscode.proposed.chatContextProvider.d.ts
+88-11Lines changed: 88 additions & 11 deletions
Original file line number
Diff line number
Diff line change
@@ -11,16 +11,45 @@ declare module 'vscode' {
11
11
exportnamespacechat{
12
12
13
13
/**
14
-
* Register a chat context provider. Chat context can be provided:
15
-
* - For a resource. Make sure to pass a selector that matches the resource you want to provide context for.
16
-
* Providers registered without a selector will not be called for resource-based context.
17
-
* - Explicitly. These context items are shown as options when the user explicitly attaches context.
14
+
* Register a chat workspace context provider. Workspace context is automatically included in all chat requests.
18
15
*
19
16
* To ensure your extension is activated when chat context is requested, make sure to include the following activations events:
20
17
* - If your extension implements `provideWorkspaceChatContext` or `provideChatContextForResource`, find an activation event which is a good signal to activate.
* Register a chat explicit context provider. Explicit context items are shown as options when the user explicitly attaches context.
28
+
*
29
+
* To ensure your extension is activated when chat context is requested, make sure to include the `onChatContextProvider:<id>` activation event in your `package.json`.
30
+
*
31
+
* @param id Unique identifier for the provider.
32
+
* @param provider The chat explicit context provider.
* Register a chat resource context provider. Resource context is provided for a specific resource.
38
+
* Make sure to pass a selector that matches the resource you want to provide context for.
39
+
*
40
+
* To ensure your extension is activated when chat context is requested, make sure to include the `onChatContextProvider:<id>` activation event in your `package.json`.
41
+
*
42
+
* @param selector Document selector to filter which resources the provider is called for.
43
+
* @param id Unique identifier for the provider.
44
+
* @param provider The chat resource context provider.
* @deprecated Use {@link registerChatWorkspaceContextProvider}, {@link registerChatExplicitContextProvider}, or {@link registerChatResourceContextProvider} instead.
52
+
*
24
53
* @param selector Optional document selector to filter which resources the provider is called for. If omitted, the provider will only be called for explicit context requests.
* Provide a list of chat context items that a user can choose from. These context items are shown as options when the user explicitly attaches context.
* Given a particular resource, provide a chat context item for it. This is used for implicit context (see the settings `chat.implicitContext.enabled` and `chat.implicitContext.suggestedContext`).
@@ -94,15 +135,51 @@ declare module 'vscode' {
94
135
* @param options Options include the resource for which to provide context.
* If a chat context item is provided without a `value`, from either of the `provide` methods, this method is called to resolve the `value` for the item.
141
+
* If a chat context item is provided without a `value`, this method is called to resolve the `value` for the item.
0 commit comments