• Модуль: fileman
  • Путь к файлу: ~/bitrix/modules/fileman/classes/general/html_editor.php
  • Класс: CHTMLEditor
  • Вызов: CHTMLEditor::isCopilotEnabled
public function isCopilotEnabled(): bool
{
	if (!Loader::includeModule('ai'))
	{
		return false;
	}

	$isCopilotFeatureEnabled = COption::GetOptionString('fileman', 'isCopilotFeatureEnabled', 'N') === 'Y';
	if (!$isCopilotFeatureEnabled)
	{
		return false;
	}

	$engine = AIEngine::getByCategory(AIEngine::CATEGORIES['text'], AIContext::getFake());

	return !is_null($engine);
}