diff --git a/_specifications/lsp/3.18/language/codeAction.md b/_specifications/lsp/3.18/language/codeAction.md index 6d4a803d9..09ca91634 100644 --- a/_specifications/lsp/3.18/language/codeAction.md +++ b/_specifications/lsp/3.18/language/codeAction.md @@ -107,6 +107,19 @@ export interface CodeActionClientCapabilities { * @proposed */ documentationSupport?: boolean; + + /** + * Client supports the tag property on a code action. Clients + * supporting tags have to handle unknown tags gracefully. + * + * @since 3.18.0 - proposed + */ + tagSupport?: { + /** + * The tags supported by the client. + */ + valueSet: CodeActionTag[]; + }; } ``` @@ -412,6 +425,23 @@ export namespace CodeActionTriggerKind { export type CodeActionTriggerKind = 1 | 2; ``` +
+ +```typescript +/** + * Code action tags are extra annotations that tweak the behavior of a code action. + * + * @since 3.18.0 - proposed + */ +export namespace CodeActionTag { + /** + * Marks the code action as LLM-generated. + */ + export const LLMGenerated = 1; +} +export type CodeActionTag = 1; +``` + _Response_: * result: `(Command | CodeAction)[]` \| `null` where `CodeAction` is defined as follows: @@ -505,6 +535,13 @@ export interface CodeAction { * @since 3.16.0 */ data?: LSPAny; + + /** + * Tags for this code action. + * + * @since 3.18.0 - proposed + */ + tags?: CodeActionTag[]; } ``` * partial result: `(Command | CodeAction)[]` diff --git a/_specifications/lsp/3.18/metaModel/metaModel.json b/_specifications/lsp/3.18/metaModel/metaModel.json index 24905f41c..19970431f 100644 --- a/_specifications/lsp/3.18/metaModel/metaModel.json +++ b/_specifications/lsp/3.18/metaModel/metaModel.json @@ -5709,6 +5709,19 @@ "optional": true, "documentation": "A data entry field that is preserved on a code action between\na `textDocument/codeAction` and a `codeAction/resolve` request.\n\n@since 3.16.0", "since": "3.16.0" + }, + { + "name": "tags", + "type": { + "kind": "array", + "element": { + "kind": "reference", + "name": "CodeActionTag" + } + }, + "optional": true, + "documentation": "Tags for this code action.\n\n@since 3.18.0 - proposed", + "since": "3.18.0 - proposed" } ], "documentation": "A code action represents a change that can be performed in code, e.g. to fix a problem or\nto refactor code.\n\nA CodeAction must set either `edit` and/or a `command`. If both are supplied, the `edit` is applied first, then the `command` is executed." @@ -12511,10 +12524,38 @@ "documentation": "Whether the client supports documentation for a class of\ncode actions.\n\n@since 3.18.0\n@proposed", "since": "3.18.0", "proposed": true + }, + { + "name": "tagSupport", + "type": { + "kind": "reference", + "name": "CodeActionTagOptions" + }, + "optional": true, + "documentation": "Client supports the tag property on a code action. Clients\nsupporting tags have to handle unknown tags gracefully.\n\n@since 3.18.0 - proposed", + "since": "3.18.0 - proposed" } ], "documentation": "The Client Capabilities of a {@link CodeActionRequest}." }, + { + "name": "CodeActionTagOptions", + "properties": [ + { + "name": "valueSet", + "type": { + "kind": "array", + "element": { + "kind": "reference", + "name": "CodeActionTag" + } + }, + "documentation": "The tags supported by the client." + } + ], + "documentation": "@since 3.18.0 - proposed", + "since": "3.18.0 - proposed" + }, { "name": "CodeLensClientCapabilities", "properties": [ @@ -14602,6 +14643,22 @@ "supportsCustomValues": true, "documentation": "A set of predefined code action kinds" }, + { + "name": "CodeActionTag", + "type": { + "kind": "base", + "name": "uinteger" + }, + "values": [ + { + "name": "LLMGenerated", + "value": 1, + "documentation": "Marks the code action as LLM-generated." + } + ], + "documentation": "Code action tags are extra annotations that tweak the behavior of a code action.\n\n@since 3.18.0 - proposed", + "since": "3.18.0 - proposed" + }, { "name": "TraceValue", "type": {