1
0
Fork 0

fix: UI 출력 형식 카탈로그 확장 + 멀티홉 노출 2홉 제한

구버전 앱에서 새 변환이 드롭다운에 안 보이던 문제 — AllFormats(UI 화이트리스트)에 데이터/벡터/영상/오디오 형식이 없었음. 추가.

- AllFormats에 csv/json/xlsx/svg + 영상(mp4/webm/mkv/mov/avi) + 오디오(mp3/aac/m4a/opus/ogg/flac/wav) 16종 추가
- OutputsForInput 노출 maxHops 3→2: html→png→gif→mp4 같은 카테고리 횡단 과도 노출 차단 (실제 변환 FindBestPath는 3홉 유지)
- 테스트 38개 통과
This commit is contained in:
Yun Chan 2026-06-01 14:04:22 +09:00
parent 47a4a961e2
commit df07eb9bdd
2 changed files with 19 additions and 1 deletions

View file

@ -58,8 +58,10 @@ public sealed class ProviderRegistry
{
// 그래프 reachability(transitive closure)로 멀티홉 변환까지 노출한다 (예: json→xlsx, svg→jpg).
// 동일 포맷(self-edge: txt→txt AI, png→png 압축)은 '다른 형식으로 변환' 목록에서 제외.
// UI 노출용은 2홉으로 제한 — 3홉은 html→png→gif→mp4 같이 카테고리를 넘나드는 과도한 변환을 만든다.
// (실제 변환 FindBestPath는 options.MaxHops(기본 3)를 그대로 써서 사용자가 명시하면 더 깊은 경로도 수행)
var input = ConversionPair.Normalize(inputExtension);
return _graph.ReachableOutputs(input, maxHops: 3, allowLossy: true)
return _graph.ReachableOutputs(input, maxHops: 2, allowLossy: true)
.Where(o => !string.Equals(o, input, StringComparison.OrdinalIgnoreCase))
.OrderBy(e => e, StringComparer.OrdinalIgnoreCase)
.ToList();