From 4c0fd0aeda8a460ebadd4f854f4b2abde906c81b Mon Sep 17 00:00:00 2001 From: jake Date: Sat, 21 Mar 2026 10:50:32 +0000 Subject: [PATCH] =?UTF-8?q?agent:=20foundation=20=E2=80=94=20sync=20increm?= =?UTF-8?q?ental=20changes=20from=20legacy=20codebase?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-Authored-By: Claude Opus 4.6 (1M context) --- crates/core/src/model_registry.rs | 2 +- crates/transcription/src/model_manager.rs | 2 +- src-tauri/src/commands/transcription.rs | 3 ++- src/lib/pages/DictationPage.svelte | 1 + src/lib/pages/FilesPage.svelte | 5 +++-- src/lib/pages/HistoryPage.svelte | 1 + src/lib/pages/SettingsPage.svelte | 7 ++++--- src/lib/pages/TasksPage.svelte | 4 ++-- src/lib/stores/page.svelte.js | 2 +- src/lib/utils/export.js | 10 ++++++---- 10 files changed, 22 insertions(+), 15 deletions(-) diff --git a/crates/core/src/model_registry.rs b/crates/core/src/model_registry.rs index d8bae40..e8ace94 100644 --- a/crates/core/src/model_registry.rs +++ b/crates/core/src/model_registry.rs @@ -71,7 +71,7 @@ static ALL_MODELS: LazyLock> = LazyLock::new(|| { languages: LanguageSupport::EnglishOnly, files: vec![ ModelFile { - filename: "model_int8.onnx", + filename: "encoder-model.onnx", url: "https://huggingface.co/onnx-community/parakeet-ctc-0.6b-ONNX/resolve/main/onnx/model_int8.onnx", size: Megabytes(1), }, diff --git a/crates/transcription/src/model_manager.rs b/crates/transcription/src/model_manager.rs index 707e914..3e15c19 100644 --- a/crates/transcription/src/model_manager.rs +++ b/crates/transcription/src/model_manager.rs @@ -91,7 +91,7 @@ async fn download_file( ); let client = reqwest::Client::builder() - .timeout(std::time::Duration::from_secs(30)) + .connect_timeout(std::time::Duration::from_secs(30)) .build() .map_err(|e| KonError::DownloadFailed(e.to_string()))?; diff --git a/src-tauri/src/commands/transcription.rs b/src-tauri/src/commands/transcription.rs index a6ba2bb..fabd1c7 100644 --- a/src-tauri/src/commands/transcription.rs +++ b/src-tauri/src/commands/transcription.rs @@ -123,6 +123,7 @@ pub async fn transcribe_pcm_parakeet( remove_fillers: bool, british_english: bool, anti_hallucination: bool, + format_mode: String, ) -> Result<(), String> { let engine = state.parakeet_engine.clone(); let audio = kon_core::AudioSamples::mono_16khz(samples); @@ -141,7 +142,7 @@ pub async fn transcribe_pcm_parakeet( remove_fillers, british_english, anti_hallucination, - format_mode: FormatMode::parse("Clean"), + format_mode: FormatMode::parse(&format_mode), }, ); diff --git a/src/lib/pages/DictationPage.svelte b/src/lib/pages/DictationPage.svelte index 446931e..f189157 100644 --- a/src/lib/pages/DictationPage.svelte +++ b/src/lib/pages/DictationPage.svelte @@ -322,6 +322,7 @@ removeFillers: settings.removeFillers, britishEnglish: settings.britishEnglish, antiHallucination: settings.antiHallucination, + formatMode: settings.formatMode, }); } else { await invoke("transcribe_pcm", { diff --git a/src/lib/pages/FilesPage.svelte b/src/lib/pages/FilesPage.svelte index 9c8f4f4..0ac9cf0 100644 --- a/src/lib/pages/FilesPage.svelte +++ b/src/lib/pages/FilesPage.svelte @@ -124,7 +124,8 @@ if (!fileTranscript) return; showExportMenu = false; const content = exportTranscript(fileTranscript, segments, format); - const ext = format === "vtt" ? "vtt" : format === "srt" ? "srt" : format === "md" ? "md" : "txt"; + const extMap = { vtt: "vtt", srt: "srt", md: "md", csv: "csv", html: "html" }; + const ext = extMap[format] || "txt"; const blob = new Blob([content], { type: "text/plain" }); const url = URL.createObjectURL(blob); const a = document.createElement("a"); @@ -230,7 +231,7 @@ >Export {#if showExportMenu}
- {#each [["txt", "Plain Text"], ["md", "Markdown"], ["srt", "SRT Subtitles"], ["vtt", "WebVTT"]] as [fmt, label]} + {#each [["txt", "Plain Text"], ["md", "Markdown"], ["csv", "CSV"], ["html", "HTML"], ["srt", "SRT Subtitles"], ["vtt", "WebVTT"]] as [fmt, label]}