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
The previous implementation incorrectly prevented joining list
continuations when the next line was a list item at the same level.
This caused wrapped list content to not be unwrapped properly.
Changes:
- Remove incorrect check that prevented joining based on next line
- Remove unused getNextNonBlankLineInfo function
- Update test names and expectations to reflect correct behavior:
- List continuations should be unwrapped (joined), not preserved
- Renamed 'preserves list item continuations' to 'unwraps list item
continuations'
- Renamed 'unwraps regular text but preserves list item continuations'
to 'unwraps regular text and list item continuations'
- Fixed expected output for nested list content tests
Co-authored-by: alexr00 <38270282+alexr00@users.noreply.github.com>
Copy file name to clipboardExpand all lines: src/@types/vscode.proposed.chatContextProvider.d.ts
+99-13Lines changed: 99 additions & 13 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.
25
54
* @param id Unique identifier for the provider.
26
55
* @param provider The chat context provider.
@@ -32,12 +61,21 @@ declare module 'vscode' {
32
61
exportinterfaceChatContextItem{
33
62
/**
34
63
* Icon for the context item.
64
+
* - If `icon` is not defined, no icon is shown.
65
+
* - If `icon` is defined and is a file or folder icon, the icon is derived from {@link resourceUri} if `resourceUri` is defined.
66
+
* - Otherwise, `icon` is used.
35
67
*/
36
-
icon: ThemeIcon;
68
+
icon?: ThemeIcon;
37
69
/**
38
70
* Human readable label for the context item.
71
+
* If not set, the label is derived from {@link resourceUri}.
72
+
*/
73
+
label?: string;
74
+
/**
75
+
* A resource URI for the context item.
76
+
* Used to derive the {@link label} and {@link icon} if they are not set.
39
77
*/
40
-
label: string;
78
+
resourceUri?: Uri;
41
79
/**
42
80
* An optional description of the context item, e.g. to describe the item to the language model.
* 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 +144,51 @@ declare module 'vscode' {
94
144
* @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.
150
+
* If a chat context item is provided without a `value`, this method is called to resolve the `value` for the item.
0 commit comments