Add textContentSyncKind to NotebookDocumentSyncOptions for cell text sync negotiation

Co-authored-by: dbaeumer <1931590+dbaeumer@users.noreply.github.com>
This commit is contained in:
copilot-swe-agent[bot] 2025-12-09 11:50:58 +00:00
parent e4fdae663d
commit caa2a46cc6
3 changed files with 59 additions and 0 deletions

View file

@ -281,6 +281,15 @@ export interface NotebookDocumentSyncClientCapabilities {
* The client supports sending execution summary data per cell.
*/
executionSummarySupport?: boolean;
/**
* The client supports the `textContentSyncKind` property on
* `NotebookDocumentSyncOptions` to indicate how cell text content
* should be synchronized.
*
* @since 3.18.0
*/
textContentSyncKindSupport?: boolean;
}
```
@ -344,6 +353,26 @@ export interface NotebookDocumentSyncOptions {
* the server. Will only be honored if mode === `notebook`.
*/
save?: boolean;
/**
* How cell text content should be synced to the server. If omitted,
* cell text content is sent in full for every change.
*
* If `TextDocumentSyncKind.Full`, the client MUST send the full
* content of the cell on every change. Ranged updates (incremental
* synchronization) MUST NOT be used.
*
* If `TextDocumentSyncKind.Incremental`, the client SHOULD send
* ranged (incremental) updates when possible, but MAY send full
* content updates. This mirrors the behavior of `textDocumentSync.change`.
*
* Clients that advertise `textContentSyncKindSupport` in their
* capabilities MUST honor the `textContentSyncKind` value and send
* cell text changes accordingly.
*
* @since 3.18.0
*/
textContentSyncKind?: TextDocumentSyncKind;
}
```

View file

@ -299,6 +299,15 @@ export interface NotebookDocumentSyncClientCapabilities {
* The client supports sending execution summary data per cell.
*/
executionSummarySupport?: boolean;
/**
* The client supports the `textContentSyncKind` property on
* `NotebookDocumentSyncOptions` to indicate how cell text content
* should be synchronized.
*
* @since 3.18.0
*/
textContentSyncKindSupport?: boolean;
}
```
@ -362,6 +371,26 @@ export interface NotebookDocumentSyncOptions {
* the server. Will only be honored if mode === `notebook`.
*/
save?: boolean;
/**
* How cell text content should be synced to the server. If omitted,
* cell text content is sent in full for every change.
*
* If `TextDocumentSyncKind.Full`, the client MUST send the full
* content of the cell on every change. Ranged updates (incremental
* synchronization) MUST NOT be used.
*
* If `TextDocumentSyncKind.Incremental`, the client SHOULD send
* ranged (incremental) updates when possible, but MAY send full
* content updates. This mirrors the behavior of `textDocumentSync.change`.
*
* Clients that advertise `textContentSyncKindSupport` in their
* capabilities MUST honor the `textContentSyncKind` value and send
* cell text changes accordingly.
*
* @since 3.18.0
*/
textContentSyncKind?: TextDocumentSyncKind;
}
```

View file

@ -738,6 +738,7 @@ Since 3.17 there is a meta model describing the LSP protocol:
* Support for debug message kind.
* Client capability to enumerate properties that can be resolved for code lenses.
* Added support for `completionList.applyKind` to determine how values from `completionList.itemDefaults` and `completion` are combined.
* Added support for negotiating cell text synchronization kind in notebook documents via `textContentSyncKind`.
#### <a href="#version_3_17_0" name="version_3_17_0" class="anchor">3.17.0 (05/10/2022)</a>