refactor: короче методы, чище тесты, README разгружен
- ShellTool::handle 108 → 52 строк: tempFiles() и run() отдельно - CsvQueryTool::handle 103 → 80: readRows() и pickRows() отдельно - в кейсах тестов оставлены только используемые use (было 26 в каждом) - README 653 → 261 строк: инструменты, примеры, провайдеры и справочник вынесены в docs/ - 100 тестов
This commit is contained in:
1 parent
76b3be7115
commit
27c0fc2477
13 files changed
+546
-616
No files matched your search
@@ -4,32 +4,10 @@ declare(strict_types=1);
|
||||
|
||||
// Тесты: http. Запускаются из tests/run.php.
|
||||
|
||||
use AiSdk\Agent;
|
||||
use AiSdk\ChatClient;
|
||||
use AiSdk\ChatResult;
|
||||
use AiSdk\HttpTransport;
|
||||
use AiSdk\HttpRequest;
|
||||
use AiSdk\LoggingClient;
|
||||
use AiSdk\Tool;
|
||||
use AiSdk\ToolRegistry;
|
||||
use AiSdk\Tools\CalculatorTool;
|
||||
use AiSdk\Tools\ConvertUnitsTool;
|
||||
use AiSdk\Tools\CsvQueryTool;
|
||||
use AiSdk\Tools\DateCalcTool;
|
||||
use AiSdk\Tools\FileSandbox;
|
||||
use AiSdk\Tools\FindFilesTool;
|
||||
use AiSdk\Tools\JsonQueryTool;
|
||||
use AiSdk\Tools\FinishTool;
|
||||
use AiSdk\Tools\HashTool;
|
||||
use AiSdk\Tools\HttpRequestTool;
|
||||
use AiSdk\Tools\ListDirTool;
|
||||
use AiSdk\Tools\ReadFileTool;
|
||||
use AiSdk\Tools\ReplaceInFileTool;
|
||||
use AiSdk\Tools\SearchFilesTool;
|
||||
use AiSdk\Tools\ShellTool;
|
||||
use AiSdk\Tools\TimeTool;
|
||||
use AiSdk\Tools\WriteFileTool;
|
||||
use AiSdk\Tools\UuidTool;
|
||||
|
||||
// ---------------------------------------------------------------------------
|
||||
// http_request: сборка запроса (без сети)
|
||||
@@ -110,7 +88,6 @@ test('http: заголовки превращаются в строки cURL', f
|
||||
assertSame(['Accept: */*'], HttpTransport::headerLines(['Accept: */*']));
|
||||
});
|
||||
|
||||
|
||||
// ---------------------------------------------------------------------------
|
||||
// http_request: защита от SSRF (без сети)
|
||||
// ---------------------------------------------------------------------------
|
||||
|
||||
Reference in new issue
Block a user