mirror of
https://github.com/microsoft/vscode.git
synced 2026-04-25 11:08:51 +01:00
de-ref interactive input on interactive nb close.
This commit is contained in:
@@ -21,7 +21,11 @@ export class MainThreadInteractive implements MainThreadInteractiveShape {
|
||||
this._proxy = extHostContext.getProxy(ExtHostContext.ExtHostInteractive);
|
||||
|
||||
this._disposables.add(interactiveDocumentService.onWillAddInteractiveDocument((e) => {
|
||||
this._proxy.$acceptInputDocument(e.inputUri, '\n', 'plaintext', e.notebookUri);
|
||||
this._proxy.$willAddInteractiveDocument(e.inputUri, '\n', 'plaintext', e.notebookUri);
|
||||
}));
|
||||
|
||||
this._disposables.add(interactiveDocumentService.onWillAddInteractiveDocument((e) => {
|
||||
this._proxy.$willRemoveInteractiveDocument(e.inputUri, e.notebookUri);
|
||||
}));
|
||||
}
|
||||
|
||||
|
||||
@@ -2038,7 +2038,8 @@ export interface ExtHostNotebookKernelsShape {
|
||||
}
|
||||
|
||||
export interface ExtHostInteractiveShape {
|
||||
$acceptInputDocument(uri: UriComponents, eol: string, modeId: string, notebookUri: UriComponents): void;
|
||||
$willAddInteractiveDocument(uri: UriComponents, eol: string, modeId: string, notebookUri: UriComponents): void;
|
||||
$willRemoveInteractiveDocument(uri: UriComponents, notebookUri: UriComponents): void;
|
||||
}
|
||||
|
||||
export interface ExtHostStorageShape {
|
||||
|
||||
@@ -16,7 +16,7 @@ export class ExtHostInteractive implements ExtHostInteractiveShape {
|
||||
) {
|
||||
}
|
||||
|
||||
$acceptInputDocument(uri: UriComponents, eol: string, modeId: string, notebookUri: UriComponents) {
|
||||
$willAddInteractiveDocument(uri: UriComponents, eol: string, modeId: string, notebookUri: UriComponents) {
|
||||
this._textDocumentsAndEditors.acceptDocumentsAndEditorsDelta({
|
||||
addedDocuments: [{
|
||||
EOL: eol,
|
||||
@@ -29,4 +29,10 @@ export class ExtHostInteractive implements ExtHostInteractiveShape {
|
||||
}]
|
||||
});
|
||||
}
|
||||
|
||||
$willRemoveInteractiveDocument(uri: UriComponents, notebookUri: UriComponents) {
|
||||
this._textDocumentsAndEditors.acceptDocumentsAndEditorsDelta({
|
||||
removedDocuments: [uri]
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user