Link assistant: its settings; the assistant itself is its own page. */ final class LinksScreen { public static function render(): string { $body = ''; if (LinkAssistant::enabled()) { $body .= Ui::actions([['label' => __('Open the Link assistant', 'aipcf-ai-provider-for-cloudflare'), 'url' => LinkAssistant::pageUrl()]]); } $body .= Ui::row(__('Link assistant', 'aipcf-ai-provider-for-cloudflare'), Ui::toggle('links_enabled', !empty(Settings::get('links_enabled')), __('For everyone who can edit posts', 'aipcf-ai-provider-for-cloudflare'), 'aipcf-links-enabled'), [ 'for' => 'aipcf-links-enabled', 'help' => __('It suggests; nothing in your posts changes until someone edits them.', 'aipcf-ai-provider-for-cloudflare'), ]); $body .= Ui::row(__('Daily limit', 'aipcf-ai-provider-for-cloudflare'), Ui::number('links_daily_neurons', (int) Settings::get('links_daily_neurons'), 'aipcf-links-daily-neurons', ['min' => 1, 'max' => 10000000, 'unit' => __('neurons a day', 'aipcf-ai-provider-for-cloudflare')]), [ 'for' => 'aipcf-links-daily-neurons', 'help' => __('For its chat only. The suggestions cost nothing.', 'aipcf-ai-provider-for-cloudflare'), ]); return Ui::card(__('Link assistant', 'aipcf-ai-provider-for-cloudflare'), $body, [ 'text' => __('For a post: which posts it should link to and which should link back, with the exact words and sentence for each.', 'aipcf-ai-provider-for-cloudflare'), ]); } }