jiebi/CodeConvo huggingface dataset:
return false; } <ins> private _getEditorFromContext(context?: KernelQuickPickContext): INotebookEditor | undefined { let editor: INotebookEditor | undefined; if (context !== undefined && 'notebookEditorId' in context) { const editorId = context.notebookEditorId; const matchingEditor = this._editorService.visibleEditorPanes.find((editorPane) => { const notebookEditor = getNotebookEditorFromEditorPane(editorPane); return notebookEditor?.getId() === editorId; }); editor = getNotebookEditorFromEditorPane(matchingEditor); } else if (context !== undefined && 'notebookEditor' in context) { editor = context?.notebookEditor; } else { editor = getNotebookEditorFromEditorPane(this._editorService.activeEditorPane); } return editor; } </ins> private _getKernelPickerQuickPickItems( notebookTextModel: NotebookTextModel, matchResult: INotebookKernelMatchResult,
): QuickPickInput<KernelQuickPickItem>[] { const { selected, all, suggestions, hidden } = matchResult; <del> function toQuickPick(kernel: INotebookKernel) { const res = <KernelPick>{ kernel, picked: kernel.id === selected?.id, label: kernel.label, description: kernel.description, detail: kernel.detail }; if (kernel.id === selected?.id) { if (!res.description) { res.description = localize('current1', "Currently Selected"); } else { res.description = localize('current2', "{0} - Currently Selected", res.description); } } return res; } </del> const quickPickItems: QuickPickInput<KernelQuickPickItem>[] = []; if (all.length) { // Always display suggested kernels on the top. <del> if (suggestions.length) { quickPickItems.push({ type: 'separator', label: localize('suggestedKernels', "Suggested") }); quickPickItems.push(...suggestions.map(toQuickPick)); } </del> <ins> this._fillInSuggestions(quickPickItems, suggestions, selected); </ins> // Next display all of the kernels not marked as hidden grouped by categories or extensions. // If we don't have a kind, always display those at the bottom. <del> const picks = all.filter(item => (!suggestions.includes(item) && !hidden.includes(item))).map(toQuickPick); </del> <ins> const picks = all.filter(item => (!suggestions.includes(item) && !hidden.includes(item))).map(kernel => this._toQuickPick(kernel, selected)); </ins> const kernelsPerCategory = groupBy(picks, (a, b) => compareIgnoreCase(a.kernel.kind || 'z', b.kernel.kind || 'z')); kernelsPerCategory.forEach(items => { quickPickItems.push({
return quickPickItems; } <ins> private _toQuickPick(kernel: INotebookKernel, selected: INotebookKernel | undefined) { const res = <KernelPick>{ kernel, picked: kernel.id === selected?.id, label: kernel.label, description: kernel.description, detail: kernel.detail }; if (kernel.id === selected?.id) { if (!res.description) { res.description = localize('current1', "Currently Selected"); } else { res.description = localize('current2', "{0} - Currently Selected", res.description); } } return res; } private _fillInSuggestions(quickPickItems: QuickPickInput<KernelQuickPickItem>[], suggestions: INotebookKernel[], selected: INotebookKernel | undefined) { if (!suggestions.length) { return; } if (suggestions.length === 1 && suggestions[0].id === selected?.id) { quickPickItems.push({ type: 'separator', label: localize('selectedKernels', "Selected") }); // The title is already set to "Selected" so we don't need to set it again in description, thus passing in `undefined`. quickPickItems.push(this._toQuickPick(suggestions[0], undefined)); return; } quickPickItems.push({ type: 'separator', label: localize('suggestedKernels', "Suggested") }); quickPickItems.push(...suggestions.map(kernel => this._toQuickPick(kernel, selected))); } </ins> private async _showInstallKernelExtensionRecommendation( notebookTextModel: NotebookTextModel, quickPick: IQuickPick<KernelQuickPickItem>,
const pascalCased = viewType.split(/[^a-z0-9]/ig).map(uppercaseFirstLetter).join(''); view?.search(`@tag:notebookKernel${pascalCased}`); } <ins> } registerAction2(class extends Action2 { constructor() { super({ id: SELECT_KERNEL_ID, category: NOTEBOOK_ACTIONS_CATEGORY, title: { value: localize('notebookActions.selectKernel', "Select Notebook Kernel"), original: 'Select Notebook Kernel' }, icon: selectKernelIcon, f1: true, menu: [{ id: MenuId.EditorTitle, when: ContextKeyExpr.and( NOTEBOOK_IS_ACTIVE_EDITOR, ContextKeyExpr.notEquals('config.notebook.globalToolbar', true) ), group: 'navigation', order: -10 }, { id: MenuId.NotebookToolbar, when: ContextKeyExpr.equals('config.notebook.globalToolbar', true), group: 'status', order: -10 }, { id: MenuId.InteractiveToolbar, when: NOTEBOOK_KERNEL_COUNT.notEqualsTo(0), group: 'status', order: -10 }], description: { description: localize('notebookActions.selectKernel.args', "Notebook Kernel Args"), args: [ { name: 'kernelInfo', description: 'The kernel info', schema: { 'type': 'object', 'required': ['id', 'extension'], 'properties': { 'id': { 'type': 'string' }, 'extension': { 'type': 'string' }, 'notebookEditorId': { 'type': 'string' } } } } ] }, }); } async run(accessor: ServicesAccessor, context?: KernelQuickPickContext): Promise<boolean> { const notebookKernelService = accessor.get(INotebookKernelService); const editorService = accessor.get(IEditorService); const productService = accessor.get(IProductService); const quickInputService = accessor.get(IQuickInputService); const labelService = accessor.get(ILabelService); const logService = accessor.get(ILogService); const paneCompositeService = accessor.get(IPaneCompositePartService); const extensionWorkbenchService = accessor.get(IExtensionsWorkbenchService); const extensionHostService = accessor.get(IExtensionService); const strategy = new KernelPickerFlatStrategy( notebookKernelService, editorService, productService, quickInputService, labelService, logService, paneCompositeService, extensionWorkbenchService, extensionHostService ); return await strategy.showQuickPick(context); } </ins> }); export class NotebooKernelActionViewItem extends ActionViewItem {
"scopeName": "source.regexp.python", "path": "./syntaxes/MagicRegExp.tmLanguage.json" } <del> ] </del> <ins> ], "configurationDefaults": { "[python]": { "diffEditor.ignoreTrimWhitespace": false } } </ins> }, "scripts": { "update-grammar": "node ../node_modules/vscode-grammar-updater/bin MagicStack/MagicPython grammars/MagicPython.tmLanguage ./syntaxes/MagicPython.tmLanguage.json grammars/MagicRegExp.tmLanguage ./syntaxes/MagicRegExp.tmLanguage.json"
import { memoize } from 'vs/base/common/decorators'; import { onUnexpectedError } from 'vs/base/common/errors'; import { MarkdownString } from 'vs/base/common/htmlContent'; <del> import { Disposable, dispose, disposeIfDisposable, IDisposable } from 'vs/base/common/lifecycle'; </del> <ins> import { dispose, disposeIfDisposable, IDisposable } from 'vs/base/common/lifecycle'; </ins> import * as env from 'vs/base/common/platform'; import severity from 'vs/base/common/severity'; import { noBreakWhitespace } from 'vs/base/common/strings';
return result; } <del> export class LazyBreakpointEditorContribution extends Disposable implements IBreakpointEditorContribution { private _contrib: IBreakpointEditorContribution | undefined; constructor(editor: ICodeEditor, @IInstantiationService instantiationService: IInstantiationService) { super(); const listener = editor.onDidChangeModel(() => { if (editor.hasModel()) { listener.dispose(); this._contrib = this._register(instantiationService.createInstance(BreakpointEditorContribution, editor)); } }); } showBreakpointWidget(lineNumber: number, column: number | undefined, context?: BreakpointWidgetContext | undefined): void { this._contrib?.showBreakpointWidget(lineNumber, column, context); } closeBreakpointWidget(): void { this._contrib?.closeBreakpointWidget(); } getContextMenuActionsAtPosition(lineNumber: number, model: ITextModel): IAction[] { return this._contrib?.getContextMenuActionsAtPosition(lineNumber, model) ?? []; } } class BreakpointEditorContribution implements IBreakpointEditorContribution { </del> <ins> export class BreakpointEditorContribution implements IBreakpointEditorContribution { </ins> private breakpointHintDecoration: string | null = null; private breakpointWidget: BreakpointWidget | undefined;
import { IEditorContribution } from 'vs/editor/common/editorCommon'; import { IModelDecorationOptions, IModelDeltaDecoration, OverviewRulerLane, TrackedRangeStickiness } from 'vs/editor/common/model'; import { localize } from 'vs/nls'; <del> import { IInstantiationService } from 'vs/platform/instantiation/common/instantiation'; </del> import { ILogService } from 'vs/platform/log/common/log'; import { registerColor } from 'vs/platform/theme/common/colorRegistry'; import { registerThemingParticipant, themeColorFromId, ThemeIcon } from 'vs/platform/theme/common/themeService';
return result; } <del> export class LazyCallStackEditorContribution extends Disposable { constructor(editor: ICodeEditor, @IInstantiationService instantiationService: IInstantiationService) { super(); const listener = editor.onDidChangeModel(() => { if (editor.hasModel()) { listener.dispose(); this._register(instantiationService.createInstance(CallStackEditorContribution, editor)); } }); } } class CallStackEditorContribution extends Disposable implements IEditorContribution { </del> <ins> export class CallStackEditorContribution extends Disposable implements IEditorContribution { </ins> private decorations = this.editor.createDecorationsCollection(); constructor(
import { Extensions as WorkbenchExtensions, IWorkbenchContributionsRegistry } from 'vs/workbench/common/contributions'; import { EditorExtensions } from 'vs/workbench/common/editor'; import { Extensions as ViewExtensions, IViewContainersRegistry, IViewsRegistry, ViewContainer, ViewContainerLocation } from 'vs/workbench/common/views'; <del> import { LazyBreakpointEditorContribution } from 'vs/workbench/contrib/debug/browser/breakpointEditorContribution'; </del> <ins> import { BreakpointEditorContribution } from 'vs/workbench/contrib/debug/browser/breakpointEditorContribution'; </ins> import { BreakpointsView } from 'vs/workbench/contrib/debug/browser/breakpointsView'; <del> import { LazyCallStackEditorContribution } from 'vs/workbench/contrib/debug/browser/callStackEditorContribution'; </del> <ins> import { CallStackEditorContribution } from 'vs/workbench/contrib/debug/browser/callStackEditorContribution'; </ins> import { CallStackView } from 'vs/workbench/contrib/debug/browser/callStackView'; import { registerColors } from 'vs/workbench/contrib/debug/browser/debugColors'; import { ADD_CONFIGURATION_ID, CALLSTACK_BOTTOM_ID, CALLSTACK_BOTTOM_LABEL, CALLSTACK_DOWN_ID, CALLSTACK_DOWN_LABEL, CALLSTACK_TOP_ID, CALLSTACK_TOP_LABEL, CALLSTACK_UP_ID, CALLSTACK_UP_LABEL, CONTINUE_ID, CONTINUE_LABEL, COPY_STACK_TRACE_ID, DEBUG_COMMAND_CATEGORY, DEBUG_CONSOLE_QUICK_ACCESS_PREFIX, DEBUG_QUICK_ACCESS_PREFIX, DEBUG_RUN_COMMAND_ID, DEBUG_RUN_LABEL, DEBUG_START_COMMAND_ID, DEBUG_START_LABEL, DISCONNECT_AND_SUSPEND_ID, DISCONNECT_AND_SUSPEND_LABEL, DISCONNECT_ID, DISCONNECT_LABEL, EDIT_EXPRESSION_COMMAND_ID, FOCUS_REPL_ID, JUMP_TO_CURSOR_ID, NEXT_DEBUG_CONSOLE_ID, NEXT_DEBUG_CONSOLE_LABEL, OPEN_LOADED_SCRIPTS_LABEL, PAUSE_ID, PAUSE_LABEL, PREV_DEBUG_CONSOLE_ID, PREV_DEBUG_CONSOLE_LABEL, REMOVE_EXPRESSION_COMMAND_ID, RESTART_FRAME_ID, RESTART_LABEL, RESTART_SESSION_ID, SELECT_AND_START_ID, SELECT_AND_START_LABEL, SELECT_DEBUG_CONSOLE_ID, SELECT_DEBUG_CONSOLE_LABEL, SELECT_DEBUG_SESSION_ID, SELECT_DEBUG_SESSION_LABEL, SET_EXPRESSION_COMMAND_ID, SHOW_LOADED_SCRIPTS_ID, STEP_INTO_ID, STEP_INTO_LABEL, STEP_INTO_TARGET_ID, STEP_INTO_TARGET_LABEL, STEP_OUT_ID, STEP_OUT_LABEL, STEP_OVER_ID, STEP_OVER_LABEL, STOP_ID, STOP_LABEL, TERMINATE_THREAD_ID, TOGGLE_INLINE_BREAKPOINT_ID } from 'vs/workbench/contrib/debug/browser/debugCommands'; import { DebugConsoleQuickAccess } from 'vs/workbench/contrib/debug/browser/debugConsoleQuickAccess'; import { RunToCursorAction, SelectionToReplAction, SelectionToWatchExpressionsAction } from 'vs/workbench/contrib/debug/browser/debugEditorActions'; <del> import { LazyDebugEditorContribution } from 'vs/workbench/contrib/debug/browser/debugEditorContribution'; </del> <ins> import { DebugEditorContribution } from 'vs/workbench/contrib/debug/browser/debugEditorContribution'; </ins> import * as icons from 'vs/workbench/contrib/debug/browser/debugIcons'; import { DebugProgressContribution } from 'vs/workbench/contrib/debug/browser/debugProgress'; import { StartDebugQuickAccessProvider } from 'vs/workbench/contrib/debug/browser/debugQuickAccess';
import { ADD_TO_WATCH_ID, BREAK_WHEN_VALUE_CHANGES_ID, BREAK_WHEN_VALUE_IS_ACCESSED_ID, BREAK_WHEN_VALUE_IS_READ_ID, COPY_EVALUATE_PATH_ID, COPY_VALUE_ID, SET_VARIABLE_ID, VariablesView, VIEW_MEMORY_ID } from 'vs/workbench/contrib/debug/browser/variablesView'; import { ADD_WATCH_ID, ADD_WATCH_LABEL, REMOVE_WATCH_EXPRESSIONS_COMMAND_ID, REMOVE_WATCH_EXPRESSIONS_LABEL, WatchExpressionsView } from 'vs/workbench/contrib/debug/browser/watchExpressionsView'; import { WelcomeView } from 'vs/workbench/contrib/debug/browser/welcomeView'; <del> import { BREAKPOINTS_VIEW_ID, BREAKPOINT_EDITOR_CONTRIBUTION_ID, CALLSTACK_VIEW_ID, CONTEXT_BREAKPOINTS_EXIST, CONTEXT_BREAK_WHEN_VALUE_CHANGES_SUPPORTED, CONTEXT_BREAK_WHEN_VALUE_IS_ACCESSED_SUPPORTED, CONTEXT_BREAK_WHEN_VALUE_IS_READ_SUPPORTED, CONTEXT_CALLSTACK_ITEM_TYPE, CONTEXT_CAN_VIEW_MEMORY, CONTEXT_DEBUGGERS_AVAILABLE, CONTEXT_HAS_DEBUGGED, CONTEXT_DEBUG_STATE, CONTEXT_DEBUG_UX, CONTEXT_FOCUSED_SESSION_IS_ATTACH, CONTEXT_IN_DEBUG_MODE, CONTEXT_JUMP_TO_CURSOR_SUPPORTED, CONTEXT_LOADED_SCRIPTS_SUPPORTED, CONTEXT_RESTART_FRAME_SUPPORTED, CONTEXT_SET_EXPRESSION_SUPPORTED, CONTEXT_SET_VARIABLE_SUPPORTED, CONTEXT_STACK_FRAME_SUPPORTS_RESTART, CONTEXT_STEP_INTO_TARGETS_SUPPORTED, CONTEXT_SUSPEND_DEBUGGEE_SUPPORTED, CONTEXT_TERMINATE_DEBUGGEE_SUPPORTED, CONTEXT_VARIABLE_EVALUATE_NAME_PRESENT, CONTEXT_VARIABLE_IS_READONLY, CONTEXT_WATCH_ITEM_TYPE, DEBUG_PANEL_ID, DISASSEMBLY_VIEW_ID, EDITOR_CONTRIBUTION_ID, getStateLabel, IDebugService, INTERNAL_CONSOLE_OPTIONS_SCHEMA, LOADED_SCRIPTS_VIEW_ID, REPL_VIEW_ID, State, VARIABLES_VIEW_ID, VIEWLET_ID, WATCH_VIEW_ID } from 'vs/workbench/contrib/debug/common/debug'; </del> <ins> import { BREAKPOINTS_VIEW_ID, BREAKPOINT_EDITOR_CONTRIBUTION_ID, CALLSTACK_VIEW_ID, CONTEXT_BREAKPOINTS_EXIST, CONTEXT_BREAK_WHEN_VALUE_CHANGES_SUPPORTED, CONTEXT_BREAK_WHEN_VALUE_IS_ACCESSED_SUPPORTED, CONTEXT_BREAK_WHEN_VALUE_IS_READ_SUPPORTED, CONTEXT_CALLSTACK_ITEM_TYPE, CONTEXT_CAN_VIEW_MEMORY, CONTEXT_DEBUGGERS_AVAILABLE, CONTEXT_DEBUG_STATE, CONTEXT_DEBUG_UX, CONTEXT_FOCUSED_SESSION_IS_ATTACH, CONTEXT_HAS_DEBUGGED, CONTEXT_IN_DEBUG_MODE, CONTEXT_JUMP_TO_CURSOR_SUPPORTED, CONTEXT_LOADED_SCRIPTS_SUPPORTED, CONTEXT_RESTART_FRAME_SUPPORTED, CONTEXT_SET_EXPRESSION_SUPPORTED, CONTEXT_SET_VARIABLE_SUPPORTED, CONTEXT_STACK_FRAME_SUPPORTS_RESTART, CONTEXT_STEP_INTO_TARGETS_SUPPORTED, CONTEXT_SUSPEND_DEBUGGEE_SUPPORTED, CONTEXT_TERMINATE_DEBUGGEE_SUPPORTED, CONTEXT_VARIABLE_EVALUATE_NAME_PRESENT, CONTEXT_VARIABLE_IS_READONLY, CONTEXT_WATCH_ITEM_TYPE, DEBUG_PANEL_ID, DISASSEMBLY_VIEW_ID, EDITOR_CONTRIBUTION_ID, getStateLabel, IDebugService, INTERNAL_CONSOLE_OPTIONS_SCHEMA, LOADED_SCRIPTS_VIEW_ID, REPL_VIEW_ID, State, VARIABLES_VIEW_ID, VIEWLET_ID, WATCH_VIEW_ID } from 'vs/workbench/contrib/debug/common/debug'; </ins> import { DebugContentProvider } from 'vs/workbench/contrib/debug/common/debugContentProvider'; import { DebugLifecycle } from 'vs/workbench/contrib/debug/common/debugLifecycle'; import { DisassemblyViewInput } from 'vs/workbench/contrib/debug/common/disassemblyViewInput';
helpEntries: [{ description: nls.localize('tasksQuickAccessHelp', "Show All Debug Consoles"), commandId: SELECT_DEBUG_CONSOLE_ID }] }); <del> registerEditorContribution('editor.contrib.callStack', LazyCallStackEditorContribution, EditorContributionInstantiation.Eager); registerEditorContribution(BREAKPOINT_EDITOR_CONTRIBUTION_ID, LazyBreakpointEditorContribution, EditorContributionInstantiation.Eager); registerEditorContribution(EDITOR_CONTRIBUTION_ID, LazyDebugEditorContribution, EditorContributionInstantiation.Eager); </del> <ins> registerEditorContribution('editor.contrib.callStack', CallStackEditorContribution, EditorContributionInstantiation.AfterFirstRender); registerEditorContribution(BREAKPOINT_EDITOR_CONTRIBUTION_ID, BreakpointEditorContribution, EditorContributionInstantiation.AfterFirstRender); registerEditorContribution(EDITOR_CONTRIBUTION_ID, DebugEditorContribution, EditorContributionInstantiation.BeforeFirstInteraction); </ins> const registerDebugCommandPaletteItem = (id: string, title: ICommandActionTitle, when?: ContextKeyExpression, precondition?: ContextKeyExpression) => { MenuRegistry.appendMenuItem(MenuId.CommandPalette, {
return result; } <del> export class LazyDebugEditorContribution extends Disposable implements IDebugEditorContribution { private _contrib: IDebugEditorContribution | undefined; constructor(editor: ICodeEditor, @IInstantiationService instantiationService: IInstantiationService) { super(); const listener = editor.onDidChangeModel(() => { if (editor.hasModel()) { listener.dispose(); this._contrib = this._register(instantiationService.createInstance(DebugEditorContribution, editor)); } }); } showHover(position: Position, focus: boolean): Promise<void> { return this._contrib ? this._contrib.showHover(position, focus) : Promise.resolve(); } addLaunchConfiguration(): Promise<any> { return this._contrib ? this._contrib.addLaunchConfiguration() : Promise.resolve(); } closeExceptionWidget(): void { this._contrib?.closeExceptionWidget(); } } </del> export class DebugEditorContribution implements IDebugEditorContribution { private toDispose: IDisposable[];
import { EventEmitter } from 'events'; import * as iconv from '@vscode/iconv-lite-umd'; import * as filetype from 'file-type'; <del> import { assign, groupBy, IDisposable, toDisposable, dispose, mkdirp, readBytes, detectUnicodeEncoding, Encoding, onceEvent, splitInChunks, Limiter, Versions, isWindows } from './util'; </del> <ins> import { assign, groupBy, IDisposable, toDisposable, dispose, mkdirp, readBytes, detectUnicodeEncoding, Encoding, onceEvent, splitInChunks, Limiter, Versions, isWindows, pathEquals } from './util'; </ins> import { CancellationError, CancellationToken, ConfigurationChangeEvent, LogOutputChannel, Progress, Uri, workspace } from 'vscode'; import { detectEncoding } from './encoding'; import { Ref, RefType, Branch, Remote, ForcePushMode, GitErrorCodes, LogOptions, Change, Status, CommitOptions, RefQuery } from './api/git';
), ); if (networkPath !== undefined) { <ins> // If the repository is at the root of the mapped drive then we // have to append `` (ex: D:) otherwise the path is not valid. const isDriveRoot = pathEquals(repoUri.fsPath, networkPath); </ins> return path.normalize( repoUri.fsPath.replace( networkPath, <del> `${letter.toLowerCase()}:${networkPath.endsWith('') ? '' : ''}` </del> <ins> `${letter.toLowerCase()}:${isDriveRoot || networkPath.endsWith('') ? '' : ''}` </ins> ), ); }
const message = dom.append(extraContainer, $(`#${this.idPrefix}message.quick-input-message`)); <ins> const progressBar = new ProgressBar(container, this.styles.progressBar); progressBar.getContainer().classList.add('quick-input-progress'); </ins> const list = this._register(new QuickInputList(container, this.idPrefix + 'list', this.options)); this._register(list.onChangedAllVisibleChecked(checked => { checkAll.checked = checked;
this.proxy = context.getProxy(ExtHostContext.ExtHostProfileContentHandlers); } <del> async $registerProfileContentHandler(id: string, name: string, extensionId: string): Promise<void> { </del> <ins> async $registerProfileContentHandler(id: string, name: string, description: string | undefined, extensionId: string): Promise<void> { </ins> this.registeredHandlers.set(id, this.userDataProfileImportExportService.registerProfileContentHandler(id, { name, <ins> description, </ins> extensionId, saveProfile: async (name: string, content: string, token: CancellationToken) => { const result = await this.proxy.$saveProfile(id, name, content, token);
if (this.profileContentHandlers.size === 1) { return this.profileContentHandlers.values().next().value; } <del> const linkHandlers: { id: string; label: string }[] = []; const fileHandlers: { id: string; label: string }[] = []; for (const [id, profileContentHandler] of this.profileContentHandlers) { if (profileContentHandler.extensionId) { linkHandlers.push({ id, label: profileContentHandler.name }); } else { fileHandlers.push({ id, label: profileContentHandler.name }); } } </del> const options: QuickPickItem[] = []; <del> if (linkHandlers.length) { options.push({ label: localize('link', "link"), type: 'separator' }); options.push(...linkHandlers); } if (fileHandlers.length) { options.push({ label: localize('file', "file"), type: 'separator' }); options.push(...fileHandlers); </del> <ins> for (const [id, profileContentHandler] of this.profileContentHandlers) { options.push({ id, label: profileContentHandler.name, description: profileContentHandler.description }); </ins> } <del> const result = await this.quickInputService.pick(options, </del> <ins> const result = await this.quickInputService.pick(options.reverse(), </ins> { title: localize('select profile content handler', "Export '{0}' profile as...", name), hideInput: true
static updateKernelStatusAction(notebook: NotebookTextModel, action: IAction, notebookKernelService: INotebookKernelService, scopedContextKeyService?: IContextKeyService) { const detectionTasks = notebookKernelService.getKernelDetectionTasks(notebook); if (detectionTasks.length) { <ins> const info = notebookKernelService.getMatchingKernel(notebook); </ins> action.enabled = true; <del> action.label = localize('kernels.detecting', "Detecting Kernels"); </del> action.class = ThemeIcon.asClassName(ThemeIcon.modify(executingStateIcon, 'spin')); <ins> if (info.selected) { action.label = info.selected.label; const kernelInfo = info.selected.description ?? info.selected.detail; action.tooltip = kernelInfo ? localize('kernels.selectedKernelAndKernelDetectionRunning', "Selected Kernel: {0} (Kernel Detection Tasks Running)", kernelInfo) : localize('kernels.detecting', "Detecting Kernels"); } else { action.label = localize('kernels.detecting', "Detecting Kernels"); } </ins> return; }
static updateKernelStatusAction(notebook: NotebookTextModel, action: IAction, notebookKernelService: INotebookKernelService) { const detectionTasks = notebookKernelService.getKernelDetectionTasks(notebook); if (detectionTasks.length) { <ins> const info = notebookKernelService.getMatchingKernel(notebook); </ins> action.enabled = true; <del> action.label = localize('kernels.detecting', "Detecting Kernels"); </del> action.class = ThemeIcon.asClassName(ThemeIcon.modify(executingStateIcon, 'spin')); <ins> if (info.selected) { action.label = info.selected.label; const kernelInfo = info.selected.description ?? info.selected.detail; action.tooltip = kernelInfo ? localize('kernels.selectedKernelAndKernelDetectionRunning', "Selected Kernel: {0} (Kernel Detection Tasks Running)", kernelInfo) : localize('kernels.detecting', "Detecting Kernels"); } else { action.label = localize('kernels.detecting', "Detecting Kernels"); } </ins> return; }
protected readonly _commandService: ICommandService ) { } <del> async showQuickPick(editor: IActiveNotebookEditor, wantedId?: string): Promise<boolean> { </del> <ins> async showQuickPick(editor: IActiveNotebookEditor, wantedId?: string, skipAutoRun?: boolean): Promise<boolean> { </ins> const notebook = editor.textModel; const scopedContextKeyService = editor.scopedContextKeyService; const matchResult = this._getMatchingResult(notebook);
const quickPick = this._quickInputService.createQuickPick<KernelQuickPickItem>(); const quickPickItems = this._getKernelPickerQuickPickItems(notebook, matchResult, this._notebookKernelService, scopedContextKeyService); <del> if (quickPickItems.length === 1 && supportAutoRun(quickPickItems[0])) { return await this._handleQuickPick(editor, quickPickItems[0]); </del> <ins> if (quickPickItems.length === 1 && supportAutoRun(quickPickItems[0]) && !skipAutoRun) { return await this._handleQuickPick(editor, quickPickItems[0], quickPickItems as KernelQuickPickItem[]); </ins> } quickPick.items = quickPickItems;