mirror of
https://github.com/CherryHQ/cherry-studio.git
synced 2025-12-27 21:01:32 +08:00
refactor(ocr): 将 Tesseract 相关类型移动到文件底部以改善代码组织
This commit is contained in:
parent
45d3550492
commit
428de0836d
@ -72,10 +72,6 @@ export type OcrProviderConfig = {
|
||||
enabled?: boolean
|
||||
}
|
||||
|
||||
export type OcrTesseractConfig = OcrProviderConfig & {
|
||||
langs: Record<Tesseract.LanguageCode, boolean>
|
||||
}
|
||||
|
||||
export type OcrProvider = {
|
||||
id: string
|
||||
name: string
|
||||
@ -129,3 +125,12 @@ export type OcrResult = {
|
||||
export type OcrHandler = (file: SupportedOcrFile) => Promise<OcrResult>
|
||||
|
||||
export type OcrImageHandler = (file: ImageFileMetadata) => Promise<OcrResult>
|
||||
|
||||
// Tesseract Types
|
||||
export type OcrTesseractConfig = OcrProviderConfig & {
|
||||
langs: Record<Tesseract.LanguageCode, boolean>
|
||||
}
|
||||
|
||||
export type OcrTesseractProvider = BuiltinOcrProvider & {
|
||||
config: OcrTesseractConfig
|
||||
}
|
||||
|
||||
Loading…
Reference in New Issue
Block a user