Skip to content

Commit

Permalink
Rebase against the upstream e0b9ba5
Browse files Browse the repository at this point in the history
vscode-upstream-sha1: e0b9ba5
  • Loading branch information
Eclipse Che Sync committed Nov 20, 2023
2 parents ef5b639 + e0b9ba5 commit 3d97567
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -1050,6 +1050,11 @@ configurationRegistry.registerConfiguration({
nls.localize('notebook.scrolling.anchorToFocusedCell.off.description', "The focused cell may shift around as cells resize.")
],
default: 'auto'
},
[NotebookSetting.cellChat]: {
markdownDescription: nls.localize('notebook.cellChat', "Enable experimental cell chat for notebooks."),
type: 'boolean',
default: false
}
}
});
Original file line number Diff line number Diff line change
Expand Up @@ -152,9 +152,9 @@ export class NotebookCellChatController extends Disposable {
try {
if (this._widget) {
this._partContainer.removeChild(this._widget.domNode);
this._partContainer.removeChild(this._toolbarDOM.editorToolbar);
}

this._partContainer.removeChild(this._toolbarDOM.editorToolbar);
} catch (_ex) {
// might not be attached
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ import { NotebookCellChatController } from 'vs/workbench/contrib/notebook/browse

import 'vs/workbench/contrib/notebook/browser/view/cellParts/chat/cellChatActions';
import { IConfigurationService } from 'vs/platform/configuration/common/configuration';
import { NotebookSetting } from 'vs/workbench/contrib/notebook/common/notebookCommon';

export class CellChatPart extends CellContentPart {
private _controller: NotebookCellChatController | undefined;
Expand All @@ -29,7 +30,7 @@ export class CellChatPart extends CellContentPart {

override didRenderCell(element: ICellViewModel): void {
this._controller?.dispose();
const enabled = this._configurationService.getValue<boolean>('notebook.experimental.cellChat');
const enabled = this._configurationService.getValue<boolean>(NotebookSetting.cellChat);
if (enabled) {
this._controller = this._instantiationService.createInstance(NotebookCellChatController, this._notebookEditor, this, element, this._partContainer);
}
Expand Down

0 comments on commit 3d97567

Please sign in to comment.