show.php
- Pfad:
src/View/semantic-explorer/chunks/show.php - Namespace: -
- Zeilen: 108 | Größe: 4,099 Bytes
- Geändert: 2025-12-28 02:54:33 | 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 02:54 | claude-code-hook | modified
Claude Code Pre-Hook Backup vor Edit-Operation
Code
<?php ob_start(); ?>
<nav class="breadcrumb">
<a href="/">Home</a> »
<a href="/explorer">Explorer</a> »
<a href="/semantic-explorer">Semantic Explorer</a> »
<a href="/semantic-explorer/chunks">Chunks</a> »
#<?= $chunk['id'] ?>
</nav>
<h1>Chunk #<?= $chunk['id'] ?></h1>
<p>
Aus: <a href="/semantic-explorer/dokumente/<?= $chunk['document_id'] ?>"><?= htmlspecialchars($chunk['filename']) ?></a>
(Index: <?= $chunk['chunk_index'] ?>)
</p>
<div class="stats-grid">
<div class="stat-card">
<span class="stat-card__value"><?= $chunk['token_count'] ?></span>
<span class="stat-card__label">Tokens</span>
</div>
<div class="stat-card stat-card--<?= $chunk['qdrant_id'] ? 'success' : 'warning' ?>">
<span class="stat-card__value"><?= $chunk['qdrant_id'] ? 'Synced' : 'Pending' ?></span>
<span class="stat-card__label">Status</span>
</div>
<div class="stat-card stat-card--<?= isset($textSemantics) ? 'success' : 'muted' ?>">
<span class="stat-card__value"><?= isset($textSemantics) ? 'Analysiert' : 'Offen' ?></span>
<span class="stat-card__label">Textsemantik</span>
</div>
</div>
<?php if (isset($textSemantics) && $textSemantics): ?>
<h2>Textsemantik</h2>
<table class="table">
<tr>
<th>Aussageform</th>
<td>
<span class="badge badge--primary"><?= htmlspecialchars($textSemantics['statement_form'] ?? '-') ?></span>
<?php if (!empty($textSemantics['is_negated'])): ?>
<span class="badge badge--danger">negiert</span>
<?php endif; ?>
</td>
</tr>
<tr>
<th>Absicht</th>
<td><span class="badge badge--info"><?= htmlspecialchars($textSemantics['intent'] ?? '-') ?></span></td>
</tr>
<tr>
<th>Rahmen</th>
<td><span class="badge badge--secondary"><?= htmlspecialchars($textSemantics['frame'] ?? '-') ?></span></td>
</tr>
<tr>
<th>Diskursrolle</th>
<td><span class="badge badge--warning"><?= htmlspecialchars($textSemantics['discourse_role'] ?? '-') ?></span></td>
</tr>
<tr>
<th>Modell</th>
<td><code><?= htmlspecialchars($textSemantics['model_used'] ?? '-') ?></code></td>
</tr>
</table>
<?php endif; ?>
<div class="chunk-navigation">
<?php if ($prevChunk): ?>
<a href="/semantic-explorer/chunks/<?= $prevChunk['id'] ?>" class="btn btn--small">« Vorheriger (#<?= $prevChunk['chunk_index'] ?>)</a>
<?php endif; ?>
<?php if ($nextChunk): ?>
<a href="/semantic-explorer/chunks/<?= $nextChunk['id'] ?>" class="btn btn--small">Naechster (#<?= $nextChunk['chunk_index'] ?>) »</a>
<?php endif; ?>
</div>
<?php if (!empty($chunk['heading_path_decoded'])): ?>
<h2>Heading-Pfad</h2>
<table>
<tr>
<th>Pfad</th>
<td><?= htmlspecialchars(implode(' > ', $chunk['heading_path_decoded'])) ?></td>
</tr>
</table>
<?php endif; ?>
<h2>Inhalt</h2>
<div class="chunk-content">
<?= $chunk['content'] ?>
</div>
<h2>Metadaten</h2>
<table>
<tr><th>Dokument</th><td><a href="/semantic-explorer/dokumente/<?= $chunk['document_id'] ?>"><?= htmlspecialchars($chunk['filename']) ?></a></td></tr>
<tr><th>Pfad</th><td><code><?= htmlspecialchars($chunk['source_path']) ?></code></td></tr>
<tr><th>Chunk-Index</th><td><?= $chunk['chunk_index'] ?></td></tr>
<tr><th>Qdrant-ID</th><td><code><?= htmlspecialchars($chunk['qdrant_id'] ?? '-') ?></code></td></tr>
<tr><th>Erstellt</th><td><?= date('d.m.Y H:i:s', strtotime($chunk['created_at'])) ?></td></tr>
</table>
<?php if (!empty($chunk['metadata_decoded'])): ?>
<h2>Zusatz-Metadaten</h2>
<pre class="code-block"><?= htmlspecialchars(json_encode($chunk['metadata_decoded'], JSON_PRETTY_PRINT | JSON_UNESCAPED_UNICODE)) ?></pre>
<?php endif; ?>
<p class="links-bar">
<a href="/semantic-explorer/chunks">Alle Chunks</a> |
<a href="/semantic-explorer/dokumente/<?= $chunk['document_id'] ?>">Zum Dokument</a>
</p>
<?php $content = ob_get_clean(); ?>
<?php require VIEW_PATH . '/layout.php'; ?>