Move tauri imports behind platform abstraction, merge CUDA build into release workflow

- Add openPath and pickDirectory to PlatformFilesystem interface
- Remove direct @tauri-apps/plugin-shell and plugin-dialog imports from app
- Merge build-cuda.yml into release.yml as a parallel job
This commit is contained in:
Jamie Pine
2026-03-13 11:33:32 -07:00
parent b01076b6b3
commit 9044b986f3
6 changed files with 91 additions and 88 deletions
@@ -446,8 +446,7 @@ export function ModelManagement() {
className="text-xs text-muted-foreground h-7 px-2"
onClick={async () => {
try {
const { open } = await import('@tauri-apps/plugin-shell');
await open(cacheDir.path);
await platform.filesystem.openPath(cacheDir.path);
} catch {
toast({ title: 'Failed to open model folder', variant: 'destructive' });
}
@@ -462,14 +461,9 @@ export function ModelManagement() {
className="text-xs text-muted-foreground h-7 px-2"
onClick={async () => {
try {
const { open: openDialog } = await import('@tauri-apps/plugin-dialog');
const selected = await openDialog({
directory: true,
title: 'Choose model storage folder',
});
if (!selected) return;
const newDir =
typeof selected === 'string' ? selected : (selected as { path: string }).path;
const newDir = await platform.filesystem.pickDirectory(
'Choose model storage folder',
);
if (!newDir) return;
setPendingMigrateDir(newDir);
} catch {