diff --git a/src-tauri/src/commands/debug.rs b/src-tauri/src/commands/debug.rs index d9cffa65e..eb2134609 100644 --- a/src-tauri/src/commands/debug.rs +++ b/src-tauri/src/commands/debug.rs @@ -261,12 +261,13 @@ pub async fn debug_attachable_processes(state: State<'_, AppState>) -> IdeResult #[tauri::command] #[specta::specta] pub async fn debug_listen_for_jvm( + window: Window, state: State<'_, AppState>, request: ide_core::RequestId, host: String, port: u16, ) -> IdeResult { - ide_host::ops::debug::debug_listen_for_jvm(&state.host, "", request, host, port).await + ide_host::ops::debug::debug_listen_for_jvm(&state.host, window.label(), request, host, port).await } /// HotSwap (Reload Changed Classes) in a java-debug session. diff --git a/src-tauri/src/commands/sdk.rs b/src-tauri/src/commands/sdk.rs index 92a8ea471..050c2c101 100644 --- a/src-tauri/src/commands/sdk.rs +++ b/src-tauri/src/commands/sdk.rs @@ -39,17 +39,19 @@ pub async fn sdk_project_libraries( #[tauri::command] #[specta::specta] pub async fn sdk_locate_tools( + window: Window, state: State<'_, AppState>, names: Vec, near: Option, ) -> IdeResult { - ide_host::ops::sdk::sdk_locate_tools(&state.host, "", names, near).await + ide_host::ops::sdk::sdk_locate_tools(&state.host, window.label(), names, near).await } /// `base -m venv location`; output lines stream through `on_output`. #[tauri::command] #[specta::specta] pub async fn sdk_python_create_venv( + window: Window, state: State<'_, AppState>, base: PathBuf, location: PathBuf, @@ -58,7 +60,7 @@ pub async fn sdk_python_create_venv( ) -> IdeResult { ide_host::ops::sdk::sdk_python_create_venv( &state.host, - "", + window.label(), base, location, request, @@ -70,17 +72,20 @@ pub async fn sdk_python_create_venv( #[tauri::command] #[specta::specta] pub async fn sdk_python_packages( + window: Window, state: State<'_, AppState>, python: PathBuf, request: RequestId, ) -> IdeResult> { - ide_host::ops::sdk::sdk_python_packages(&state.host, "", python, request).await + ide_host::ops::sdk::sdk_python_packages(&state.host, window.label(), python, request).await } /// Installs (`uninstall = false`) or removes a package; output streams through `on_output`. #[tauri::command] #[specta::specta] +#[allow(clippy::too_many_arguments)] pub async fn sdk_python_pip( + window: Window, state: State<'_, AppState>, python: PathBuf, requirement: String, @@ -91,7 +96,7 @@ pub async fn sdk_python_pip( ) -> IdeResult<()> { ide_host::ops::sdk::sdk_python_pip( &state.host, - "", + window.label(), python, requirement, uninstall, diff --git a/src-tauri/src/commands/vcs.rs b/src-tauri/src/commands/vcs.rs index 305fd0e8c..0e06e2f5e 100644 --- a/src-tauri/src/commands/vcs.rs +++ b/src-tauri/src/commands/vcs.rs @@ -371,8 +371,8 @@ pub async fn vcs_init(state: State<'_, AppState>, dir: PathBuf) -> IdeResult<()> /// executable when `path` is empty. #[tauri::command] #[specta::specta] -pub async fn vcs_git_version(state: State<'_, AppState>, path: String) -> IdeResult { - ide_host::ops::vcs::vcs_git_version(&state.host, "", path).await +pub async fn vcs_git_version(window: Window, state: State<'_, AppState>, path: String) -> IdeResult { + ide_host::ops::vcs::vcs_git_version(&state.host, window.label(), path).await } /// The auto-detected git executable (shown as the field's placeholder). @@ -656,8 +656,13 @@ pub fn vcs_changelists_save(window: Window, state: State<'_, AppState>, changeli /// Create Patch › Save to file. #[tauri::command] #[specta::specta] -pub async fn vcs_write_patch(state: State<'_, AppState>, path: PathBuf, patch: String) -> IdeResult<()> { - ide_host::ops::vcs::vcs_write_patch(&state.host, "", path, patch).await +pub async fn vcs_write_patch( + window: Window, + state: State<'_, AppState>, + path: PathBuf, + patch: String, +) -> IdeResult<()> { + ide_host::ops::vcs::vcs_write_patch(&state.host, window.label(), path, patch).await } #[tauri::command]