' . esc_html__('No assistant is published yet.', 'aiwend') . '
'); } else { $this->out('' . esc_html__('This comes from the site’s own settings and records. Aiwend did not contact the AI provider to produce it, so “configured” is not a promise that answers are working, and “recent failure” means a request failed in the last day with no successful answer since.', 'aiwend') . '
'); if ($items !== []) { $this->out('' . esc_html(sprintf(/* translators: %d: number of items */ _n('%d thing needs attention.', '%d things need attention.', count($items), 'aiwend'), count($items))) . ' ' . esc_html__('Open diagnostics', 'aiwend') . '
'); } $this->out('' . esc_html__('Built from the site’s own records. Nothing here is a live test of your AI provider, and no provider was contacted to show it.', 'aiwend') . '
'); if ($items === []) { $this->out('' . esc_html__('Nothing needs attention according to the site’s records.', 'aiwend') . '
'); } foreach ($items as $item) { $this->item($item); } $this->repairStatus(); $this->deadJobs(); $this->out('' . esc_html($text) . '
'); if (current_user_can(Capabilities::MANAGE_KNOWLEDGE)) { $this->postButton('run_repair', __('Run this check now', 'aiwend'), [], 'aiwend-diagnostics'); } } private function deadJobs(): void { $jobs = $this->report->deadJobs(); if ($jobs === []) { return; } $d = FailureCatalog::describe(FailureCatalog::JOB_FAILED); $this->out('' . esc_html($d['known'] . ' ' . $d['auto']) . '
'); $this->out('| ' . esc_html__('Task', 'aiwend') . ' | ' . esc_html__('Stopped', 'aiwend') . ' | ' . esc_html__('Attempts', 'aiwend') . ' | ' . esc_html__('Error', 'aiwend') . ' | ' . esc_html__('Action', 'aiwend') . ' |
|---|---|---|---|---|
| ' . esc_html($j['label']) . ' | ' . esc_html(self::when($j['updated_at'])) . ' | ' . esc_html($j['attempts'] . '/' . $j['max_attempts']) . ' | ' . esc_html($j['error'] === '' ? '—' : $j['error']) . ' | '); if ($j['retryable'] && current_user_can(Capabilities::MANAGE)) { $this->postButton('retry_job', __('Retry', 'aiwend'), ['job' => (string) $j['id']], 'aiwend-diagnostics', sprintf(/* translators: 1: task name, 2: task number */ __('Retry task: %1$s (number %2$d)', 'aiwend'), $j['label'], $j['id'])); } elseif (!$j['retryable']) { $this->out('' . esc_html($j['type'] === 'knowledge.ingest' ? __('Use Re-index on the source in Knowledge: indexing may contact an embedding service.', 'aiwend') : __('Not offered here: this kind of task is not safe to repeat from a button.', 'aiwend')) . ''); } $this->out(' |
' . esc_html__('Separate from the saved key and the access check above: this is what real visitor requests through this connection ran into in the last seven days. Nothing here changes the connection.', 'aiwend') . '
'); if ($facts === []) { $this->out('' . esc_html__('No failure observed in the last seven days.', 'aiwend') . '
'); } foreach ($facts as $f) { $d = FailureCatalog::describe($f['category'], $f['billing']); $this->out('' . esc_html(sprintf(/* translators: %s: date and time */ __('The last answer through this connection was recorded on %s.', 'aiwend'), self::when($success))) . '
'); } $this->out('