Remplace les StubEmbedder pour les stratégies localServer/api/localOnnx par de vrais moteurs, chacun derrière une feature cargo off-by-default — la posture fondatrice « rien d'imposé, zéro dépendance » (défaut none → rappel naïf) reste byte-for-byte inchangée. C1a (feature vector-http, reqwest rustls optional): - HttpEmbedder couvrant localServer (Ollama/llama.cpp) et api (OpenAI/Voyage…), payload OpenAI-compatible /v1/embeddings, ordre restauré par index, bearer token lu via env var (jamais en clair), timeout client 30s. - detect_ollama() pour la détection de l'existant (C3). C1b (feature vector-onnx, fastembed v5 optional): - OnnxEmbedder en-process (e5-small, dim 384), init paresseuse + spawn_blocking, cache modèle sous <app_data>/embedders/onnx — aucun download au build ni au first-run, uniquement à la demande au 1er embed. - Catalogue RECOMMENDED_ONNX_MODELS + ONNX_CACHE_SUBDIR + onnx_model_is_cached exposés (sans feature) pour la config (C2) et la popup (C3). embedder_from_profile(profile, onnx_cache_dir) dispatche feature-gated ; sans la feature, retombe sur StubEmbedder (Unsupported) → fallback naïf via AdaptiveMemoryRecall. Composition root (build_memory_recall) propage le cache dir. Tests: 10 HTTP + 6 ONNX (dont 2 #[ignore] download réel) + 26 vectoriels, verts en défaut, --features vector-http et --features vector-onnx. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
43 lines
1.2 KiB
TOML
43 lines
1.2 KiB
TOML
[package]
|
|
name = "app-tauri"
|
|
version = "0.1.0"
|
|
edition.workspace = true
|
|
license.workspace = true
|
|
rust-version.workspace = true
|
|
description = "IdeA — Tauri v2 shell: composition root (DI), IPC commands/events, PTY↔Channel bridge."
|
|
|
|
# The library carries all the wiring so it is unit-testable; the binary is a
|
|
# thin entry point.
|
|
[lib]
|
|
name = "app_tauri_lib"
|
|
crate-type = ["lib", "cdylib", "staticlib"]
|
|
|
|
[[bin]]
|
|
name = "app-tauri"
|
|
path = "src/main.rs"
|
|
|
|
[build-dependencies]
|
|
tauri-build = { workspace = true }
|
|
|
|
[dependencies]
|
|
domain = { workspace = true }
|
|
application = { workspace = true }
|
|
infrastructure = { workspace = true }
|
|
tauri = { workspace = true }
|
|
tauri-plugin-dialog = { workspace = true }
|
|
tokio = { workspace = true }
|
|
serde = { workspace = true }
|
|
serde_json = { workspace = true }
|
|
thiserror = { workspace = true }
|
|
uuid = { workspace = true }
|
|
|
|
[features]
|
|
# Passthrough toggles to enable the real embedders in an IDE build. OFF by default
|
|
# (founding posture: `none` ⇒ naïve recall, zero dependency).
|
|
vector-http = ["infrastructure/vector-http"]
|
|
vector-onnx = ["infrastructure/vector-onnx"]
|
|
|
|
[dev-dependencies]
|
|
uuid = { workspace = true }
|
|
async-trait = { workspace = true }
|