feat: 新增指定格式导入

This commit is contained in:
digua
2026-04-10 20:58:00 +08:00
parent 96e21f7bd1
commit b8a0e9e8da
10 changed files with 293 additions and 3 deletions
+9
View File
@@ -73,6 +73,15 @@ export function getSupportedFormats(): FormatFeature[] {
return sniffer.getSupportedFormats()
}
/**
* 根据格式 ID 获取格式特征
* 用于手动指定格式时跳过嗅探
*/
export function getFormatFeatureById(formatId: string): FormatFeature | null {
const all = sniffer.getSupportedFormats()
return all.find((f) => f.id === formatId) ?? null
}
/**
* 获取格式的预处理器(如果有)
*/