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
1 change: 1 addition & 0 deletions desktop/playwright.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -136,6 +136,7 @@ export default defineConfig({
"**/harness-catalog-screenshots.spec.ts",
"**/inline-custom-harness.spec.ts",
"**/where-to-run-config.spec.ts",
"**/project-connections-screenshots.spec.ts",
"**/huddle-transcription.spec.ts",
"**/agent-numeric-tuning.spec.ts",
],
Expand Down
2 changes: 2 additions & 0 deletions desktop/src-tauri/src/commands/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@ pub mod pairing;
mod personas;
mod prevent_sleep;
mod profile;
mod project_connections;
mod project_git;
mod project_git_branches;
mod project_git_diff;
Expand Down Expand Up @@ -98,6 +99,7 @@ pub use pairing::*;
pub use personas::*;
pub use prevent_sleep::*;
pub use profile::*;
pub use project_connections::*;
pub use project_git::*;
pub use project_git_branches::*;
pub use project_git_diff::*;
Expand Down
52 changes: 52 additions & 0 deletions desktop/src-tauri/src/commands/project_connections.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
use tauri::AppHandle;

use crate::managed_agents::project_connections::{
self, CreateProjectConnectionRequest, ProjectConnection, ProjectConnectionScope,
UpdateProjectConnectionRequest,
};

#[tauri::command]
pub fn list_project_connections(
app: AppHandle,
project_scope: ProjectConnectionScope,
) -> Result<Vec<ProjectConnection>, String> {
project_connections::list_project_connections(&app, &project_scope)
}

#[tauri::command]
pub fn create_project_connection(
app: AppHandle,
input: CreateProjectConnectionRequest,
) -> Result<ProjectConnection, String> {
project_connections::create_project_connection(&app, input)
}

#[tauri::command]
pub fn update_project_connection(
app: AppHandle,
input: UpdateProjectConnectionRequest,
) -> Result<ProjectConnection, String> {
project_connections::update_project_connection(&app, input)
}

#[tauri::command]
pub async fn test_project_connection(
app: AppHandle,
project_scope: ProjectConnectionScope,
connection_id: String,
) -> Result<ProjectConnection, String> {
tauri::async_runtime::spawn_blocking(move || {
project_connections::test_project_connection(&app, &project_scope, &connection_id)
})
.await
.map_err(|error| format!("Project connection test task failed: {error}"))?
}

#[tauri::command]
pub fn delete_project_connection(
app: AppHandle,
project_scope: ProjectConnectionScope,
connection_id: String,
) -> Result<(), String> {
project_connections::delete_project_connection(&app, &project_scope, &connection_id)
}
10 changes: 5 additions & 5 deletions desktop/src-tauri/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -138,28 +138,23 @@ pub fn run() {
if webview.label() != "main" {
return;
}

// Linux/WebKitGTK needs media-stream settings and a
// permission-request handler for getUserMedia; no-op
// on macOS/Windows.
linux_media::enable_media_capture(&webview);

// macOS applies the restored geometry asynchronously. Wait
// for several identical outer bounds and for React to
// commit the startup surface before revealing it.
let window = webview.window();

#[cfg(target_os = "macos")]
{
set_initial_window_backing(&window);

let (initial_render_tx, initial_render_rx) = tokio::sync::oneshot::channel();
window
.app_handle()
.once(INITIAL_RENDER_READY_EVENT, move |_| {
let _ = initial_render_tx.send(());
});

tauri::async_runtime::spawn(async move {
wait_for_stable_initial_window_geometry(&window).await;

Expand Down Expand Up @@ -644,6 +639,11 @@ pub fn run() {
get_project_local_repo_diff,
get_project_local_repo_snapshot,
get_project_repo_sync_status,
list_project_connections,
create_project_connection,
update_project_connection,
test_project_connection,
delete_project_connection,
list_project_local_repositories,
clone_project_repository,
create_project_remote_branch,
Expand Down
1 change: 1 addition & 0 deletions desktop/src-tauri/src/managed_agents/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ pub(crate) mod persona_events;
mod personas;
#[cfg(windows)]
mod process_lifecycle;
pub(crate) mod project_connections;
pub(crate) mod readiness;
pub(crate) mod reconcile;
mod relay_mesh;
Expand Down
Loading