Skip to content

Commit 8e8c058

Browse files
committed
add new property to codeAction
1 parent 0a59f91 commit 8e8c058

File tree

4 files changed

+80
-0
lines changed

4 files changed

+80
-0
lines changed

_specifications/lsp/3.17/language/codeAction.md

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -96,6 +96,13 @@ 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;
99106
}
100107
```
101108

@@ -418,6 +425,17 @@ export interface CodeAction {
418425
* @since 3.16.0
419426
*/
420427
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;
421439
}
422440
```
423441
* partial result: `(Command | CodeAction)[]`

_specifications/lsp/3.17/metaModel/metaModel.json

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5675,6 +5675,17 @@
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
56785689
}
56795690
],
56805691
"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."
@@ -12234,6 +12245,17 @@
1223412245
"optional": true,
1223512246
"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",
1223612247
"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
1223712259
}
1223812260
],
1223912261
"documentation": "The Client Capabilities of a {@link CodeActionRequest}."

_specifications/lsp/3.18/language/codeAction.md

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -107,6 +107,13 @@ 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;
110117
}
111118
```
112119

@@ -505,6 +512,17 @@ export interface CodeAction {
505512
* @since 3.16.0
506513
*/
507514
data?: LSPAny;
515+
516+
/**
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
524+
*/
525+
llmGenerated?: boolean;
508526
}
509527
```
510528
* partial result: `(Command | CodeAction)[]`

_specifications/lsp/3.18/metaModel/metaModel.json

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5709,6 +5709,17 @@
57095709
"optional": true,
57105710
"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",
57115711
"since": "3.16.0"
5712+
},
5713+
{
5714+
"name": "llmGenerated",
5715+
"type": {
5716+
"kind": "base",
5717+
"name": "boolean"
5718+
},
5719+
"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",
5722+
"proposed": true
57125723
}
57135724
],
57145725
"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,6 +12522,17 @@
1251112522
"documentation": "Whether the client supports documentation for a class of\ncode actions.\n\n@since 3.18.0\n@proposed",
1251212523
"since": "3.18.0",
1251312524
"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
1251412536
}
1251512537
],
1251612538
"documentation": "The Client Capabilities of a {@link CodeActionRequest}."

0 commit comments

Comments
 (0)