Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -169,3 +169,6 @@ orleans.codegen.cs

# Ignore GitHub Copilot migration files:
**/copilot.data.migration.*.xml

# Tauri generated schemas/manifests
/runtime/gen/
2 changes: 1 addition & 1 deletion app/Build/Commands/UpdateMetadataCommands.cs
Original file line number Diff line number Diff line change
Expand Up @@ -245,7 +245,7 @@ public async Task Build()
Console.WriteLine("- Start building the Rust runtime ...");

var pathRuntime = Environment.GetRustRuntimeDirectory();
var rustBuildOutput = await this.ReadCommandOutput(pathRuntime, "cargo", "tauri build --bundles none", true);
var rustBuildOutput = await this.ReadCommandOutput(pathRuntime, "cargo", "tauri build --no-bundle", true);
var rustBuildOutputLines = rustBuildOutput.Split([global::System.Environment.NewLine], StringSplitOptions.RemoveEmptyEntries);
var foundRustIssue = false;
foreach (var buildOutputLine in rustBuildOutputLines)
Expand Down
2 changes: 1 addition & 1 deletion metadata.txt
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
9.0.13 (commit 9ecbfd4f3f)
1.93.1 (commit 01f6ddf75)
8.15.0
1.8.1
2.10.3
3eb367d4c9e, release
osx-arm64
144.0.7543.0
Expand Down
16 changes: 12 additions & 4 deletions runtime/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,16 +1,16 @@
[package]
name = "mindwork-ai-studio"
version = "26.2.2"
edition = "2021"
edition = "2024"
description = "MindWork AI Studio"
authors = ["Thorsten Sommer"]

[build-dependencies]
tauri-build = { version = "1.5.6", features = [] }
tauri-build = { version = "2.5.6", features = [] }

[dependencies]
tauri = { version = "1.8.3", features = [ "http-all", "updater", "shell-sidecar", "shell-open", "dialog", "global-shortcut"] }
tauri-plugin-window-state = { git = "https://github.com/tauri-apps/plugins-workspace", branch = "v1" }
tauri = { version = "2.10.3", features = [] }
tauri-plugin-window-state = { version = "2.4.1" }
serde = { version = "1.0.228", features = ["derive"] }
serde_json = "1.0.149"
keyring = { version = "3.6.2", features = ["apple-native", "windows-native", "sync-secret-service"] }
Expand Down Expand Up @@ -46,6 +46,10 @@ sysinfo = "0.38.0"
# Fixes security vulnerability downstream, where the upstream is not fixed yet:
time = "0.3.47" # -> Rocket
bytes = "1.11.1" # -> almost every dependency
tauri-plugin-fs = "2"
tauri-plugin-http = "2"
tauri-plugin-shell = "2.3.5"
tauri-plugin-dialog = "2.6.0"

[target.'cfg(target_os = "linux")'.dependencies]
# See issue https://github.com/tauri-apps/tauri/issues/4470
Expand All @@ -57,5 +61,9 @@ openssl = "0.10.75"
[target.'cfg(target_os = "windows")'.dependencies]
windows-registry = "0.6.1"

[target.'cfg(not(any(target_os = "android", target_os = "ios")))'.dependencies]
tauri-plugin-global-shortcut = "2"
tauri-plugin-updater = "2.10.0"

[features]
custom-protocol = ["tauri/custom-protocol"]
27 changes: 26 additions & 1 deletion runtime/build.rs
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,18 @@ fn update_cargo_toml(cargo_path: &str, version: &str) {
let cargo_toml_lines = cargo_toml.lines();
let mut new_cargo_toml = String::new();

// Return early when the version already matches to avoid unnecessary rewrites.
let current_version = cargo_toml.lines().find_map(|line| {
let trimmed = line.trim_start();
let rest = trimmed.strip_prefix("\"version\": ")?;
let quoted = rest.strip_prefix('"')?;
let end_idx = quoted.find('"')?;
Some(&quoted[..end_idx])
});
if current_version == Some(version) {
return;
}

for line in cargo_toml_lines {
if line.starts_with("version = ") {
new_cargo_toml.push_str(&format!("version = \"{version}\""));
Expand All @@ -67,6 +79,19 @@ fn update_cargo_toml(cargo_path: &str, version: &str) {

fn update_tauri_conf(tauri_conf_path: &str, version: &str) {
let tauri_conf = std::fs::read_to_string(tauri_conf_path).unwrap();

// Return early when the version already matches to avoid unnecessary rewrites.
let current_version = tauri_conf.lines().find_map(|line| {
let trimmed = line.trim_start();
let rest = trimmed.strip_prefix("\"version\": ")?;
let quoted = rest.strip_prefix('"')?;
let end_idx = quoted.find('"')?;
Some(&quoted[..end_idx])
});
if current_version == Some(version) {
return;
}

let tauri_conf_lines = tauri_conf.lines();
let mut new_tauri_conf = String::new();

Expand All @@ -75,7 +100,7 @@ fn update_tauri_conf(tauri_conf_path: &str, version: &str) {
// "version": "0.1.0-alpha.0"
// Please notice, that the version number line might have a leading tab, etc.
if line.contains("\"version\": ") {
new_tauri_conf.push_str(&format!("\t\"version\": \"{version}\""));
new_tauri_conf.push_str(&format!(" \"version\": \"{version}\","));
} else {
new_tauri_conf.push_str(line);
}
Expand Down
48 changes: 48 additions & 0 deletions runtime/capabilities/default.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
{
"$schema": "../gen/schemas/desktop-schema.json",
"identifier": "default",
"description": "Default capability for MindWork AI Studio",
"windows": [
"main"
],
"permissions": [
"core:default",
"updater:default",
"shell:allow-open",
{
"identifier": "shell:allow-spawn",
"allow": [
{
"name": "mindworkAIStudioServer",
"sidecar": true,
"args": true
},
{
"name": "qdrant",
"sidecar": true,
"args": true
}
]
},
{
"identifier": "http:default",
"allow": [
{
"url": "http://localhost"
},
{
"url": "http://localhost/*"
}
]
},
"fs:default",
{
"identifier": "fs:scope",
"allow": [
{
"path": "$RESOURCE/resources/**"
}
]
}
]
}
Loading