feat(followup-audio): review full dialogue and bind roles before extraction

This commit is contained in:
2026-10-10 14:25:03 +08:00
parent f015b26ae1
commit b4acad8510
14 changed files with 360 additions and 43 deletions
@@ -49,6 +49,7 @@ final class FollowupAudioLogic
public static function create(array $p, int $actor, array $info): array
{
$channelRoles = Store::validateChannelRoles(array_key_exists('channel_roles', $p) ? $p['channel_roles'] : 'unconfirmed');
self::requireEnabled(true);
Access::diagnosis($p['diagnosis_id'], $actor, $info);
$upload = Upload::owned($p['upload_id'], $actor, $info);
@@ -63,7 +64,7 @@ final class FollowupAudioLogic
if (!in_array($p['model_key'], ['qwen', 'openai'], true) || !Store::ready($p['model_key'])) {
throw new DomainException('所选模型音频能力尚未验证');
}
return Store::create($upload, $p['recorded_at'], $p['model_key'], $actor, $info);
return Store::create($upload, $p['recorded_at'], $p['model_key'], $actor, $info, $channelRoles);
}
public static function lists(int $diagnosisId, int $actor, array $info): array