diff --git a/app/Build/Flatpak/build-in-container.sh b/app/Build/Flatpak/build-in-container.sh index bd7d49b73..e0c89ed36 100644 --- a/app/Build/Flatpak/build-in-container.sh +++ b/app/Build/Flatpak/build-in-container.sh @@ -72,7 +72,7 @@ install_missing() { } # Prints the branch of an SDK extension: the version of the extension point which the SDK declares, e.g., -# 25.08 for org.freedesktop.Sdk.Extension.rust-stable in org.gnome.Sdk//50. +# 25.08 for org.freedesktop.Sdk.Extension.dotnet10 in org.gnome.Sdk//50. extension_branch() { local sdk_ref="$1" extension="$2" flatpak info --system --show-metadata "$sdk_ref" | awk -v section="[Extension ${extension%.*}]" ' diff --git a/app/MindWork AI Studio/wwwroot/changelog/v26.11.2.md b/app/MindWork AI Studio/wwwroot/changelog/v26.11.2.md index e3746be52..9c723b7a6 100644 --- a/app/MindWork AI Studio/wwwroot/changelog/v26.11.2.md +++ b/app/MindWork AI Studio/wwwroot/changelog/v26.11.2.md @@ -23,7 +23,7 @@ - Improved the assistants when a request nearly fills the context window of the selected model: before sending it, AI Studio tells you, so that you can attach fewer or smaller files, or send the request anyway. - Improved the settings of the AI tasks, which AI Studio hands to a model on its own, such as the data source selection or the text content cleaner, formerly called agents: for each of them, you can now set the minimum confidence its provider needs, and the provider selection tells you which model AI Studio uses when you choose none. - Improved classic RAG: when the model you chose for selecting data sources or validating retrieval contexts may not see the data sources of your chat, AI Studio now uses the model of the chat for this step instead of skipping it. -- Improved the Flatpak version of AI Studio for Linux: it now ships the same up-to-date version of .NET as all other versions of AI Studio. +- Improved the Flatpak version of AI Studio for Linux: it now ships the same up-to-date version of .NET and is built with the same up-to-date version of Rust as all other versions of AI Studio. - Changed the icons of AI Studio to Lucide, an open-source icon set. All icons now share one style, and each feature shows the same icon wherever you meet it. - Fixed assistant plugins, which all appeared under "Installed Assistants" on the assistants page. Each one now appears under its own category, such as "Business", next to the built-in assistants of that category. - Fixed the Assistant Builder, which ignored the category you chose for your assistant. You can now also name a category of your own. diff --git a/runtime/AGENTS.md b/runtime/AGENTS.md index 0e9c7edc9..16aaf3005 100644 --- a/runtime/AGENTS.md +++ b/runtime/AGENTS.md @@ -103,17 +103,17 @@ macOS lets an app become active only when the active app allows it. Therefore: - Call `own_restart::restart` outside the main thread only. On the main thread, Tauri restarts the app at once, without `RunEvent::Exit`, and therefore in the background. -**The runtime builds with the Rust of the Flatpak, too.** Flathub builds the Flatpak with its own Rust, -the extension `org.freedesktop.Sdk.Extension.rust-stable` of the branch named by -`FLATPAK_FREEDESKTOP_VERSION` in the pipeline, and only after a release. That Rust often lags behind the -toolchain in `metadata.txt` by a version or two. Therefore: +**Every build uses the Rust toolchain of `metadata.txt`.** Line 6 names it for the pipeline, the cloud +sessions, and, since MindWorkAI/Flatpak#41, the Flatpak as well, which installs that toolchain instead of +the extension `org.freedesktop.Sdk.Extension.rust-stable` of Flathub, which lagged behind by several +versions. Therefore: -- `rust-version` in `Cargo.toml` names the Rust of the Flatpak, not our toolchain. Clippy refuses every - API of the standard library which is newer (`incompatible_msrv`), so the quality gate catches it before - the release does. -- Raise `rust-version` only once Flathub ships the newer Rust on that branch, never together with - `metadata.txt`. Keep the minor version only, such as `1.98`: the branches of Flathub differ in the patch. -- Never silence `incompatible_msrv`. Write the code the way the older Rust allows instead. +- `rust-version` in `Cargo.toml` names the minor version of line 6, such as `1.100`. Clippy refuses every + API of the standard library which is newer (`incompatible_msrv`). +- Raise both together when you upgrade Rust. The build script writes line 6 from the local `rustc` but + leaves `rust-version` alone. Never raise `rust-version` above line 6: Cargo then refuses the toolchain + of line 6, and the pipeline and the Flatpak fail. +- Never silence `incompatible_msrv`. When the code needs a newer API, upgrade Rust first. ## IPC Communication Flow 1. Rust runtime starts and generates TLS certificate diff --git a/runtime/Cargo.toml b/runtime/Cargo.toml index aa891a55d..1a6ad4a05 100644 --- a/runtime/Cargo.toml +++ b/runtime/Cargo.toml @@ -3,13 +3,12 @@ name = "mindwork-ai-studio" version = "26.11.1" edition = "2024" -# Not our toolchain, which metadata.txt names, but the oldest Rust which still has to build the runtime: Flathub -# builds the Flatpak with the extension org.freedesktop.Sdk.Extension.rust-stable of the branch named by -# FLATPAK_FREEDESKTOP_VERSION in the pipeline, which lags behind. Clippy refuses every API of the standard library -# which is newer (incompatible_msrv), and Cargo prefers versions of crates which still build with it. Keep the -# minor version only: patch releases add no APIs, and the branches of Flathub differ in the patch. Raise it only -# once Flathub ships a newer Rust, see runtime/AGENTS.md. -rust-version = "1.98" +# The minor version of our toolchain, which line 6 of metadata.txt names. Every build of AI Studio uses that +# toolchain, the Flatpak included, which installs it from the same line since MindWorkAI/Flatpak#41. Clippy refuses +# every API of the standard library which is newer (incompatible_msrv), Cargo prefers versions of crates which still +# build with it, and a contributor with an older Rust learns right away why the runtime does not build. Raise it +# together with line 6 when we upgrade Rust, see runtime/AGENTS.md. +rust-version = "1.100" description = "MindWork AI Studio" authors = ["Thorsten Sommer"] diff --git a/runtime/src/environment.rs b/runtime/src/environment.rs index 574c4747e..449983392 100644 --- a/runtime/src/environment.rs +++ b/runtime/src/environment.rs @@ -1191,7 +1191,7 @@ fn enterprise_source_key_suffix<'a>(key_name: &'a str, prefix: &str) -> Option<& } fn normalize_enterprise_slot_suffix(raw_suffix: &str) -> Option<&str> { - let suffix = raw_suffix.strip_prefix('_').unwrap_or(raw_suffix); + let suffix = raw_suffix.trim_prefix('_'); if is_enterprise_slot_suffix(suffix) { Some(suffix) } else { diff --git a/runtime/src/qdrant_edge_database.rs b/runtime/src/qdrant_edge_database.rs index 113e5007f..4c27c4313 100644 --- a/runtime/src/qdrant_edge_database.rs +++ b/runtime/src/qdrant_edge_database.rs @@ -734,7 +734,7 @@ impl QdrantEdgeDatabase { } fn store_directory_name(store_name: &str) -> String { - let stable_id = store_name.strip_prefix("rag_").unwrap_or(store_name); + let stable_id = store_name.trim_prefix("rag_"); format!("store_{stable_id}") }