mirror of
https://github.com/MindWorkAI/AI-Studio.git
synced 2026-10-05 17:49:40 +00:00
Rebuilt how AI Studio knows what a model can do (#960)
Build and Release / Sync Flatpak repo (push) Blocked by required conditions
Build and Release / Verify (push) Waiting to run
Build and Release / Build app (${{ matrix.dotnet_runtime }}) (-aarch64-apple-darwin, osx-arm64, macos-latest, aarch64-apple-darwin, dmg,app,updater, dmg) (push) Blocked by required conditions
Build and Release / Build app (${{ matrix.dotnet_runtime }}) (-aarch64-pc-windows-msvc.exe, win-arm64, windows-latest, aarch64-pc-windows-msvc, nsis,updater, nsis) (push) Blocked by required conditions
Build and Release / Build app (${{ matrix.dotnet_runtime }}) (-aarch64-unknown-linux-gnu, linux-arm64, ubuntu-22.04-arm, aarch64-unknown-linux-gnu, appimage,updater, appimage) (push) Blocked by required conditions
Build and Release / Build app (${{ matrix.dotnet_runtime }}) (-x86_64-apple-darwin, osx-x64, macos-latest, x86_64-apple-darwin, dmg,app,updater, dmg) (push) Blocked by required conditions
Build and Release / Build app (${{ matrix.dotnet_runtime }}) (-x86_64-pc-windows-msvc.exe, win-x64, windows-latest, x86_64-pc-windows-msvc, nsis,updater, nsis) (push) Blocked by required conditions
Build and Release / Build app (${{ matrix.dotnet_runtime }}) (-x86_64-unknown-linux-gnu, linux-x64, ubuntu-22.04, x86_64-unknown-linux-gnu, appimage,updater, appimage) (push) Blocked by required conditions
Build and Release / Prepare & create release (push) Blocked by required conditions
Build and Release / Publish release (push) Blocked by required conditions
Build and Release / Determine run mode (push) Waiting to run
Build and Release / Collect Flatpak artifacts (push) Blocked by required conditions
Build and Release / Sync Flatpak repo (push) Blocked by required conditions
Build and Release / Verify (push) Waiting to run
Build and Release / Build app (${{ matrix.dotnet_runtime }}) (-aarch64-apple-darwin, osx-arm64, macos-latest, aarch64-apple-darwin, dmg,app,updater, dmg) (push) Blocked by required conditions
Build and Release / Build app (${{ matrix.dotnet_runtime }}) (-aarch64-pc-windows-msvc.exe, win-arm64, windows-latest, aarch64-pc-windows-msvc, nsis,updater, nsis) (push) Blocked by required conditions
Build and Release / Build app (${{ matrix.dotnet_runtime }}) (-aarch64-unknown-linux-gnu, linux-arm64, ubuntu-22.04-arm, aarch64-unknown-linux-gnu, appimage,updater, appimage) (push) Blocked by required conditions
Build and Release / Build app (${{ matrix.dotnet_runtime }}) (-x86_64-apple-darwin, osx-x64, macos-latest, x86_64-apple-darwin, dmg,app,updater, dmg) (push) Blocked by required conditions
Build and Release / Build app (${{ matrix.dotnet_runtime }}) (-x86_64-pc-windows-msvc.exe, win-x64, windows-latest, x86_64-pc-windows-msvc, nsis,updater, nsis) (push) Blocked by required conditions
Build and Release / Build app (${{ matrix.dotnet_runtime }}) (-x86_64-unknown-linux-gnu, linux-x64, ubuntu-22.04, x86_64-unknown-linux-gnu, appimage,updater, appimage) (push) Blocked by required conditions
Build and Release / Prepare & create release (push) Blocked by required conditions
Build and Release / Publish release (push) Blocked by required conditions
Build and Release / Determine run mode (push) Waiting to run
Build and Release / Collect Flatpak artifacts (push) Blocked by required conditions
This commit is contained in:
1 parent
d21e09dd1e
commit
d85b4e71b6
287 files changed
+18341
-3677
No files matched your search
@@ -504,10 +504,10 @@ fn read_locale_from_environment() -> Option<(String, &'static str)> {
|
||||
}
|
||||
|
||||
for key in ["LC_ALL", "LC_MESSAGES", "LANG"] {
|
||||
if let Ok(value) = env::var(key) {
|
||||
if let Some(locale) = normalize_locale_tag(&value) {
|
||||
return Some((locale, key));
|
||||
}
|
||||
if let Ok(value) = env::var(key)
|
||||
&& let Some(locale) = normalize_locale_tag(&value)
|
||||
{
|
||||
return Some((locale, key));
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -149,6 +149,12 @@ struct ShortcutManager {
|
||||
/// Stores the backend-specific resources required by an active shortcut.
|
||||
enum ActiveBinding {
|
||||
/// Stores a shortcut registered through the Tauri plugin.
|
||||
///
|
||||
/// Never constructed on Linux: registration there goes through the XDG portal and falls back
|
||||
/// to the focused window, so nothing ever reaches the Tauri plugin. The variant stays all the
|
||||
/// same, because the code which releases, suspends, and restores bindings is shared across
|
||||
/// platforms and would otherwise have to be cut in two for one unreachable case.
|
||||
#[cfg_attr(target_os = "linux", allow(dead_code))]
|
||||
Tauri {
|
||||
/// Contains the registered shortcut in Tauri syntax.
|
||||
shortcut: String,
|
||||
@@ -247,40 +253,38 @@ pub async fn register(
|
||||
}
|
||||
|
||||
#[cfg(target_os = "linux")]
|
||||
{
|
||||
match prepare_portal_binding(&request, event_sender.clone()).await {
|
||||
Ok(new_binding) => {
|
||||
let effective_display_name = new_binding.effective_display_name();
|
||||
replace_portal_binding(&app_handle, &mut manager, request.id, new_binding).await;
|
||||
info!(Source = "XDG portal"; "Global shortcut '{}' is active through the desktop portal.", request.id);
|
||||
return ShortcutResponse::success(ShortcutBackend::Portal, effective_display_name);
|
||||
},
|
||||
match prepare_portal_binding(&request, event_sender.clone()).await {
|
||||
Ok(new_binding) => {
|
||||
let effective_display_name = new_binding.effective_display_name();
|
||||
replace_portal_binding(&app_handle, &mut manager, request.id, new_binding).await;
|
||||
info!(Source = "XDG portal"; "Global shortcut '{}' is active through the desktop portal.", request.id);
|
||||
ShortcutResponse::success(ShortcutBackend::Portal, effective_display_name)
|
||||
},
|
||||
|
||||
Err(error) => {
|
||||
let current_backend = manager.bindings.get(&request.id).map(ActiveBinding::backend);
|
||||
if may_fallback_to_local(error.kind, current_backend) {
|
||||
warn!(Source = "XDG portal"; "Global shortcut registration failed; using the focused-window fallback: {}", error.message);
|
||||
Err(error) => {
|
||||
let current_backend = manager.bindings.get(&request.id).map(ActiveBinding::backend);
|
||||
if may_fallback_to_local(error.kind, current_backend) {
|
||||
warn!(Source = "XDG portal"; "Global shortcut registration failed; using the focused-window fallback: {}", error.message);
|
||||
|
||||
if let Some(old_binding) = manager.bindings.remove(&request.id) {
|
||||
close_binding(&app_handle, request.id, old_binding).await;
|
||||
}
|
||||
|
||||
manager.bindings.insert(request.id, ActiveBinding::Local { shortcut: request.shortcut.clone() });
|
||||
return ShortcutResponse::success(ShortcutBackend::Local, request.shortcut);
|
||||
} else {
|
||||
let cancelled = error.kind == PortalFailureKind::Cancelled;
|
||||
if cancelled {
|
||||
warn!(Source = "XDG portal"; "Global shortcut configuration was cancelled by the user; preserving the active portal binding.");
|
||||
} else if error.kind == PortalFailureKind::Denied {
|
||||
warn!(Source = "XDG portal"; "Global shortcut permission was denied; preserving the active portal binding: {}", error.message);
|
||||
} else {
|
||||
error!(Source = "XDG portal"; "Global shortcut registration failed; preserving the active portal binding: {}", error.message);
|
||||
}
|
||||
|
||||
return ShortcutResponse::error(error.message, ShortcutBackend::Portal, cancelled);
|
||||
if let Some(old_binding) = manager.bindings.remove(&request.id) {
|
||||
close_binding(&app_handle, request.id, old_binding).await;
|
||||
}
|
||||
},
|
||||
}
|
||||
|
||||
manager.bindings.insert(request.id, ActiveBinding::Local { shortcut: request.shortcut.clone() });
|
||||
ShortcutResponse::success(ShortcutBackend::Local, request.shortcut)
|
||||
} else {
|
||||
let cancelled = error.kind == PortalFailureKind::Cancelled;
|
||||
if cancelled {
|
||||
warn!(Source = "XDG portal"; "Global shortcut configuration was cancelled by the user; preserving the active portal binding.");
|
||||
} else if error.kind == PortalFailureKind::Denied {
|
||||
warn!(Source = "XDG portal"; "Global shortcut permission was denied; preserving the active portal binding: {}", error.message);
|
||||
} else {
|
||||
error!(Source = "XDG portal"; "Global shortcut registration failed; preserving the active portal binding: {}", error.message);
|
||||
}
|
||||
|
||||
ShortcutResponse::error(error.message, ShortcutBackend::Portal, cancelled)
|
||||
}
|
||||
},
|
||||
}
|
||||
|
||||
#[cfg(not(target_os = "linux"))]
|
||||
|
||||
@@ -23,10 +23,10 @@ fn issue_code(error: &KeyringError) -> SecretStoreIssueCode {
|
||||
}
|
||||
|
||||
#[cfg(target_os = "linux")]
|
||||
if let KeyringError::PlatformFailure(error) | KeyringError::NoStorageAccess(error) = error {
|
||||
if let Some(error) = error.downcast_ref::<dbus_secret_service::Error>() {
|
||||
return secret_service_issue_code(error);
|
||||
}
|
||||
if let KeyringError::PlatformFailure(error) | KeyringError::NoStorageAccess(error) = error
|
||||
&& let Some(error) = error.downcast_ref::<dbus_secret_service::Error>()
|
||||
{
|
||||
return secret_service_issue_code(error);
|
||||
}
|
||||
|
||||
SecretStoreIssueCode::Unknown
|
||||
|
||||
Reference in new issue
Block a user