From f6e97b7c977d5043aacec308fadd4847d062988d Mon Sep 17 00:00:00 2001 From: Benjamin Pasero Date: Thu, 12 Dec 2024 14:47:59 +0100 Subject: [PATCH] debt - go over todos (#235924) * debt - go over todos * fix hygiene --- build/lib/inlineMeta.js | 2 +- build/lib/inlineMeta.ts | 2 +- .../auxiliaryWindow/electron-main/auxiliaryWindow.ts | 6 +++--- .../files/node/watcher/nodejs/nodejsWatcherLib.ts | 8 ++++---- src/vs/workbench/browser/layout.ts | 5 +---- .../workbench/browser/parts/titlebar/titlebarActions.ts | 2 +- .../accessibility/browser/accessibilityConfiguration.ts | 2 +- .../chat/electron-sandbox/actions/voiceChatActions.ts | 4 ++-- .../multiDiffEditor/browser/multiDiffEditorInput.ts | 6 +++--- src/vs/workbench/contrib/output/browser/outputView.ts | 2 +- 10 files changed, 18 insertions(+), 21 deletions(-) diff --git a/build/lib/inlineMeta.js b/build/lib/inlineMeta.js index f1dbfa83a7e..5ec7e9e9c07 100644 --- a/build/lib/inlineMeta.js +++ b/build/lib/inlineMeta.js @@ -8,7 +8,7 @@ exports.inlineMeta = inlineMeta; const es = require("event-stream"); const path_1 = require("path"); const packageJsonMarkerId = 'BUILD_INSERT_PACKAGE_CONFIGURATION'; -// TODO@bpasero in order to inline `product.json`, more work is +// TODO in order to inline `product.json`, more work is // needed to ensure that we cover all cases where modifications // are done to the product configuration during build. There are // at least 2 more changes that kick in very late: diff --git a/build/lib/inlineMeta.ts b/build/lib/inlineMeta.ts index ef3987fc32e..dc061aca8d1 100644 --- a/build/lib/inlineMeta.ts +++ b/build/lib/inlineMeta.ts @@ -15,7 +15,7 @@ export interface IInlineMetaContext { const packageJsonMarkerId = 'BUILD_INSERT_PACKAGE_CONFIGURATION'; -// TODO@bpasero in order to inline `product.json`, more work is +// TODO in order to inline `product.json`, more work is // needed to ensure that we cover all cases where modifications // are done to the product configuration during build. There are // at least 2 more changes that kick in very late: diff --git a/src/vs/platform/auxiliaryWindow/electron-main/auxiliaryWindow.ts b/src/vs/platform/auxiliaryWindow/electron-main/auxiliaryWindow.ts index 698f5c817a6..971d5cd6b2e 100644 --- a/src/vs/platform/auxiliaryWindow/electron-main/auxiliaryWindow.ts +++ b/src/vs/platform/auxiliaryWindow/electron-main/auxiliaryWindow.ts @@ -62,9 +62,9 @@ export class AuxiliaryWindow extends BaseWindow implements IAuxiliaryWindow { y: options.y, width: options.width, height: options.height, - // TODO@bpasero We currently do not support restoring fullscreen state for - // auxiliary windows because we do not get hold of the original `features` - // string that contains that info in `window-fullscreen`. However, we can + // We currently do not support restoring fullscreen state for auxiliary + // windows because we do not get hold of the original `features` string + // that contains that info in `window-fullscreen`. However, we can // probe the `options.show` value for whether the window should be maximized // or not because we never show maximized windows initially to reduce flicker. mode: options.show === false ? WindowMode.Maximized : WindowMode.Normal diff --git a/src/vs/platform/files/node/watcher/nodejs/nodejsWatcherLib.ts b/src/vs/platform/files/node/watcher/nodejs/nodejsWatcherLib.ts index 69792c99623..a7c89ceb00e 100644 --- a/src/vs/platform/files/node/watcher/nodejs/nodejsWatcherLib.ts +++ b/src/vs/platform/files/node/watcher/nodejs/nodejsWatcherLib.ts @@ -147,10 +147,10 @@ export class NodeJSFileWatcherLibrary extends Disposable { private doWatchWithExistingWatcher(realPath: string, isDirectory: boolean, disposables: DisposableStore): boolean { if (isDirectory) { - // TODO@bpasero recursive watcher re-use is currently not enabled - // for when folders are watched. this is because the dispatching - // in the recursive watcher for non-recurive requests is optimized - // for file changes where we really only match on the exact path + // Recursive watcher re-use is currently not enabled for when + // folders are watched. this is because the dispatching in the + // recursive watcher for non-recurive requests is optimized for + // file changes where we really only match on the exact path // and not child paths. return false; } diff --git a/src/vs/workbench/browser/layout.ts b/src/vs/workbench/browser/layout.ts index 782d0f48f38..8d731c24025 100644 --- a/src/vs/workbench/browser/layout.ts +++ b/src/vs/workbench/browser/layout.ts @@ -707,11 +707,8 @@ export abstract class Layout extends Disposable implements IWorkbenchLayoutServi // Auxiliary Panel to restore if (this.isVisible(Parts.AUXILIARYBAR_PART)) { - let viewContainerToRestore = this.storageService.get(AuxiliaryBarPart.activePanelSettingsKey, StorageScope.WORKSPACE, this.viewDescriptorService.getDefaultViewContainer(ViewContainerLocation.AuxiliaryBar)?.id); + const viewContainerToRestore = this.storageService.get(AuxiliaryBarPart.activePanelSettingsKey, StorageScope.WORKSPACE, this.viewDescriptorService.getDefaultViewContainer(ViewContainerLocation.AuxiliaryBar)?.id); if (viewContainerToRestore) { - if (viewContainerToRestore === 'workbench.panel.chatSidebar') { - viewContainerToRestore = 'workbench.panel.chat'; // TODO@bpasero remove me after some months - } this.state.initialization.views.containerToRestore.auxiliaryBar = viewContainerToRestore; } else { this.stateModel.setRuntimeValue(LayoutStateKeys.AUXILIARYBAR_HIDDEN, true); diff --git a/src/vs/workbench/browser/parts/titlebar/titlebarActions.ts b/src/vs/workbench/browser/parts/titlebar/titlebarActions.ts index 20e940cd05f..f84bf3f06b7 100644 --- a/src/vs/workbench/browser/parts/titlebar/titlebarActions.ts +++ b/src/vs/workbench/browser/parts/titlebar/titlebarActions.ts @@ -259,7 +259,7 @@ registerAction2(class ToggleEditorActions extends Action2 { } }); -if (isLinux && isNative) { // TODO@bpasero remove me later +if (isLinux && isNative) { registerAction2(class ToggleCustomTitleBar extends Action2 { constructor() { super({ diff --git a/src/vs/workbench/contrib/accessibility/browser/accessibilityConfiguration.ts b/src/vs/workbench/contrib/accessibility/browser/accessibilityConfiguration.ts index 840442b7bac..32eff1e1594 100644 --- a/src/vs/workbench/contrib/accessibility/browser/accessibilityConfiguration.ts +++ b/src/vs/workbench/contrib/accessibility/browser/accessibilityConfiguration.ts @@ -813,7 +813,7 @@ export class DynamicSpeechAccessibilityConfiguration extends Disposable implemen localize('accessibility.voice.autoSynthesize.auto', "When a screen reader is detected, disable the feature. Otherwise, enable the feature.") ], 'markdownDescription': localize('autoSynthesize', "Whether a textual response should automatically be read out aloud when speech was used as input. For example in a chat session, a response is automatically synthesized when voice was used as chat request."), - 'default': this.productService.quality !== 'stable' ? 'auto' : 'off', // TODO@bpasero decide on a default + 'default': this.productService.quality !== 'stable' ? 'auto' : 'off', 'tags': ['accessibility'] } } diff --git a/src/vs/workbench/contrib/chat/electron-sandbox/actions/voiceChatActions.ts b/src/vs/workbench/contrib/chat/electron-sandbox/actions/voiceChatActions.ts index 568f6a693cc..57310027bc9 100644 --- a/src/vs/workbench/contrib/chat/electron-sandbox/actions/voiceChatActions.ts +++ b/src/vs/workbench/contrib/chat/electron-sandbox/actions/voiceChatActions.ts @@ -373,7 +373,7 @@ class VoiceChatSessions { if (autoSynthesize === 'on' || autoSynthesize === 'auto' && !this.accessibilityService.isScreenReaderOptimized()) { let context: IVoiceChatSessionController | 'focused'; if (controller.context === 'inline') { - // TODO@bpasero this is ugly, but the lightweight inline chat turns into + // This is ugly, but the lightweight inline chat turns into // a different widget as soon as a response comes in, so we fallback to // picking up from the focused chat widget context = 'focused'; @@ -695,7 +695,7 @@ class ChatSynthesizerSessionController { const contextKeyService = accessor.get(IContextKeyService); let chatWidget = chatWidgetService.getWidgetBySessionId(response.session.sessionId); if (chatWidget?.location === ChatAgentLocation.Editor) { - // TODO@bpasero workaround for https://github.com/microsoft/vscode/issues/212785 + // workaround for https://github.com/microsoft/vscode/issues/212785 chatWidget = chatWidgetService.lastFocusedWidget; } diff --git a/src/vs/workbench/contrib/multiDiffEditor/browser/multiDiffEditorInput.ts b/src/vs/workbench/contrib/multiDiffEditor/browser/multiDiffEditorInput.ts index 0ab8f25019b..35847cd444a 100644 --- a/src/vs/workbench/contrib/multiDiffEditor/browser/multiDiffEditorInput.ts +++ b/src/vs/workbench/contrib/multiDiffEditor/browser/multiDiffEditorInput.ts @@ -280,9 +280,9 @@ export class MultiDiffEditorInput extends EditorInput implements ILanguageSuppor override readonly closeHandler: IEditorCloseHandler = { - // TODO@bpasero TODO@hediet this is a workaround for - // not having a better way to figure out if the - // editors this input wraps around are opened or not + // This is a workaround for not having a better way + // to figure out if the editors this input wraps + // around are opened or not async confirm() { return ConfirmResult.DONT_SAVE; diff --git a/src/vs/workbench/contrib/output/browser/outputView.ts b/src/vs/workbench/contrib/output/browser/outputView.ts index 3876b25ea9e..4d280d00857 100644 --- a/src/vs/workbench/contrib/output/browser/outputView.ts +++ b/src/vs/workbench/contrib/output/browser/outputView.ts @@ -164,7 +164,7 @@ class OutputEditor extends AbstractTextResourceEditor { @IEditorService editorService: IEditorService, @IFileService fileService: IFileService ) { - super(OUTPUT_VIEW_ID, editorGroupService.activeGroup /* TODO@bpasero this is wrong */, telemetryService, instantiationService, storageService, textResourceConfigurationService, themeService, editorGroupService, editorService, fileService); + super(OUTPUT_VIEW_ID, editorGroupService.activeGroup /* this is not correct but pragmatic */, telemetryService, instantiationService, storageService, textResourceConfigurationService, themeService, editorGroupService, editorService, fileService); this.resourceContext = this._register(instantiationService.createInstance(ResourceContextKey)); }