mirror of
https://github.com/toeverything/AFFiNE.git
synced 2026-07-28 15:55:19 +08:00
feat(core): import progress & perf (#15197)
#### PR Dependency Tree * **PR #15197** 👈 This tree was auto-generated by [Charcoal](https://github.com/danerwilliams/charcoal) <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit * **New Features** * Added a new import pipeline with “plan then commit” batch handling for Markdown, Notion HTML, Obsidian, and Bear backups. * Enabled native import sessions with progress, cancellation, and batch-by-batch committing (including assets, folders, icons, and tags). * Added web preflight limits for ZIP and multi-file imports. * **Bug Fixes** * Improved import error/warning reporting and continued processing when some items fail. * Strengthened snapshot-based file/directory picking to preserve paths. * **Chores** * Updated project packaging/configuration for the new import workflow. <!-- end of auto-generated comment: release notes by coderabbit.ai -->
This commit is contained in:
Vendored
+25
-9
@@ -18,13 +18,6 @@ export declare class ApplicationStateChangedSubscriber {
|
||||
unsubscribe(): void
|
||||
}
|
||||
|
||||
export declare class AudioCaptureSession {
|
||||
stop(): void
|
||||
get sampleRate(): number
|
||||
get channels(): number
|
||||
get actualSampleRate(): number
|
||||
}
|
||||
|
||||
export declare class ShareableContent {
|
||||
static onApplicationListChanged(callback: ((err: Error | null, ) => void)): ApplicationListChangedSubscriber
|
||||
static onAppStateChanged(app: ApplicationInfo, callback: ((err: Error | null, ) => void)): ApplicationStateChangedSubscriber
|
||||
@@ -32,8 +25,6 @@ export declare class ShareableContent {
|
||||
static applications(): Array<ApplicationInfo>
|
||||
static applicationWithProcessId(processId: number): ApplicationInfo | null
|
||||
static isUsingMicrophone(processId: number): boolean
|
||||
static tapAudio(processId: number, audioStreamCallback: ((err: Error | null, arg: Float32Array) => void)): AudioCaptureSession
|
||||
static tapGlobalAudio(excludedProcesses: Array<ApplicationInfo> | undefined | null, audioStreamCallback: ((err: Error | null, arg: Float32Array) => void)): AudioCaptureSession
|
||||
}
|
||||
|
||||
export declare function abortRecording(id: string): Promise<void>
|
||||
@@ -75,6 +66,29 @@ export interface RecordingStartOptions {
|
||||
export declare function startRecording(opts: RecordingStartOptions): Promise<RecordingSessionMeta>
|
||||
|
||||
export declare function stopRecording(id: string): Promise<RecordingArtifact>
|
||||
export declare function cancelImportSession(sessionId: string): void
|
||||
|
||||
export interface CreateImportBatchLimits {
|
||||
maxDocs?: number
|
||||
maxBlobs?: number
|
||||
maxBlobBytes?: number
|
||||
}
|
||||
|
||||
export declare function createImportSession(options: CreateImportSessionOptions): string
|
||||
|
||||
export interface CreateImportSessionOptions {
|
||||
format: string
|
||||
source: CreateImportSessionSource
|
||||
batchLimits?: CreateImportBatchLimits
|
||||
}
|
||||
|
||||
export interface CreateImportSessionSource {
|
||||
kind: string
|
||||
path: string
|
||||
}
|
||||
|
||||
export declare function disposeImportSession(sessionId: string): void
|
||||
|
||||
export interface MermaidRenderOptions {
|
||||
theme?: string
|
||||
fontFamily?: string
|
||||
@@ -92,6 +106,8 @@ export interface MermaidRenderResult {
|
||||
|
||||
export declare function mintChallengeResponse(resource: string, bits?: number | undefined | null): Promise<string>
|
||||
|
||||
export declare function nextImportBatch(sessionId: string): string | null
|
||||
|
||||
export declare function renderMermaidSvg(request: MermaidRenderRequest): MermaidRenderResult
|
||||
|
||||
export declare function renderTypstSvg(request: TypstRenderRequest): TypstRenderResult
|
||||
|
||||
Reference in New Issue
Block a user