@@ -1721,7 +1721,7 @@ type Diagnostic =
17211721
17221722 /// A human-readable string describing the source of this
17231723 /// diagnostic, e.g. 'typescript' or 'super lint'.
1724- Source: string
1724+ Source: string option
17251725
17261726 /// The diagnostic's message.
17271727 Message: string
@@ -1939,11 +1939,27 @@ type ColorPresentation =
19391939 /// selecting this color presentation. Edits must not overlap with the main edit nor with themselves.
19401940 AdditionalTextEdits: TextEdit [] option }
19411941
1942+ type CodeActionKind = string
1943+
1944+ type CodeActionTriggerKind =
1945+ /// Code actions were explicitly requested by the user or by an extension.
1946+ | Invoked = 1
1947+ /// Code actions were requested automatically.
1948+ /// This typically happens when current selection in a file changes, but can also be triggered when file content changes.
1949+ | Automatic = 2
1950+
19421951/// Contains additional diagnostic information about the context in which
19431952/// a code action is run.
19441953type CodeActionContext =
19451954 { /// An array of diagnostics.
1946- Diagnostics: Diagnostic [] }
1955+ Diagnostics: Diagnostic []
1956+ /// Requested kind of actions to return.
1957+ /// Actions not of this kind are filtered out by the client before being
1958+ /// shown. So servers can omit computing them.
1959+ Only: CodeActionKind [] option
1960+ /// The reason why code actions were requested.
1961+ /// @since 3.17.0
1962+ TriggerKind: CodeActionTriggerKind option }
19471963
19481964/// Params for the CodeActionRequest
19491965type CodeActionParams =
0 commit comments