call goose serve from tauri frontend via goose-acp client (#8549)
Co-authored-by: Jack Amadeo <jackamadeo@squareup.com>
This commit is contained in:
@@ -5,7 +5,7 @@ use tauri::{AppHandle, State};
|
||||
|
||||
use crate::services::acp::{
|
||||
make_composite_key, search_sessions_via_exports, AcpRunningSession, AcpService, AcpSessionInfo,
|
||||
AcpSessionRegistry, GooseAcpManager, SessionSearchResult,
|
||||
AcpSessionRegistry, GooseAcpManager, GooseServeProcess, SessionSearchResult,
|
||||
};
|
||||
|
||||
const DEPRECATED_PROVIDER_IDS: &[&str] = &["claude-code", "codex", "gemini-cli"];
|
||||
@@ -80,6 +80,13 @@ fn resolve_working_dir(
|
||||
})
|
||||
}
|
||||
|
||||
#[tauri::command]
|
||||
pub async fn get_goose_serve_url() -> Result<String, String> {
|
||||
GooseServeProcess::start().await?;
|
||||
let process = GooseServeProcess::get()?;
|
||||
Ok(process.ws_url())
|
||||
}
|
||||
|
||||
/// Return the list of providers available through goose serve.
|
||||
#[tauri::command]
|
||||
pub async fn discover_acp_providers(
|
||||
|
||||
@@ -49,6 +49,7 @@ pub fn run() {
|
||||
commands::agents::save_persona_avatar,
|
||||
commands::agents::save_persona_avatar_bytes,
|
||||
commands::agents::get_avatars_dir,
|
||||
commands::acp::get_goose_serve_url,
|
||||
commands::acp::discover_acp_providers,
|
||||
commands::acp::acp_prepare_session,
|
||||
commands::acp::acp_set_model,
|
||||
|
||||
@@ -6,6 +6,7 @@ mod search;
|
||||
mod writer;
|
||||
|
||||
pub(crate) use goose_serve::resolve_goose_binary;
|
||||
pub(crate) use goose_serve::GooseServeProcess;
|
||||
pub use manager::{AcpSessionInfo, GooseAcpManager};
|
||||
pub use registry::{AcpRunningSession, AcpSessionRegistry};
|
||||
pub use search::{search_sessions_via_exports, SessionSearchResult};
|
||||
|
||||
Reference in New Issue
Block a user