mirror of
https://github.com/hellodigua/ChatLab.git
synced 2026-05-25 08:00:16 +08:00
feat: 新增指定格式导入
This commit is contained in:
@@ -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
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取格式的预处理器(如果有)
|
||||
*/
|
||||
|
||||
Reference in New Issue
Block a user