feat: implement platform provider architecture and integrate into AppRoot

- Introduced a new platform provider architecture to manage platform-specific functionalities.
- Created `PlatformProvider`, `PlatformContext`, and related capabilities for handling downloads and key imports.
- Integrated the platform provider into `AppRoot`, allowing for dynamic platform management.
- Added error handling classes for unsupported and unimplemented methods.
- Updated tests to validate the new platform provider functionalities and capabilities.
This commit is contained in:
鲁树人 committed 2026-11-01 10:46:52 +09:00
1 parent d86323e38a
commit cc688b85bd
13 files changed
+483 -45

No files matched your search

+10
View File
@@ -0,0 +1,10 @@
import { createBrowserProvider } from './browser/BrowserProvider';
import type { PlatformProvider } from './PlatformProvider';
/**
* Resolve the active platform backend.
* Currently always returns the browser provider; native (e.g. Tauri) switching can be added here later.
*/
export function createPlatformProvider(): PlatformProvider {
return createBrowserProvider();
}