Change:
Testing Setting Open a github issue notebook You get: <img width="283" alt="image" src="https://user-"

Discussion:
import { Emitter, Event } from 'vs/base/common/event'; import { Disposable, DisposableStore, IDisposable, toDisposable } from 'vs/base/common/lifecycle'; <del> import { IBreadcrumbsDataSource, IOutline, IOutlineCreator, IOutlineListConfig, IOutlineService, OutlineChangeEvent, OutlineConfigKeys, OutlineTarget, } from 'vs/workbench/services/outline/browser/outline'; </del> <ins> import { OutlineConfigCollapseItemsValues, IBreadcrumbsDataSource, IOutline, IOutlineCreator, IOutlineListConfig, IOutlineService, OutlineChangeEvent, OutlineConfigKeys, OutlineTarget, } from 'vs/workbench/services/outline/browser/outline'; </ins> import { IWorkbenchContributionsRegistry, Extensions as WorkbenchExtensions } from 'vs/workbench/common/contributions'; import { Registry } from 'vs/platform/registry/common/platform'; import { LifecyclePhase } from 'vs/workbench/services/lifecycle/common/lifecycle';

} } <del> export const enum DocumentSymbolsOutlineInitialState { Collapsed = 'alwaysCollapse', Expanded = 'alwaysExpand' } </del> class DocumentSymbolsOutline implements IOutline<DocumentSymbolItem> {

} }; const comparator = new DocumentSymbolComparator(); <del> const initialState = textResourceConfigurationService.getValue<DocumentSymbolsOutlineInitialState>(_editor.getModel()?.uri, OutlineConfigKeys.collapseItems); </del> <ins> const initialState = textResourceConfigurationService.getValue<OutlineConfigCollapseItemsValues>(_editor.getModel()?.uri, OutlineConfigKeys.collapseItems); </ins> const options = { <del> collapseByDefault: target === OutlineTarget.Breadcrumbs || (target === OutlineTarget.OutlinePane && initialState === DocumentSymbolsOutlineInitialState.Collapsed), </del> <ins> collapseByDefault: target === OutlineTarget.Breadcrumbs || (target === OutlineTarget.OutlinePane && initialState === OutlineConfigCollapseItemsValues.Collapsed), </ins> expandOnlyOnTwistieClick: true, multipleSelectionSupport: false, identityProvider: new DocumentSymbolIdentityProvider(),

import { CellRevealType, IActiveNotebookEditor, ICellViewModel, INotebookEditorOptions, INotebookViewCellsUpdateEvent } from 'vs/workbench/contrib/notebook/browser/notebookBrowser'; import { NotebookEditor } from 'vs/workbench/contrib/notebook/browser/notebookEditor'; import { CellKind } from 'vs/workbench/contrib/notebook/common/notebookCommon'; <del> import { IOutline, IOutlineComparator, IOutlineCreator, IOutlineListConfig, IOutlineService, IQuickPickDataSource, IQuickPickOutlineElement, OutlineChangeEvent, OutlineConfigKeys, OutlineTarget } from 'vs/workbench/services/outline/browser/outline'; </del> <ins> import { IOutline, IOutlineComparator, IOutlineCreator, IOutlineListConfig, IOutlineService, IQuickPickDataSource, IQuickPickOutlineElement, OutlineChangeEvent, OutlineConfigCollapseItemsValues, OutlineConfigKeys, OutlineTarget } from 'vs/workbench/services/outline/browser/outline'; </ins> import { IWorkbenchContributionsRegistry, Extensions as WorkbenchExtensions } from 'vs/workbench/common/contributions'; import { Registry } from 'vs/platform/registry/common/platform'; import { LifecyclePhase } from 'vs/workbench/services/lifecycle/common/lifecycle';

} } <del> export class NotebookCellOutline extends Disposable implements IOutline<OutlineEntry> { </del> <ins> export class NotebookCellOutline implements IOutline<OutlineEntry> { </ins> <del> private readonly _onDidChange = this._register(new Emitter<OutlineChangeEvent>()); </del> <ins> private readonly _dispoables = new DisposableStore(); private readonly _onDidChange = new Emitter<OutlineChangeEvent>(); </ins> readonly onDidChange: Event<OutlineChangeEvent> = this._onDidChange.event; private _uri: URI | undefined; private _entries: OutlineEntry[] = []; private _activeEntry?: OutlineEntry; <del> private readonly _entriesDisposables = this._register(new DisposableStore()); </del> <ins> private readonly _entriesDisposables = new DisposableStore(); </ins> readonly config: IOutlineListConfig<OutlineEntry>; readonly outlineKind = 'notebookCells';

@IConfigurationService private readonly _configurationService: IConfigurationService, @INotebookExecutionStateService private readonly _notebookExecutionStateService: INotebookExecutionStateService, ) { <del> super(); const selectionListener = this._register(new MutableDisposable()); </del> <ins> const selectionListener = new MutableDisposable(); this._dispoables.add(selectionListener); </ins> const installSelectionListener = () => { const notebookEditor = _editor.getControl(); if (!notebookEditor?.hasModel()) {

} }; <del> this._register(_editor.onDidChangeModel(() => { </del> <ins> this._dispoables.add(_editor.onDidChangeModel(() => { </ins> this._recomputeState(); installSelectionListener(); })); <del> this._register(_configurationService.onDidChangeConfiguration(e => { </del> <ins> this._dispoables.add(_configurationService.onDidChangeConfiguration(e => { </ins> if (e.affectsConfiguration('notebook.outline.showCodeCells')) { this._recomputeState(); } })); <del> this._register(themeService.onDidFileIconThemeChange(() => { </del> <ins> this._dispoables.add(themeService.onDidFileIconThemeChange(() => { </ins> this._onDidChange.fire({}); })); <del> this._register(_notebookExecutionStateService.onDidChangeCellExecution(e => { </del> <ins> this._dispoables.add(_notebookExecutionStateService.onDidChangeCellExecution(e => { </ins> if (!!this._editor.textModel && e.affectsNotebook(this._editor.textModel?.uri)) { this._recomputeState(); }

installSelectionListener(); const options: IWorkbenchDataTreeOptions<OutlineEntry, FuzzyScore> = { <del> collapseByDefault: _target === OutlineTarget.Breadcrumbs, </del> <ins> collapseByDefault: _target === OutlineTarget.Breadcrumbs || (_target === OutlineTarget.OutlinePane && _configurationService.getValue(OutlineConfigKeys.collapseItems) === OutlineConfigCollapseItemsValues.Collapsed), </ins> expandOnlyOnTwistieClick: true, multipleSelectionSupport: false, accessibilityProvider: new NotebookOutlineAccessibility(),

}; } <ins> dispose(): void { this._onDidChange.dispose(); this._dispoables.dispose(); this._entriesDisposables.dispose(); } </ins> private _recomputeState(): void { this._entriesDisposables.clear(); this._activeEntry = undefined;

'problemsColors' = 'outline.problems.colors', 'problemsBadges' = 'outline.problems.badges' } <ins> export const enum OutlineConfigCollapseItemsValues { Collapsed = 'alwaysCollapse', Expanded = 'alwaysExpand' } </ins>