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
* 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.
18
+
*
19
+
* To ensure your extension is activated when chat context is requested, make sure to include the `onChatContextProvider:<id>` activation event in your `package.json`.
20
+
*
21
+
* @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.
30
64
* Chat context items can be provided without a `value`, as the `value` can be resolved later using `resolveChatContext`.
31
65
* `resolveChatContext` is only called for items that do not have a `value`.
* 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.
constmodelDescription=this._reposManager.folderManagers.length>1 ? 'Information about one of the current repositories. You can use this information when you need to calculate diffs or compare changes with the default branch' : 'Information about the current repository. You can use this information when you need to calculate diffs or compare changes with the default branch';
Current branch: ${folderManager.repository.state.HEAD?.name??'unknown'}
71
+
Default branch: ${defaults.base}`;
72
+
if(folderManager.activePullRequest){
73
+
value=`${value}
74
+
Active pull request (may not be the same as open pull request): #${folderManager.activePullRequest.number}${folderManager.activePullRequest.html_url}`;
0 commit comments