feat(frontend): use Wails bindings for file I/O

Replace hidden file inputs and anchor downloads with native open/save
dialogs via a thin platform layer. WAV export sends base64 audio data to
the Go backend for writing to the user-chosen path.

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
2026-06-29 22:23:35 -07:00
parent 3a5d9d849f
commit 45075b3328
8 changed files with 120 additions and 42 deletions
+5 -1
View File
@@ -4,6 +4,7 @@ import { fileURLToPath } from 'node:url'
import type { IncomingMessage, ServerResponse } from 'node:http'
import { defineConfig, type Connect, type Plugin } from 'vite'
import { svelte } from '@sveltejs/vite-plugin-svelte'
import wails from '@wailsio/runtime/plugins/vite'
const repoRoot = resolve(fileURLToPath(import.meta.url), '../..')
const assetsDir = resolve(repoRoot, 'assets')
@@ -49,8 +50,11 @@ function serveRepoAssets(): Plugin {
}
export default defineConfig({
plugins: [svelte(), serveRepoAssets()],
plugins: [svelte(), wails('./bindings'), serveRepoAssets()],
server: {
host: '127.0.0.1',
port: Number(process.env.WAILS_VITE_PORT) || 5173,
strictPort: true,
fs: {
allow: [repoRoot],
},