Skip to content

Commit 7859c0b

Browse files
committed
address feedback to use CodeActioTag
1 parent 8e8c058 commit 7859c0b

File tree

4 files changed

+46
-71
lines changed

4 files changed

+46
-71
lines changed

_specifications/lsp/3.17/language/codeAction.md

Lines changed: 0 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -96,13 +96,6 @@ export interface CodeActionClientCapabilities {
9696
* @since 3.16.0
9797
*/
9898
honorsChangeAnnotations?: boolean;
99-
100-
/**
101-
* Whether code action supports the `llmGenerated` property.
102-
*
103-
* @since 3.17.0 - proposed
104-
*/
105-
llmGeneratedSupport?: boolean;
10699
}
107100
```
108101

@@ -425,17 +418,6 @@ export interface CodeAction {
425418
* @since 3.16.0
426419
*/
427420
data?: LSPAny;
428-
429-
/**
430-
* A boolean flag indicating whether the code action is generated by an
431-
* LLM.
432-
*
433-
* This property helps distinguish between code actions suggested by an AI
434-
* model and those generated by static analysis.
435-
*
436-
* @since 3.17.0 - proposed
437-
*/
438-
llmGenerated?: boolean;
439421
}
440422
```
441423
* partial result: `(Command | CodeAction)[]`

_specifications/lsp/3.17/metaModel/metaModel.json

Lines changed: 0 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -5675,17 +5675,6 @@
56755675
"optional": true,
56765676
"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",
56775677
"since": "3.16.0"
5678-
},
5679-
{
5680-
"name": "llmGenerated",
5681-
"type": {
5682-
"kind": "base",
5683-
"name": "boolean"
5684-
},
5685-
"optional": true,
5686-
"documentation": "A boolean flag indicating whether the code action is generated by an LLM.\n\nThis property helps distinguish between code actions suggested by an AI model and those generated by static analysis.\n\n@since 3.18.0 - proposed",
5687-
"since": "3.17.0",
5688-
"proposed": true
56895678
}
56905679
],
56915680
"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."
@@ -12245,17 +12234,6 @@
1224512234
"optional": true,
1224612235
"documentation": "Whether the client honors the change annotations in\ntext edits and resource operations returned via the\n`CodeAction#edit` property by for example presenting\nthe workspace edit in the user interface and asking\nfor confirmation.\n\n@since 3.16.0",
1224712236
"since": "3.16.0"
12248-
},
12249-
{
12250-
"name": "llmGeneratedSupport",
12251-
"type": {
12252-
"kind": "base",
12253-
"name": "boolean"
12254-
},
12255-
"optional": true,
12256-
"documentation": "Whether code action supports the `llmGenerated` property.\n\n@since 3.18.0 - proposed",
12257-
"since": "3.17.0",
12258-
"proposed": true
1225912237
}
1226012238
],
1226112239
"documentation": "The Client Capabilities of a {@link CodeActionRequest}."

_specifications/lsp/3.18/language/codeAction.md

Lines changed: 21 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -107,13 +107,6 @@ export interface CodeActionClientCapabilities {
107107
* @proposed
108108
*/
109109
documentationSupport?: boolean;
110-
111-
/**
112-
* Whether code action supports the `llmGenerated` property.
113-
*
114-
* @since 3.17.0 - proposed
115-
*/
116-
llmGeneratedSupport?: boolean;
117110
}
118111
```
119112

@@ -419,6 +412,23 @@ export namespace CodeActionTriggerKind {
419412
export type CodeActionTriggerKind = 1 | 2;
420413
```
421414

415+
<div class="anchorHolder"><a href="#codeActionTag" name="codeActionTag" class="linkableAnchor"></a></div>
416+
417+
```typescript
418+
/**
419+
* Code action tags are extra annotations that tweak the rendering of a code action.
420+
*
421+
* @since 3.18.0 - proposed
422+
*/
423+
export namespace CodeActionTag {
424+
/**
425+
* Render a code action as LLM-generated, usually using a sparkle icon.
426+
*/
427+
export const LLMGenerated = 1;
428+
}
429+
export type CodeActionTag = 1;
430+
```
431+
422432
_Response_:
423433
* result: `(Command | CodeAction)[]` \| `null` where `CodeAction` is defined as follows:
424434

@@ -514,15 +524,11 @@ export interface CodeAction {
514524
data?: LSPAny;
515525

516526
/**
517-
* A boolean flag indicating whether the code action is generated by an
518-
* LLM.
519-
*
520-
* This property helps distinguish between code actions suggested by an AI
521-
* model and those generated by static analysis.
522-
*
523-
* @since 3.17.0 - proposed
527+
* Tags for this code action.
528+
*
529+
* @since 3.18.0 - proposed
524530
*/
525-
llmGenerated?: boolean;
531+
tags?: CodeActionTag[];
526532
}
527533
```
528534
* partial result: `(Command | CodeAction)[]`

_specifications/lsp/3.18/metaModel/metaModel.json

Lines changed: 25 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -5711,14 +5711,17 @@
57115711
"since": "3.16.0"
57125712
},
57135713
{
5714-
"name": "llmGenerated",
5714+
"name": "tags",
57155715
"type": {
5716-
"kind": "base",
5717-
"name": "boolean"
5716+
"kind": "array",
5717+
"element": {
5718+
"kind": "reference",
5719+
"name": "CodeActionTag"
5720+
}
57185721
},
57195722
"optional": true,
5720-
"documentation": "A boolean flag indicating whether the code action is generated by an LLM.\n\nThis property helps distinguish between code actions suggested by an AI model and those generated by static analysis.\n\n@since 3.18.0 - proposed",
5721-
"since": "3.17.0",
5723+
"documentation": "Tags for this code action.\n\n@since 3.18.0 - proposed",
5724+
"since": "3.18.0 - proposed",
57225725
"proposed": true
57235726
}
57245727
],
@@ -12522,17 +12525,6 @@
1252212525
"documentation": "Whether the client supports documentation for a class of\ncode actions.\n\n@since 3.18.0\n@proposed",
1252312526
"since": "3.18.0",
1252412527
"proposed": true
12525-
},
12526-
{
12527-
"name": "llmGeneratedSupport",
12528-
"type": {
12529-
"kind": "base",
12530-
"name": "boolean"
12531-
},
12532-
"optional": true,
12533-
"documentation": "Whether code action supports the `llmGenerated` property.\n\n@since 3.18.0 - proposed",
12534-
"since": "3.17.0",
12535-
"proposed": true
1253612528
}
1253712529
],
1253812530
"documentation": "The Client Capabilities of a {@link CodeActionRequest}."
@@ -14624,6 +14616,23 @@
1462414616
"supportsCustomValues": true,
1462514617
"documentation": "A set of predefined code action kinds"
1462614618
},
14619+
{
14620+
"name": "CodeActionTag",
14621+
"type": {
14622+
"kind": "base",
14623+
"name": "uinteger"
14624+
},
14625+
"values": [
14626+
{
14627+
"name": "LLMGenerated",
14628+
"value": 1,
14629+
"documentation": "Render a code action as LLM-generated, usually using a sparkle icon."
14630+
}
14631+
],
14632+
"documentation": "Code action tags are extra annotations that tweak the rendering of a code action.\n\n@since 3.18.0",
14633+
"since": "3.18.0",
14634+
"proposed": true
14635+
},
1462714636
{
1462814637
"name": "TraceValue",
1462914638
"type": {

0 commit comments

Comments
 (0)