ACP get working dir from args.cwd (#6653)
This commit is contained in:
@@ -49,7 +49,6 @@ pub struct GooseAcpAgent {
|
|||||||
pub struct GooseAcpConfig {
|
pub struct GooseAcpConfig {
|
||||||
pub provider: Arc<dyn goose::providers::base::Provider>,
|
pub provider: Arc<dyn goose::providers::base::Provider>,
|
||||||
pub builtins: Vec<String>,
|
pub builtins: Vec<String>,
|
||||||
pub work_dir: std::path::PathBuf,
|
|
||||||
pub data_dir: std::path::PathBuf,
|
pub data_dir: std::path::PathBuf,
|
||||||
pub config_dir: std::path::PathBuf,
|
pub config_dir: std::path::PathBuf,
|
||||||
pub goose_mode: goose::config::GooseMode,
|
pub goose_mode: goose::config::GooseMode,
|
||||||
@@ -308,7 +307,6 @@ impl GooseAcpAgent {
|
|||||||
Self::with_config(GooseAcpConfig {
|
Self::with_config(GooseAcpConfig {
|
||||||
provider,
|
provider,
|
||||||
builtins,
|
builtins,
|
||||||
work_dir: std::env::current_dir().unwrap_or_default(),
|
|
||||||
data_dir: Paths::data_dir(),
|
data_dir: Paths::data_dir(),
|
||||||
config_dir: Paths::config_dir(),
|
config_dir: Paths::config_dir(),
|
||||||
goose_mode,
|
goose_mode,
|
||||||
@@ -689,7 +687,7 @@ impl GooseAcpAgent {
|
|||||||
let manager = self.agent.config.session_manager.clone();
|
let manager = self.agent.config.session_manager.clone();
|
||||||
let goose_session = manager
|
let goose_session = manager
|
||||||
.create_session(
|
.create_session(
|
||||||
std::env::current_dir().unwrap_or_default(),
|
args.cwd.clone(),
|
||||||
"ACP Session".to_string(), // just an initial name - may be replaced by maybe_update_name
|
"ACP Session".to_string(), // just an initial name - may be replaced by maybe_update_name
|
||||||
SessionType::User,
|
SessionType::User,
|
||||||
)
|
)
|
||||||
|
|||||||
@@ -260,7 +260,6 @@ async fn spawn_server_in_process(
|
|||||||
let config = GooseAcpConfig {
|
let config = GooseAcpConfig {
|
||||||
provider: Arc::new(provider),
|
provider: Arc::new(provider),
|
||||||
builtins: builtins.iter().map(|s| s.to_string()).collect(),
|
builtins: builtins.iter().map(|s| s.to_string()).collect(),
|
||||||
work_dir: data_root.to_path_buf(),
|
|
||||||
data_dir: data_root.to_path_buf(),
|
data_dir: data_root.to_path_buf(),
|
||||||
config_dir: data_root.to_path_buf(),
|
config_dir: data_root.to_path_buf(),
|
||||||
goose_mode,
|
goose_mode,
|
||||||
|
|||||||
Reference in New Issue
Block a user