Skip to content

Commit 003aaa1

Browse files
authored
ACP get working dir from args.cwd (#6653)
1 parent 6375aac commit 003aaa1

2 files changed

Lines changed: 1 addition & 4 deletions

File tree

crates/goose-acp/src/server.rs

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,6 @@ pub struct GooseAcpAgent {
4949
pub struct GooseAcpConfig {
5050
pub provider: Arc<dyn goose::providers::base::Provider>,
5151
pub builtins: Vec<String>,
52-
pub work_dir: std::path::PathBuf,
5352
pub data_dir: std::path::PathBuf,
5453
pub config_dir: std::path::PathBuf,
5554
pub goose_mode: goose::config::GooseMode,
@@ -308,7 +307,6 @@ impl GooseAcpAgent {
308307
Self::with_config(GooseAcpConfig {
309308
provider,
310309
builtins,
311-
work_dir: std::env::current_dir().unwrap_or_default(),
312310
data_dir: Paths::data_dir(),
313311
config_dir: Paths::config_dir(),
314312
goose_mode,
@@ -689,7 +687,7 @@ impl GooseAcpAgent {
689687
let manager = self.agent.config.session_manager.clone();
690688
let goose_session = manager
691689
.create_session(
692-
std::env::current_dir().unwrap_or_default(),
690+
args.cwd.clone(),
693691
"ACP Session".to_string(), // just an initial name - may be replaced by maybe_update_name
694692
SessionType::User,
695693
)

crates/goose-acp/tests/server_test.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -260,7 +260,6 @@ async fn spawn_server_in_process(
260260
let config = GooseAcpConfig {
261261
provider: Arc::new(provider),
262262
builtins: builtins.iter().map(|s| s.to_string()).collect(),
263-
work_dir: data_root.to_path_buf(),
264263
data_dir: data_root.to_path_buf(),
265264
config_dir: data_root.to_path_buf(),
266265
goose_mode,

0 commit comments

Comments
 (0)