search-results.php
- Pfad:
src/View/semantic-explorer/partials/search-results.php - Namespace: -
- Zeilen: 43 | Größe: 1,553 Bytes
- Geändert: 2025-12-28 01:22:57 | Gescannt: 2025-12-31 10:22:15
Code Hygiene Score: 100
- Dependencies: 100 (25%)
- LOC: 100 (20%)
- Methods: 100 (20%)
- Secrets: 100 (15%)
- Classes: 100 (10%)
- Magic Numbers: 100 (10%)
Keine Issues gefunden.
Versionen 1
-
v1
2025-12-28 01:22 | claude-code-hook | modified
Claude Code Pre-Hook Backup vor Edit-Operation
Code
<?php
declare(strict_types=1);
// @responsibility: HTMX-Partial für semantische Suchergebnisse
?>
<?php if ($query !== '' && !empty($results)): ?>
<h2>Ergebnisse fuer "<?= htmlspecialchars($query) ?>"</h2>
<p class="text-muted"><?= count($results) ?> Treffer gefunden.</p>
<table data-sortable>
<thead>
<tr>
<th data-sort="rank">#</th>
<th data-sort="score">Score</th>
<th data-sort="filename">Dokument</th>
<th data-sort="tokens">Tokens</th>
<th data-sort="content">Inhalt</th>
</tr>
</thead>
<tbody>
<?php foreach ($results as $i => $r): ?>
<tr>
<td><?= $i + 1 ?></td>
<td><span class="badge badge--success"><?= number_format($r['score'] * \Domain\Constants::PERCENT_FULL, 1) ?>%</span></td>
<td>
<a href="/semantic-explorer/chunks/<?= $r['id'] ?>">#<?= $r['id'] ?></a>
<br><small><a href="/semantic-explorer/dokumente/<?= $r['document_id'] ?>"><?= htmlspecialchars($r['filename']) ?></a></small>
</td>
<td><?= $r['token_count'] ?></td>
<td><?= htmlspecialchars(substr($r['content'], 0, 150)) ?>...</td>
</tr>
<?php endforeach; ?>
</tbody>
</table>
<?php elseif ($query !== ''): ?>
<div class="empty-state empty-state--small">
<p>Keine Ergebnisse fuer "<?= htmlspecialchars($query) ?>" gefunden.</p>
<p class="text-muted">Stellen Sie sicher, dass Dokumente mit Embeddings vorliegen.</p>
</div>
<?php endif; ?>