src/vs/editor/contrib/codeAction/browser/codeActionCommands.ts/refactorTrigger
function refactorTrigger(editor: ICodeEditor, userArgs: any, preview: boolean, codeActionFrom: CodeActionTriggerSource) {
	const args = CodeActionCommandArgs.fromUser(userArgs, {
		kind: CodeActionKind.Refactor,
		apply: CodeActionAutoApply.Never
	});
	return triggerCodeActionsForEditorSelection(editor,
		typeof userArgs?.kind === 'string'
			? args.preferred
				? nls.localize('editor.action.refactor.noneMessage.preferred.kind', "No preferred refactorings for '{0}' available", userArgs.kind)
				: nls.localize('editor.action.refactor.noneMessage.kind', "No refactorings for '{0}' available", userArgs.kind)
			: args.preferred
				? nls.localize('editor.action.refactor.noneMessage.preferred', "No preferred refactorings available")
				: nls.localize('editor.action.refactor.noneMessage', "No refactorings available"),
		{
			include: CodeActionKind.Refactor.contains(args.kind) ? args.kind : CodeActionKind.None,
			onlyIncludePreferredActions: args.preferred
		},
		args.apply, preview, codeActionFrom);
}