Skip to content

Local, full Windows search replacement, clipboard manager, and launcher: files, apps, settings and semantic media search with Google's EmbeddingGemma 2.

Add opt-in camera RAW previews and guarded visual indexing

ampersandrubf894db0c266
diff --git a/.github/workflows/native-windows.yml b/.github/workflows/native-windows.yml
index 5f5e013..102eeaa 100644
--- a/.github/workflows/native-windows.yml
+++ b/.github/workflows/native-windows.yml
@@ -1,7 +1,7 @@
name: Native Windows
on:
pull_request:
- paths: ['native/**', 'Build-Rust.ps1', 'packaging/VectorDash-Rust.iss', '.github/workflows/native-windows.yml']
+ paths: ['native/**', 'Build-Rust.ps1', 'Build-Raw.ps1', 'packaging/VectorDash-Rust.iss', '.github/workflows/native-windows.yml']
workflow_dispatch:
permissions:
contents: read
diff --git a/Build-Raw.ps1 b/Build-Raw.ps1
new file mode 100644
index 0000000..ba8b213
--- /dev/null
+++ b/Build-Raw.ps1
@@ -0,0 +1,32 @@
+# Pinned optional camera decoder. Runs only when Sources > camera RAW is enabled.
+$ErrorActionPreference='Stop'
+$taskRawRoot=Join-Path $PSScriptRoot '.build-tools/raw'
+$taskRawZip=Join-Path $taskRawRoot 'LibRaw-0.22.2-Win64.zip'
+New-Item -ItemType Directory -Force $taskRawRoot | Out-Null
+if (!(Test-Path -LiteralPath $taskRawZip)) {
+ Invoke-WebRequest 'https://www.libraw.org/data/LibRaw-0.22.2-Win64.zip' -OutFile $taskRawZip
+}
+if ((Get-FileHash -LiteralPath $taskRawZip -Algorithm SHA256).Hash.ToLowerInvariant() -ne 'ac64fa12bb00a7581332d4c6ab918c0533fb3f119d6b668d47a6875410dca948') {throw 'LibRaw checksum mismatch'}
+Expand-Archive -LiteralPath $taskRawZip -DestinationPath $taskRawRoot -Force
+$taskRawSource=Join-Path $taskRawRoot 'LibRaw-0.22.2'
+$taskVswhere=Join-Path ${env:ProgramFiles(x86)} 'Microsoft Visual Studio/Installer/vswhere.exe'
+$taskVs=& $taskVswhere -latest -products '*' -requires Microsoft.VisualStudio.Component.VC.Tools.x86.x64 -property installationPath
+if (!$taskVs) {throw 'MSVC C++ build tools required to build the isolated LibRaw adapter'}
+$taskVcvars=Join-Path $taskVs 'VC/Auxiliary/Build/vcvars64.bat'
+$taskRawOut=Join-Path $PSScriptRoot 'native/target/raw-decoder'
+New-Item -ItemType Directory -Force $taskRawOut | Out-Null
+$taskCpp=Join-Path $PSScriptRoot 'native/raw/decode.cpp'
+# Compilation only: no destructive filesystem operations are delegated to cmd.
+$taskCompile='cl /nologo /std:c++17 /EHsc /O2 /MD /I"'+$taskRawSource+'" "'+$taskCpp+'" /Fo"'+$taskRawOut+'/decode.obj" /Fe"'+$taskRawOut+'/vectordash-raw.exe" /link "'+$taskRawSource+'/lib/libraw.lib"'
+$taskBat=Join-Path $taskRawOut 'compile.cmd'
+@('@echo off',('call "'+$taskVcvars+'" >nul'),'if errorlevel 1 exit /b 1',$taskCompile,'exit /b %errorlevel%') | Set-Content -LiteralPath $taskBat -Encoding ascii
+& $env:ComSpec /d /c $taskBat
+if ($LASTEXITCODE) {throw 'RAW adapter build failed'}
+Copy-Item -LiteralPath (Join-Path $taskRawSource 'bin/libraw.dll') -Destination $taskRawOut -Force
+# App-local CRT for machines without the Visual C++ redistributable installed.
+$taskRedist=Get-ChildItem -LiteralPath (Join-Path $taskVs 'VC/Redist/MSVC') -Directory | Where-Object {$_.Name -match '^\d'} | Sort-Object Name -Descending | Select-Object -First 1
+$taskCrt=Join-Path $taskRedist.FullName 'x64/Microsoft.VC143.CRT'
+if (!(Test-Path -LiteralPath $taskCrt)) {$taskCrt=Join-Path $taskRedist.FullName 'x64/Microsoft.VC145.CRT'}
+if (!(Test-Path -LiteralPath $taskCrt)) {throw 'MSVC redistributable CRT not found'}
+Get-ChildItem -LiteralPath $taskCrt -File -Filter '*.dll' | ForEach-Object {Copy-Item -LiteralPath $_.FullName -Destination $taskRawOut -Force}
+
diff --git a/Build-Rust.ps1 b/Build-Rust.ps1
index 4b556a5..44e05b9 100644
--- a/Build-Rust.ps1
+++ b/Build-Rust.ps1
@@ -41,9 +41,19 @@ if (!(Test-Path '.build-tools/ffmpeg-rust/LICENSE')) {
Copy-Item -LiteralPath $taskFfmpegLicense.FullName -Destination '.build-tools/ffmpeg-rust/LICENSE'
}
foreach ($taskName in @('ffmpeg.exe','ffplay.exe','ffprobe.exe')) {Copy-Item -LiteralPath (Join-Path $PSScriptRoot ('.build-tools/ffmpeg-rust/'+$taskName)) -Destination $taskBundle -Force}
+& (Join-Path $PSScriptRoot 'Build-Raw.ps1')
+if ($LASTEXITCODE) {throw 'RAW decoder build failed'}
+$taskRawBundle=Join-Path $taskBundle 'raw-decoder'
+New-Item -ItemType Directory -Force $taskRawBundle | Out-Null
+Get-ChildItem -LiteralPath 'native/target/raw-decoder' -File | Where-Object {$_.Extension -in @('.exe','.dll')} | ForEach-Object {Copy-Item -LiteralPath $_.FullName -Destination $taskRawBundle}
Copy-Item -LiteralPath LICENSE -Destination $taskBundle
$taskNotices=Join-Path $taskBundle 'licenses'
New-Item -ItemType Directory -Force $taskNotices | Out-Null
+$taskRawNotices=Join-Path $taskNotices 'LibRaw-0.22.2'
+New-Item -ItemType Directory -Force $taskRawNotices | Out-Null
+Copy-Item -LiteralPath '.build-tools/raw/LibRaw-0.22.2/LICENSE.CDDL','.build-tools/raw/LibRaw-0.22.2/COPYRIGHT','native/raw/NOTICE.txt' -Destination $taskRawNotices
+# Exact unmodified upstream source accompanies the separately licensed DLL.
+Copy-Item -LiteralPath '.build-tools/raw/LibRaw-0.22.2-Win64.zip' -Destination $taskRawNotices
Copy-Item -LiteralPath 'packaging/notices/SQLCipher-LICENSE.txt','packaging/notices/OpenSSL-LICENSE.txt' -Destination $taskNotices
$taskEframeNotices=Join-Path $taskNotices 'eframe-0.33.3'
New-Item -ItemType Directory -Force $taskEframeNotices | Out-Null
@@ -82,8 +92,8 @@ if (Test-Path $taskPortable) { throw 'Portable staging directory already exists.
New-Item -ItemType Directory -Force $taskPortable | Out-Null
Get-ChildItem -LiteralPath $taskBundle | Copy-Item -Destination $taskPortable -Recurse -Force
Set-Content -LiteralPath (Join-Path $taskPortable 'portable.flag') -Value '' -Encoding ascii
-Compress-Archive -Path (Join-Path $taskPortable '*') -DestinationPath 'dist/installer/VectorDash-Rust-0.3.20-x64.zip' -Force
-$taskInstaller='dist/installer/VectorDash-Rust-Setup-0.3.20-x64.exe'
-$taskZip='dist/installer/VectorDash-Rust-0.3.20-x64.zip'
+Compress-Archive -Path (Join-Path $taskPortable '*') -DestinationPath 'dist/installer/VectorDash-Rust-0.3.21-x64.zip' -Force
+$taskInstaller='dist/installer/VectorDash-Rust-Setup-0.3.21-x64.exe'
+$taskZip='dist/installer/VectorDash-Rust-0.3.21-x64.zip'
@($taskInstaller,$taskZip) | ForEach-Object {((Get-FileHash -LiteralPath $_ -Algorithm SHA256).Hash.ToLowerInvariant()+' '+(Split-Path $_ -Leaf))} | Set-Content 'dist/installer/RUST-SHA256SUMS.txt' -Encoding ascii
Write-Output "Native installer and portable ZIP ready."
diff --git a/README.md b/README.md
index 23187af..bcaffdc 100644
--- a/README.md
+++ b/README.md
@@ -57,6 +57,8 @@ Enable **Include Start menu programs** in Sources to search installed program sh
**File/Folder Names** search needs no model. In **Sources**, choose **Quick file / folder names** or **Full index** before adding drives, folders or files. To change existing sources, select entries (or **Select/Deselect all**) and apply a mode, then update the index. In either search window, choose **Hybrid**, **File/Folder Names** or **Semantic**, and use the source dropdown to search some or all sources. More specific folders take priority when sources overlap. Index status shows Full/Quick file counts and how many files have vectors. Enable **Skip Windows system and frequently changing cache folders** in Sources to omit temp files, crash dumps, update staging and selected caches while keeping personal folders and Program Files.
+**Camera RAW (preview):** optional ARW, CR2/CR3, DNG, RAF and other LibRaw-supported camera formats. Enable **Sources → Index camera RAW photos** (off by default), save, then update a Full source. Embedded previews are preferred; slower development fallback is a separate opt-in. Original files stay untouched, and Quick sources still search names only. See [file coverage](docs/RETRIEVAL.md#file-coverage) for limits.
+
Semantic search needs the model and a compatible llama-server. Image/audio search also needs its matching encoder. You can select existing files instead of downloading them. Changing the model or encoder requires rebuilding the index once.
| Shortcut | Action |
@@ -100,6 +102,7 @@ Parakeet provides **English speech-to-text**, independently of semantic search.
| Parakeet speech runtime — optional | Runs the dictation model above | CPU ~19 MB; CUDA and libraries ~1.83 GB |
| [FFmpeg / FFprobe / FFplay](https://ffmpeg.org/) | Extracts media frames/audio and plays matched moments; bundled | About 150 MB unpacked |
| [PDFium](https://pdfium.googlesource.com/pdfium/) | PDF extraction and page previews; bundled | About 10–25 MB |
+| [LibRaw](https://www.libraw.org/) — RAW preview builds | Camera embedded previews and optional reduced-resolution RAW development; bundled, idle cost zero | Decoder/runtime ~3 MB; source and notices ~3.5 MB |
Install only the runtime for your hardware. OCR is optional for image meaning searches; it helps with exact text. FFmpeg and the encoder are needed for media processing.
diff --git a/docs/RETRIEVAL.md b/docs/RETRIEVAL.md
index 74f71aa..6a3ff6e 100644
--- a/docs/RETRIEVAL.md
+++ b/docs/RETRIEVAL.md
@@ -27,6 +27,7 @@ Run `windows/qa_retrieval.py` to reproduce the generated-file checks. `windows/q
| XLSX | Worksheet names, cell addresses, shared strings and stored cell values; no formula execution |
| PPTX | Slide text and slide number; passage preview |
| Photos/screenshots | Image embeddings plus optional Tesseract OCR for exact text |
+| Camera RAW (experimental, off by default) | ARW, CR2/CR3, DNG, RAF and other LibRaw-supported formats; embedded JPEG/RGB preview first, optional reduced-resolution development; Full sources only |
| Audio/music | Overlapping 30-second non-silent windows; semantic retrieval and time locations; no transcript or exact lyric guarantee |
| Video/movies | Frames every few seconds and on scene changes, optional frame OCR, plus audio windows; long videos can take substantial time to index |
| Code | Opt-in project scope; functions/passages with line locations; respects Git ignores |
@@ -34,4 +35,10 @@ Run `windows/qa_retrieval.py` to reproduce the generated-file checks. `windows/q
| Safetensors | Bounded JSON metadata only; tensor weights are not embedded |
| RAR, legacy DOC/XLS/PPT, other weights/binaries | Filename search only |
+RAW support uses a pinned LibRaw 0.22.2 helper and the existing image embedding, thumbnail and Quick Look paths. Search results retain the original RAW path. Enable it in Sources, save, and run Update index: RAW-specific recipe stamps upgrade unchanged filename-only entries without rebuilding unrelated content. Quick sources and disabled RAW support never decode camera files. Unsupported/corrupt RAWs remain searchable by name and log a warning; unchanged failures are not repeatedly retried unless Retry failed extraction is enabled.
+
+RAW has a separate input-size limit (default 256 MiB, configurable 16–1024 MiB), one decoder at a time, a 512 MiB process budget, 128 MiB LibRaw raw-buffer cap, 16MP decoded-image limit and 45-second limit per attempt. Output is reduced to a 2048px longest edge. Development is optional and restricted to sensor data up to 50MP; half-resolution output does not remove the need to unpack the sensor. Camera variants, unsupported preview encodings and files exceeding these limits can remain filename-only. Originals are read-only. This first preview writes no persistent derived-image cache; adding a bounded cache that follows index encryption is a planned improvement. Multimodal remote embeddings send the derived image to the configured server just like ordinary photos.
+
+Validation uses CC0 camera samples from [raw.pixls.us](https://raw.pixls.us/): Sony ILCE-7S and ILCE-6700 ARW (the latter over 32 MiB), Canon EOS 40D CR2, Fujifilm FinePix S5000 RAF and a Blackmagic Micro Cinema Camera DNG with no usable embedded preview. Real decoding, Unicode paths, uppercase extensions, a rotated QA copy, failure retention and unchanged rescans are checked. Embedding transport/search plumbing uses a deterministic 768-dimensional test server; this is not a RAW visual-relevance benchmark. Fixture originals and test indexes are not bundled with releases.
+
Abstract recollections, natural photos and long-media accuracy still depend on the model, input quality and sampling. The generated test counts above must not be presented as a real-world accuracy benchmark or as DigUp's published results. Update the index after upgrading to enable the new extraction and security options.
diff --git a/native/Cargo.lock b/native/Cargo.lock
index 78003ba..77fec99 100644
--- a/native/Cargo.lock
+++ b/native/Cargo.lock
@@ -5716,7 +5716,7 @@ checksum = "accd4ea62f7bb7a82fe23066fb0957d48ef677f6eeb8215f372f52e48bb32426"
[[package]]
name = "vectordash"
-version = "0.3.20"
+version = "0.3.21"
dependencies = [
"anyhow",
"arboard",
diff --git a/native/Cargo.toml b/native/Cargo.toml
index 419e874..c05ef6e 100644
--- a/native/Cargo.toml
+++ b/native/Cargo.toml
@@ -1,6 +1,6 @@
[package]
name = "vectordash"
-version = "0.3.20"
+version = "0.3.21"
edition = "2024"
license = "MIT"
[dependencies]
diff --git a/native/raw/NOTICE.txt b/native/raw/NOTICE.txt
new file mode 100644
index 0000000..16910c4
--- /dev/null
+++ b/native/raw/NOTICE.txt
@@ -0,0 +1,10 @@
+Camera RAW support is optional and disabled by default.
+VectorDash adapter (decode.cpp): MIT, VectorDash contributors.
+LibRaw 0.22.2: Copyright LibRaw LLC and contributors (see COPYRIGHT).
+Distributed here under CDDL-1.0, separately from VectorDash. LibRaw is unmodified.
+Source, headers, upstream notices and binaries: LibRaw-0.22.2-Win64.zip,
+provided alongside this notice. https://www.libraw.org/download
+The helper reads originals only and writes image bytes to its parent process.
+Camera/model support varies; enabling an extension does not guarantee all variants.
+Microsoft Visual C++ runtime DLLs are redistributed as build-tool runtime components,
+subject to their applicable Microsoft Visual Studio license terms.
diff --git a/native/raw/decode.cpp b/native/raw/decode.cpp
new file mode 100644
index 0000000..e6b2b0e
--- /dev/null
+++ b/native/raw/decode.cpp
@@ -0,0 +1,82 @@
+// MIT: VectorDash adapter. LibRaw is separately distributed under CDDL-1.0.
+// One read-only file, bounded output, no files written and no persistent process.
+#include <libraw/libraw.h>
+#include <algorithm>
+#include <cstdint>
+#include <cstdio>
+#include <fcntl.h>
+#include <io.h>
+#include <memory>
+#include <vector>
+
+static constexpr uint64_t PIXELS = 16000000;
+static constexpr uint64_t OUTPUT = 48 * 1024 * 1024;
+static int fail(const char* message) { fprintf(stderr, "%s", message); return 1; }
+static bool emit(libraw_processed_image_t* image, unsigned flip) {
+ if (!image || image->data_size == 0 || image->data_size > OUTPUT) return false;
+ if (image->type != LIBRAW_IMAGE_JPEG &&
+ (image->type != LIBRAW_IMAGE_BITMAP || image->bits != 8 || image->colors != 3 ||
+ uint64_t(image->width) * image->height > PIXELS ||
+ uint64_t(image->width) * image->height * 3 != image->data_size)) return false;
+ uint32_t header[] = {0x31524456, unsigned(image->type), image->width, image->height, flip, image->data_size};
+ return fwrite(header, sizeof(header), 1, stdout) == 1 &&
+ fwrite(image->data, 1, image->data_size, stdout) == image->data_size;
+}
+using Memory = std::unique_ptr<libraw_processed_image_t, decltype(&LibRaw::dcraw_clear_mem)>;
+int wmain(int argc, wchar_t** argv) {
+ _setmode(_fileno(stdout), _O_BINARY);
+ // Parent assigns the memory-limited Windows Job before releasing this gate.
+ if (argc != 3 || getchar() != 'G') return fail("Invalid RAW worker request");
+ auto owner = std::make_unique<LibRaw>(LIBRAW_OPTIONS_NO_DATAERR_CALLBACK);
+ auto &raw = *owner;
+ raw.imgdata.rawparams.max_raw_memory_mb = 128;
+ int code = raw.open_file(argv[1]);
+ if (code != LIBRAW_SUCCESS) return fail(LibRaw::strerror(code));
+ unsigned flip = raw.imgdata.sizes.flip < 0 ? 0 : raw.imgdata.sizes.flip;
+ if (wcscmp(argv[2], L"preview") == 0) {
+ auto list = raw.imgdata.thumbs_list;
+ std::vector<int> candidates;
+ for (int i = 0; i < std::min(list.thumbcount, int(LIBRAW_THUMBNAIL_MAXCOUNT)); ++i) {
+ auto &t = list.thumblist[i];
+ uint64_t pixels = uint64_t(t.twidth) * t.theight;
+ if (t.tlength > 0 && t.tlength <= OUTPUT && pixels <= PIXELS) candidates.push_back(i);
+ }
+ // Smallest camera preview >= 1MP; otherwise largest available thumbnail.
+ std::sort(candidates.begin(), candidates.end(), [&](int a, int b) {
+ uint64_t x = uint64_t(list.thumblist[a].twidth) * list.thumblist[a].theight;
+ uint64_t y = uint64_t(list.thumblist[b].twidth) * list.thumblist[b].theight;
+ if ((x >= 1000000) != (y >= 1000000)) return x >= 1000000;
+ return x >= 1000000 ? x < y : x > y;
+ });
+ if (candidates.empty()) candidates.push_back(-1);
+ raw.recycle();
+ for (int i : candidates) {
+ auto candidate = std::make_unique<LibRaw>(LIBRAW_OPTIONS_NO_DATAERR_CALLBACK);
+ auto &preview = *candidate;
+ preview.imgdata.rawparams.max_raw_memory_mb = 128;
+ if (preview.open_file(argv[1]) != LIBRAW_SUCCESS) continue;
+ code = i < 0 ? preview.unpack_thumb() : preview.unpack_thumb_ex(i);
+ if (code != LIBRAW_SUCCESS) continue;
+ int error = 0;
+ Memory image(preview.dcraw_make_mem_thumb(&error), &LibRaw::dcraw_clear_mem);
+ unsigned rotation = i >= 0 && list.thumblist[i].tflip <= 7 ? list.thumblist[i].tflip : flip;
+ if (image && emit(image.get(), rotation)) return 0;
+ }
+ return fail("No usable embedded JPEG/RGB preview; enable RAW development fallback to try decoding the sensor data");
+ }
+ if (wcscmp(argv[2], L"develop") != 0) return fail("Unknown RAW operation");
+ if (uint64_t(raw.imgdata.sizes.raw_width) * raw.imgdata.sizes.raw_height > 50000000)
+ return fail("RAW sensor exceeds the 50MP development budget; embedded previews can still be used");
+ raw.imgdata.params.half_size = 1;
+ raw.imgdata.params.user_flip = 0; // Rust applies orientation exactly once.
+ raw.imgdata.params.output_bps = 8;
+ raw.imgdata.params.output_color = 1;
+ raw.imgdata.params.use_camera_wb = 1;
+ raw.imgdata.params.no_auto_bright = 1;
+ if ((code = raw.unpack()) != LIBRAW_SUCCESS || (code = raw.dcraw_process()) != LIBRAW_SUCCESS)
+ return fail(LibRaw::strerror(code));
+ int error = 0;
+ Memory image(raw.dcraw_make_mem_image(&error), &LibRaw::dcraw_clear_mem);
+ if (!image || !emit(image.get(), flip)) return fail("RAW output exceeded the image budget or was unsupported");
+ return 0;
+}
diff --git a/native/src/app.rs b/native/src/app.rs
index 2a46767..35ae2e9 100644
--- a/native/src/app.rs
+++ b/native/src/app.rs
@@ -3099,6 +3099,21 @@ impl App {
"Search and launch Windows applications",
);
ui.checkbox(&mut self.s.index_images, "Index image meaning");
+ ui.checkbox(
+ &mut self.s.index_raw,
+ "Index camera RAW photos (experimental; off by default)",
+ );
+ if self.s.index_raw {
+ ui.indent("raw_options", |ui| {
+ ui.label("ARW, CR2/CR3, DNG, RAF and other LibRaw-supported cameras. Uses embedded previews first. Full sources only; originals stay untouched.");
+ ui.checkbox(&mut self.s.raw_develop, "Develop RAW when no usable preview exists (slower; off by default)");
+ ui.add(egui::Slider::new(&mut self.s.raw_max_mib, 16..=1024).text("Maximum RAW input size (MiB)"));
+ ui.weak("One decoder at a time · 512 MiB worker limit · 45 seconds per attempt · 2048px output. Development is limited to 50MP sensor data. Unsupported files remain searchable by name.");
+ if !crate::raw::installed() {ui.colored_label(Color32::RED, "RAW decoder missing: reinstall this preview build.");}
+ ui.weak("Save, then Update index to add visual content to existing RAW entries. Quick sources keep filename-only indexing.");
+ });
+ }
+
ui.checkbox(&mut self.s.index_audio, "Index audio moments");
ui.checkbox(&mut self.s.index_video, "Index video frames");
if self.s.index_images {
@@ -3312,9 +3327,9 @@ impl App {
ui.group(|ui|{
ui.heading("Status");
let loaded=self.engine.models.loaded.load(Ordering::Acquire);
- for(key,name)in [("runtime","Local llama-server"),("embedding","EmbeddingGemma 2"),("encoder","Photos / audio / video encoder"),("ocr","Tesseract OCR"),("dictation","Parakeet dictation"),("ffmpeg","FFmpeg"),("pdf","PDF renderer")]{
+ for(key,name)in [("runtime","Local llama-server"),("embedding","EmbeddingGemma 2"),("encoder","Photos / audio / video encoder"),("ocr","Tesseract OCR"),("dictation","Parakeet dictation"),("ffmpeg","FFmpeg"),("pdf","PDF renderer"),("raw","Camera RAW decoder")]{
let usage=self.component_stats.get(key).cloned().unwrap_or_default();
- let installed=if key=="dictation"{crate::dictation::ready(&self.home,&self.s)}else if key=="ffmpeg"||key=="pdf"{usage.disk>0}else{Path::new(match key{"runtime"=>&self.s.server,"embedding"=>&self.s.model,"encoder"=>&self.s.projector,_=>&self.s.ocr}).is_file()};
+ let installed=if key=="dictation"{crate::dictation::ready(&self.home,&self.s)}else if key=="ffmpeg"||key=="pdf"{usage.disk>0}else if key=="raw"{crate::raw::installed()}else{Path::new(match key{"runtime"=>&self.s.server,"embedding"=>&self.s.model,"encoder"=>&self.s.projector,_=>&self.s.ocr}).is_file()};
let active=if key=="dictation"{crate::dictation::pid()!=0}else if key=="encoder"{self.engine.models.media_loaded()}else if key=="runtime"||key=="embedding"{loaded}else{usage.ram>0};
let remote=if key=="dictation"{self.s.remote_dictation()}else{["runtime","embedding","encoder"].contains(&key)&&self.s.remote_embeddings()};
let state=if remote{let server=&self.remote_servers[usize::from(key=="dictation")];if server.busy{"Remote · checking…"}else if server.error{"Remote · not ready"}else if key=="encoder"{match server.vision{Some(true)=>"Remote · mmproj detected",Some(false)=>"Remote · mmproj not detected",None=>"Remote · vision not reported"}}else if server.note.is_empty(){"Remote · not checked"}else{"Remote · ready"}}else if active{"Loaded"}else if installed{"Installed · on demand"}else{"Not installed"};
@@ -3330,7 +3345,7 @@ impl App {
if remote {return;}
let managed=crate::resources::managed(&self.home,&self.s,key);
if installed{if ui.add_enabled(!self.setup_busy&&managed,egui::Button::new("Uninstall")).on_hover_text(if managed{"Remove this downloaded item"}else{"External or bundled: managed by its installer"}).clicked(){self.remove_component=Some(key.into());}}
- else if ui.add_enabled(!self.setup_busy&&!["ffmpeg","pdf"].contains(&key),egui::Button::new("Install")).clicked(){self.install_component(key);}
+ else if ui.add_enabled(!self.setup_busy&&!["ffmpeg","pdf","raw"].contains(&key),egui::Button::new("Install")).clicked(){self.install_component(key);}
});
});
}
diff --git a/native/src/cli.rs b/native/src/cli.rs
index 5fa494c..1ee6392 100644
--- a/native/src/cli.rs
+++ b/native/src/cli.rs
@@ -67,6 +67,9 @@ pub fn run(home: &Path, args: &[String]) -> Result<bool> {
if let Some(image) = get("--inspect-image") {
let image = crate::content::decode(Path::new(&image), &s)?;
report["image"] = serde_json::json!({"width":image.width(),"height":image.height()});
+ if let Some(output) = get("--output") {
+ std::fs::write(output, crate::content::jpeg(&image, 2048)?)?;
+ }
}
if let Some(source) = get("--import") {
let old = Settings::legacy(Path::new(&source))?;
@@ -88,6 +91,7 @@ pub fn run(home: &Path, args: &[String]) -> Result<bool> {
mode: mode.into(),
}];
s.save(home)?;
+ *engine.control.schedule.lock().unwrap() = s.clone();
engine.index(s.clone(), args.iter().any(|a| a == "--force"));
let mut first = None;
let mut progress = serde_json::Value::Null;
diff --git a/native/src/config.rs b/native/src/config.rs
index f7cefbc..4b61e57 100644
--- a/native/src/config.rs
+++ b/native/src/config.rs
@@ -102,6 +102,9 @@ pub struct Settings {
pub schedule_minute: u32,
pub idle_seconds: u32,
pub index_images: bool,
+ pub index_raw: bool,
+ pub raw_develop: bool,
+ pub raw_max_mib: u64,
pub index_audio: bool,
pub index_video: bool,
pub code_search: bool,
@@ -236,6 +239,9 @@ impl Default for Settings {
schedule_minute: 0,
idle_seconds: 120,
index_images: true,
+ index_raw: false,
+ raw_develop: false,
+ raw_max_mib: 256,
index_audio: true,
index_video: true,
code_search: false,
diff --git a/native/src/content.rs b/native/src/content.rs
index 4d339fb..bdee938 100644
--- a/native/src/content.rs
+++ b/native/src/content.rs
@@ -31,6 +31,9 @@ impl Segment {
}
}
pub fn is_image(e: &str) -> bool {
+ if crate::raw::is_raw(e) {
+ return true;
+ }
[
"jpg", "jpeg", "png", "webp", "avif", "jxl", "jpegxl", "bmp", "tif", "tiff", "gif",
]
@@ -53,6 +56,9 @@ pub fn is_code(e: &str) -> bool {
.contains(&e)
}
pub fn supports_content(ext: &str, s: &Settings) -> bool {
+ if crate::raw::is_raw(ext) {
+ return s.index_raw && (s.index_images || s.ocr_enabled);
+ }
is_image(ext)
|| is_audio(ext)
|| is_video(ext)
@@ -106,6 +112,9 @@ pub fn decode(path: &Path, s: &Settings) -> Result<DynamicImage> {
.unwrap_or_default()
.to_string_lossy()
.to_lowercase();
+ if crate::raw::is_raw(&ext) {
+ return crate::raw::decode(path, s);
+ }
let image = if ["jxl", "jpegxl"].contains(&ext.as_str()) {
let decoder = jxl_oxide::integration::JxlDecoder::new(fs::File::open(path)?)?;
let (width, height) = image::ImageDecoder::dimensions(&decoder);
@@ -257,8 +266,11 @@ pub fn extract(
) -> Result<Vec<Segment>> {
let size = fs::metadata(path)?.len();
anyhow::ensure!(
- size <= s.max_file_mib * 1024 * 1024
- || is_audio(&extension(path))
+ (if crate::raw::is_raw(&extension(path)) {
+ size <= s.raw_max_mib.clamp(16, 1024) * 1024 * 1024
+ } else {
+ size <= s.max_file_mib * 1024 * 1024
+ }) || is_audio(&extension(path))
|| is_video(&extension(path)),
"File exceeds configured parsing size limit"
);
diff --git a/native/src/engine.rs b/native/src/engine.rs
index b4efe9c..cf61f77 100644
--- a/native/src/engine.rs
+++ b/native/src/engine.rs
@@ -298,8 +298,13 @@ impl Control {
}
pub fn source_signature(s: &Settings) -> String {
format!(
- "{:?}|{:?}|{}|{}|{}",
- s.roots, s.exclusions, s.excluded_types, s.skip_windows_churn, s.code_search
+ "{:?}|{:?}|{}|{}|{}|{}",
+ s.roots,
+ s.exclusions,
+ s.excluded_types,
+ s.skip_windows_churn,
+ s.code_search,
+ crate::raw::stamp(s)
)
}
#[derive(Clone)]
@@ -916,6 +921,9 @@ impl Engine {
if ["html", "htm"].contains(&extension.as_str()) {
detail.push_str("|html-visible-v1");
}
+ if crate::raw::is_raw(&extension) {
+ detail.push_str(&crate::raw::stamp(s));
+ }
let raw_key = format!("{mt}|{}|{fingerprint}{detail}", meta.len());
let key = content_stamp(&raw_key, &extension).unwrap_or(raw_key);
let previous: Option<(String, String)> = conn
@@ -925,7 +933,8 @@ impl Engine {
|r| Ok((r.get(0)?, r.get(1)?)),
)
.optional()?;
- let legacy = previous.is_none()
+ let legacy = !crate::raw::is_raw(&extension)
+ && previous.is_none()
&& (!changed
|| conn
.query_row(
@@ -1559,6 +1568,9 @@ impl Engine {
// Normalize old global fingerprints to relevant per-file settings. This upgrades
// stamps without regenerating embeddings when an unrelated option changes.
fn content_stamp(raw: &str, ext: &str) -> Option<String> {
+ if crate::raw::is_raw(ext) && !raw.contains("|raw:libraw-0.22.2-preview-v1:") {
+ return None;
+ }
if raw.starts_with("v3|") {
return Some(raw.into());
}
@@ -1690,6 +1702,23 @@ mod scheduler_worker_tests {
#[cfg(test)]
mod fingerprint_tests {
+ #[test]
+ fn raw_upgrade_does_not_reembed_unrelated_files() {
+ let old = "v3|1|42|model|||true|old-ocr";
+ assert!(super::content_stamp(old, "arw").is_none());
+ assert_eq!(super::content_stamp(old, "png"), Some(old.into()));
+ let s = crate::config::Settings {
+ index_raw: true,
+ ..Default::default()
+ };
+ let new = format!(
+ "1|42|model|projector||true|true|true|old-ocr|false{}",
+ crate::raw::stamp(&s)
+ );
+ let key = super::content_stamp(&new, "arw").unwrap();
+ assert!(key.contains("raw:libraw-0.22.2-preview-v1:true"));
+ assert_eq!(super::content_stamp(&key, "arw"), Some(key));
+ }
#[test]
fn unrelated_options_do_not_reembed_documents() {
let a = "1|42|model|projector||true|true|true|old-ocr|false";
diff --git a/native/src/main.rs b/native/src/main.rs
index 5c8502b..478938c 100644
--- a/native/src/main.rs
+++ b/native/src/main.rs
@@ -19,6 +19,7 @@ mod models;
mod pdf;
mod platform;
mod previews;
+mod raw;
mod remote;
mod resources;
mod scheduling;
diff --git a/native/src/platform.rs b/native/src/platform.rs
index aab2dbb..7b98c6d 100644
--- a/native/src/platform.rs
+++ b/native/src/platform.rs
@@ -148,7 +148,7 @@ pub fn owned_process(_: &Child) -> Result<Job> {
Ok(Job())
}
#[cfg(windows)]
-pub fn limit_worker(child: &Child) -> Result<Job> {
+pub fn limit_worker_memory(child: &Child, mib: usize) -> Result<Job> {
use windows::Win32::{
Foundation::CloseHandle,
System::{
@@ -162,7 +162,7 @@ pub fn limit_worker(child: &Child) -> Result<Job> {
info.BasicLimitInformation.LimitFlags = JOB_OBJECT_LIMIT_KILL_ON_JOB_CLOSE
| JOB_OBJECT_LIMIT_PROCESS_MEMORY
| JOB_OBJECT_LIMIT_ACTIVE_PROCESS;
- info.ProcessMemoryLimit = 1024 * 1024 * 1024;
+ info.ProcessMemoryLimit = mib * 1024 * 1024;
info.BasicLimitInformation.ActiveProcessLimit = 4;
SetInformationJobObject(
job,
@@ -181,9 +181,12 @@ pub fn limit_worker(child: &Child) -> Result<Job> {
}
}
#[cfg(not(windows))]
-pub fn limit_worker(_: &Child) -> Result<Job> {
+pub fn limit_worker_memory(_: &Child, _: usize) -> Result<Job> {
Ok(Job())
}
+pub fn limit_worker(child: &Child) -> Result<Job> {
+ limit_worker_memory(child, 1024)
+}
#[cfg(windows)]
pub fn open(path: &str) -> Result<()> {
use windows::{
diff --git a/native/src/previews.rs b/native/src/previews.rs
index f2292b3..fd8f097 100644
--- a/native/src/previews.rs
+++ b/native/src/previews.rs
@@ -18,7 +18,9 @@ pub fn thumbnail(path: String, settings: Settings, tx: NotifySender) -> Result<(
std::thread::spawn(move || {
while let Ok(task) = rx.recv() {
let extension = crate::content::extension(Path::new(&task.path));
- let result = if crate::content::is_image(&extension) {
+ let result = if crate::content::is_image(&extension)
+ && (!crate::raw::is_raw(&extension) || task.settings.index_raw)
+ {
crate::content::decode(Path::new(&task.path), &task.settings)
.and_then(|i| crate::content::jpeg(&i, 64))
} else {
diff --git a/native/src/raw.rs b/native/src/raw.rs
new file mode 100644
index 0000000..5cf938c
--- /dev/null
+++ b/native/src/raw.rs
@@ -0,0 +1,276 @@
+//! Optional camera RAW decoding. LibRaw only runs in a short-lived, budgeted helper.
+//! No unencrypted derived-photo cache is written in this first preview release.
+use crate::config::Settings;
+use anyhow::{Context, Result};
+use image::{DynamicImage, GenericImageView};
+use std::{
+ io::{Read, Write},
+ path::{Path, PathBuf},
+ process::{Command, Stdio},
+ sync::{Mutex, MutexGuard, OnceLock},
+ time::{Duration, Instant},
+};
+
+pub const RECIPE: &str = "libraw-0.22.2-preview-v1";
+const OUTPUT: u64 = 48 * 1024 * 1024;
+const PIXELS: u64 = 16_000_000;
+static SERIAL: OnceLock<Mutex<()>> = OnceLock::new();
+
+pub fn is_raw(ext: &str) -> bool {
+ const EXTENSIONS: &[&str] = &[
+ "arw", "cr2", "cr3", "dng", "raf", "nef", "nrw", "orf", "rw2", "pef", "srw", "sr2", "srf",
+ "3fr", "erf", "kdc", "mos", "mrw", "rwl", "iiq",
+ ];
+ EXTENSIONS
+ .iter()
+ .any(|candidate| ext.eq_ignore_ascii_case(candidate))
+}
+
+pub fn helper() -> Result<PathBuf> {
+ Ok(std::env::current_exe()?
+ .with_file_name("raw-decoder")
+ .join("vectordash-raw.exe"))
+}
+pub fn installed() -> bool {
+ helper().is_ok_and(|p| p.is_file())
+}
+
+// All parent-process RAW requests (index extraction, thumbnails and Quick Look)
+// share this permit. An extraction subprocess has its own permit, never the UI's.
+pub fn serial(check: &dyn Fn() -> Result<()>) -> Result<MutexGuard<'static, ()>> {
+ let mutex = SERIAL.get_or_init(|| Mutex::new(()));
+ let start = Instant::now();
+ loop {
+ check()?;
+ match mutex.try_lock() {
+ Ok(guard) => return Ok(guard),
+ Err(std::sync::TryLockError::Poisoned(e)) => return Ok(e.into_inner()),
+ Err(std::sync::TryLockError::WouldBlock) => {}
+ }
+ anyhow::ensure!(
+ start.elapsed() < Duration::from_secs(120),
+ "RAW decoder queue busy; retry the preview later"
+ );
+ std::thread::sleep(Duration::from_millis(25));
+ }
+}
+pub fn stamp(s: &Settings) -> String {
+ format!(
+ "|raw:{RECIPE}:{}:{}:{}",
+ s.index_raw, s.raw_develop, s.raw_max_mib
+ )
+}
+fn orient(image: DynamicImage, flip: u32) -> Result<DynamicImage> {
+ Ok(match flip {
+ 0 => image,
+ 1 => image.fliph(),
+ 2 => image.flipv(),
+ 3 => image.rotate180(),
+ 4 => image.rotate90().fliph(),
+ 5 => image.rotate270(),
+ 6 => image.rotate90(),
+ 7 => image.rotate90().flipv(),
+ _ => anyhow::bail!("Invalid RAW orientation"),
+ })
+}
+fn parse(bytes: &[u8]) -> Result<DynamicImage> {
+ anyhow::ensure!(
+ bytes.len() >= 24 && bytes.len() as u64 <= OUTPUT + 24,
+ "Invalid RAW image message"
+ );
+ let field = |i| u32::from_le_bytes(bytes[i..i + 4].try_into().unwrap());
+ anyhow::ensure!(
+ field(0) == 0x31524456 && field(20) as usize == bytes.len() - 24,
+ "Invalid RAW image header"
+ );
+ let image = match field(4) {
+ 1 => {
+ let mut reader = image::ImageReader::with_format(
+ std::io::Cursor::new(&bytes[24..]),
+ image::ImageFormat::Jpeg,
+ );
+ let mut limits = image::Limits::default();
+ limits.max_alloc = Some(96 * 1024 * 1024);
+ limits.max_image_width = Some(16000);
+ limits.max_image_height = Some(16000);
+ // Inspect dimensions before allocating decoded pixels.
+ let (w, h) = image::ImageReader::with_format(
+ std::io::Cursor::new(&bytes[24..]),
+ image::ImageFormat::Jpeg,
+ )
+ .into_dimensions()?;
+ anyhow::ensure!(
+ u64::from(w) * u64::from(h) <= PIXELS,
+ "RAW preview exceeds the 16MP budget"
+ );
+ reader.limits(limits);
+ reader.decode()?
+ }
+ 2 => {
+ let (w, h) = (field(8), field(12));
+ anyhow::ensure!(
+ w > 0
+ && h > 0
+ && u64::from(w) * u64::from(h) <= PIXELS
+ && u64::from(w) * u64::from(h) * 3 == field(20) as u64,
+ "Invalid RAW bitmap dimensions"
+ );
+ DynamicImage::ImageRgb8(
+ image::RgbImage::from_raw(w, h, bytes[24..].to_vec())
+ .context("Invalid RAW bitmap")?,
+ )
+ }
+ _ => anyhow::bail!("Unsupported RAW preview format"),
+ };
+ orient(image, field(16))
+}
+fn invoke(path: &Path, operation: &str) -> Result<DynamicImage> {
+ let executable = helper()?;
+ anyhow::ensure!(
+ executable.is_file(),
+ "RAW decoder is missing; reinstall the RAW-preview build"
+ );
+ let mut command = Command::new(executable);
+ command
+ .arg(path)
+ .arg(operation)
+ .stdin(Stdio::piped())
+ .stdout(Stdio::piped())
+ .stderr(Stdio::piped());
+ crate::content::hidden(&mut command);
+ let mut child = command.spawn().context("Starting RAW decoder")?;
+ let job = match crate::platform::limit_worker_memory(&child, 512) {
+ Ok(job) => job,
+ Err(error) => {
+ let _ = child.kill();
+ let _ = child.wait();
+ return Err(error);
+ }
+ };
+ let result = (|| -> Result<DynamicImage> {
+ let output = child.stdout.take().context("RAW output")?;
+ let error = child.stderr.take().context("RAW diagnostics")?;
+ let (tx, rx) = crossbeam_channel::bounded(1);
+ std::thread::spawn(move || {
+ let mut bytes = Vec::new();
+ let result = output
+ .take(OUTPUT + 25)
+ .read_to_end(&mut bytes)
+ .map(|_| bytes);
+ let _ = tx.send(result);
+ });
+ let diagnostics = std::thread::spawn(move || {
+ let mut bytes = Vec::new();
+ let _ = error.take(16384).read_to_end(&mut bytes);
+ bytes
+ });
+ child
+ .stdin
+ .take()
+ .context("RAW startup gate")?
+ .write_all(b"G")?;
+ let bytes = rx
+ .recv_timeout(Duration::from_secs(45))
+ .context("RAW decoder exceeded 45-second limit")??;
+ // stdout closes only after the helper exits (or is killed by its Job).
+ let status = child.wait()?;
+ let message = String::from_utf8_lossy(&diagnostics.join().unwrap_or_default()).into_owned();
+ anyhow::ensure!(
+ status.success(),
+ "RAW {operation} failed: {}",
+ if message.trim().is_empty() {
+ "worker exited or exceeded its 512MiB memory budget"
+ } else {
+ message.trim()
+ }
+ );
+ parse(&bytes)
+ })();
+ let _ = child.kill();
+ let _ = child.wait();
+ drop(job);
+ result
+}
+pub fn decode(path: &Path, s: &Settings) -> Result<DynamicImage> {
+ anyhow::ensure!(s.index_raw, "Camera RAW support is disabled in Sources");
+ anyhow::ensure!(
+ std::fs::metadata(path)?.len() <= s.raw_max_mib.clamp(16, 1024) * 1024 * 1024,
+ "RAW file exceeds its separate input size limit"
+ );
+ let _permit = serial(&|| Ok(()))?;
+ let image = match invoke(path, "preview") {
+ Ok(image) => image,
+ Err(error) if s.raw_develop => invoke(path, "develop").with_context(|| {
+ format!("Embedded preview unavailable ({error}); development also failed")
+ })?,
+ Err(error) => return Err(error),
+ };
+ let (w, h) = image.dimensions();
+ Ok(if w.max(h) > 2048 {
+ image.thumbnail(2048, 2048)
+ } else {
+ image
+ })
+}
+#[cfg(test)]
+mod tests {
+ use super::*;
+ #[test]
+ fn raw_opt_in_and_extension_case() {
+ let s = Settings::default();
+ assert!(!s.index_raw);
+ assert!(!s.raw_develop);
+ for ext in ["ARW", "cr2", "DNG", "RaF"] {
+ assert!(is_raw(ext));
+ }
+ assert!(!is_raw("jpg"));
+ assert!(crate::content::is_image("ARW"));
+ assert!(!crate::content::supports_content("arw", &s));
+ let enabled = Settings {
+ index_raw: true,
+ ..s.clone()
+ };
+ assert!(crate::content::supports_content("arw", &enabled));
+ assert!(
+ decode(Path::new("not-read.ARW"), &s)
+ .unwrap_err()
+ .to_string()
+ .contains("disabled")
+ );
+ let old: Settings = serde_json::from_str("{}").unwrap();
+ assert!(!old.index_raw);
+ }
+ #[test]
+ fn bounded_messages_and_orientation() {
+ assert!(parse(b"bad").is_err());
+ let mut bytes = Vec::new();
+ for v in [0x31524456u32, 2, 2, 1, 6, 6] {
+ bytes.extend(v.to_le_bytes());
+ }
+ bytes.extend([255, 0, 0, 0, 255, 0]);
+ let image = parse(&bytes).unwrap();
+ assert_eq!(image.dimensions(), (1, 2));
+ bytes[8..12].copy_from_slice(&u32::MAX.to_le_bytes());
+ assert!(parse(&bytes).is_err());
+ for flip in 0..8 {
+ let image = orient(DynamicImage::new_rgb8(2, 3), flip).unwrap();
+ assert_eq!(image.dimensions(), if flip >= 4 { (3, 2) } else { (2, 3) });
+ }
+ }
+ #[test]
+ fn queued_raw_work_observes_cancellation() {
+ let _held = serial(&|| Ok(())).unwrap();
+ let wait = std::thread::spawn(|| serial(&|| anyhow::bail!("Indexing cancelled")).is_err());
+ assert!(wait.join().unwrap());
+ }
+ #[test]
+ fn raw_settings_are_fingerprinted() {
+ let mut s = Settings::default();
+ let disabled = stamp(&s);
+ s.index_raw = true;
+ let enabled = stamp(&s);
+ assert_ne!(disabled, enabled);
+ s.raw_develop = true;
+ assert_ne!(enabled, stamp(&s));
+ }
+}
diff --git a/native/src/resources.rs b/native/src/resources.rs
index a38ce8d..e281c1d 100644
--- a/native/src/resources.rs
+++ b/native/src/resources.rs
@@ -90,6 +90,10 @@ pub fn paths(home: &Path, s: &Settings, key: &str) -> Vec<PathBuf> {
}
files
}
+ "raw" => crate::raw::helper()
+ .ok()
+ .and_then(|p| p.parent().map(|p| vec![p.to_path_buf()]))
+ .unwrap_or_default(),
"pdf" => std::env::current_exe()
.ok()
.and_then(|p| p.parent().map(|r| vec![r.join("pdfium.dll")]))
@@ -111,6 +115,7 @@ pub fn sample(home: &Path, s: &Settings, inference_pid: u32) -> HashMap<String,
"dictation",
"ffmpeg",
"pdf",
+ "raw",
] {
let mut item = Usage {
disk: paths(home, s, key).iter().map(|p| bytes(p)).sum(),
@@ -130,7 +135,8 @@ pub fn sample(home: &Path, s: &Settings, inference_pid: u32) -> HashMap<String,
} else {
for pid in &pids {
let name = process_name(*pid).to_ascii_lowercase();
- if key == "ocr" && name == "tesseract.exe"
+ if key == "raw" && name == "vectordash-raw.exe"
+ || key == "ocr" && name == "tesseract.exe"
|| key == "ffmpeg"
&& (name == "ffmpeg.exe" || name == "ffprobe.exe" || name == "ffplay.exe")
{
@@ -168,6 +174,7 @@ pub fn sample(home: &Path, s: &Settings, inference_pid: u32) -> HashMap<String,
for file in [
"VectorDash.exe",
"vectordash.exe",
+ "raw-decoder",
"ffmpeg.exe",
"ffplay.exe",
"ffprobe.exe",
diff --git a/native/src/updates.rs b/native/src/updates.rs
index 03ce692..e73a96e 100644
--- a/native/src/updates.rs
+++ b/native/src/updates.rs
@@ -51,7 +51,7 @@ fn newer(a: &str, b: &str) -> bool {
pub fn select(data: &Value, current: &str) -> Option<Release> {
let mut releases = Vec::new();
for r in data.as_array()? {
- if r["draft"].as_bool() == Some(true) {
+ if r["draft"].as_bool() == Some(true) || r["prerelease"].as_bool() == Some(true) {
continue;
}
for asset in r["assets"].as_array().into_iter().flatten() {
@@ -218,6 +218,11 @@ mod tests {
assert!(select(&unsafe_data, "0.3.3").is_none());
}
#[test]
+ fn stable_updater_skips_prereleases() {
+ let data = serde_json::json!([{"prerelease":true,"assets":[{"name":"VectorDash-Rust-Setup-9.0.0-x64.exe","size":100,"digest":format!("sha256:{}","a".repeat(64)),"browser_download_url":"https://github.com/ampersandru/VectorDash/releases/download/v9.0.0/setup.exe"}]}]);
+ assert!(select(&data, "0.3.20").is_none());
+ }
+ #[test]
fn versions_numeric() {
assert!(newer("0.3.10", "0.3.9"));
assert!(!newer("0.2.99", "0.3.0"));
diff --git a/native/src/worker.rs b/native/src/worker.rs
index 867f071..3385179 100644
--- a/native/src/worker.rs
+++ b/native/src/worker.rs
@@ -46,12 +46,19 @@ pub fn visit(
{
return crate::content::stream(path, s, &|| control.file_checkpoint(), consume);
}
+ let _raw_permit = if crate::raw::is_raw(&crate::content::extension(path)) {
+ Some(crate::raw::serial(&|| control.check())?)
+ } else {
+ None
+ };
let mut settings = s.clone();
settings.remote_key.clear();
settings.dictation_key.clear();
settings.hf_token.clear();
settings.github_token.clear();
settings.mcp_token.clear();
+ settings.llm_key.clear();
+ settings.tts_key.clear();
let mut command = Command::new(std::env::current_exe()?);
command
.arg("--extract-worker")
diff --git a/packaging/VectorDash-Rust.iss b/packaging/VectorDash-Rust.iss
index e969017..ae2ba88 100644
--- a/packaging/VectorDash-Rust.iss
+++ b/packaging/VectorDash-Rust.iss
@@ -3,7 +3,7 @@ AppId={{C6AC1B4D-A119-4D73-B2C8-6C507DEFE923}
AppName=VectorDash
AppVerName=VectorDash
UninstallDisplayName=VectorDash
-AppVersion=0.3.20
+AppVersion=0.3.21
AppPublisher=VectorDash contributors
AppPublisherURL=https://github.com/ampersandru/VectorDash
DefaultDirName={localappdata}\Programs\VectorDash
@@ -13,7 +13,7 @@ ArchitecturesAllowed=x64compatible
ArchitecturesInstallIn64BitMode=x64compatible
MinVersion=10.0.22000
OutputDir=..\dist\installer
-OutputBaseFilename=VectorDash-Rust-Setup-0.3.20-x64
+OutputBaseFilename=VectorDash-Rust-Setup-0.3.21-x64
SetupIconFile=VectorDash.ico
UninstallDisplayIcon={app}\VectorDash.exe
LicenseFile=..\LICENSE