first commit

This commit is contained in:
team 1
2026-02-11 14:15:08 +01:00
parent a4742c2c38
commit aa7d362bc3
58 changed files with 9999 additions and 0 deletions

View File

@@ -0,0 +1,25 @@
<?php
// src/Knowledge/Retrieval/ChunkIndexLoader.php
declare(strict_types=1);
namespace App\Knowledge\Retrieval;
final class ChunkIndexLoader
{
public function __construct(
private string $indexPath
) {}
public function load(): array
{
if (!is_file($this->indexPath)) {
return [];
}
$json = file_get_contents($this->indexPath);
$data = $json ? json_decode($json, true) : null;
return is_array($data) ? $data : [];
}
}