This commit is contained in:
Your Name
2026-10-23 13:57:11 +08:00
parent ff98014fa2
commit e86ee4ae66
28 changed files with 3310 additions and 66 deletions
@@ -76,6 +76,7 @@ namespace {
$root = dirname(__DIR__, 2);
require $root . '/server/app/common/logic/BaseLogic.php';
require $root . '/server/app/common/service/DifyChatService.php';
require $root . '/server/app/common/service/DifyStreamTiming.php';
require $root . '/server/app/adminapi/service/AssistantSseTiming.php';
require $root . '/server/app/adminapi/logic/tcm/DiagnosisAiLogic.php';
use app\common\service\DifyChatService;
@@ -91,7 +92,9 @@ namespace {
$files = array_map(static fn (int $id): array => ['type' => 'image', 'url' => 'https://synthetic.invalid/' . $id . '.png'], [1, 2]);
$sections = array_map(static fn (int $id): array => ['key' => 'source_' . $id, 'label' => 'synthetic',
'count' => $id === 13 ? 0 : 1, 'availability' => $id === 13 ? 'empty' : 'present'], range(1, 13));
$options = ['required_files' => true, 'knowledge_mode' => 'evidence', 'required_sections' => $sections];
// Test the one-attempt classification boundary in isolation. Public-entry
// clinical batching/recovery is covered by DifyClinicalAttachmentBatchTest.
$options = ['required_files' => true, '_required_batch_internal' => true, 'knowledge_mode' => 'evidence', 'required_sections' => $sections];
$reset = static function (array $fixtures): void {
$GLOBALS['classificationFixtures'] = $fixtures;
$GLOBALS['classificationRequests'] = [];