Add Citation Explorer tool and graph-expansion badges to Advocate results

- citations.php + assets/js/citations.js: new tool page for browsing the
  FalkorDB citation graph by title/ID, with autocomplete, action pills
  (cites/cited_by/implements/chain), hop-by-hop navigation, and exploration trail
- advocate.js: tag graph-expanded source cards with 'via citation graph' badge
- DeepResearchAgent: propagate _graph_expanded flag through normalizeCorpusChunk
  and top_sources serialization so it reaches the frontend
- tools.css: add .dr-source-tag--graph variant (green pill)
- i18n.php: register 'citations' tool in all 4 languages with CIT icon

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
2026-05-18 22:30:04 +02:00
parent 60e341e98a
commit 04555a96b1
6 changed files with 437 additions and 2 deletions
+2
View File
@@ -374,6 +374,7 @@ final class DbnDeepResearchAgent
'source_url' => $s['source_url'] ?? null,
'source_origin' => $s['source_origin'] ?? 'corpus',
'authority_label'=> $s['authority_label'] ?? null,
'graph_expanded' => $s['graph_expanded'] ?? false,
'excerpt' => $s['excerpt'] ?? '',
], $topSources),
];
@@ -733,6 +734,7 @@ PROMPT;
'similarity' => $similarity,
'reranker_score' => $rerankerScore,
'document_id' => isset($chunk['document_id']) ? (int)$chunk['document_id'] : null,
'graph_expanded' => !empty($chunk['_graph_expanded']),
'source_origin' => 'corpus',
'authority_type' => $chunk['authority_type'] ?? null,
'jurisdiction' => $chunk['jurisdiction'] ?? null,