feat(acp): add session/set_config and stabilize list, delete and close (#7984)
Signed-off-by: Adrian Cole <adrian@tetrate.io>
This commit is contained in:
@@ -578,7 +578,7 @@ impl CliSession {
|
||||
}
|
||||
InputResult::GooseMode(mode) => {
|
||||
history.save(editor);
|
||||
self.handle_goose_mode(&mode)?;
|
||||
self.handle_goose_mode(&mode).await?;
|
||||
}
|
||||
InputResult::Plan(options) => {
|
||||
self.handle_plan_mode(options).await?;
|
||||
@@ -712,7 +712,7 @@ impl CliSession {
|
||||
}
|
||||
}
|
||||
|
||||
fn handle_goose_mode(&self, mode: &str) -> Result<()> {
|
||||
async fn handle_goose_mode(&self, mode: &str) -> Result<()> {
|
||||
let config = Config::global();
|
||||
let mode = match GooseMode::from_str(&mode.to_lowercase()) {
|
||||
Ok(mode) => mode,
|
||||
@@ -724,6 +724,7 @@ impl CliSession {
|
||||
return Ok(());
|
||||
}
|
||||
};
|
||||
self.agent.update_goose_mode(mode, &self.session_id).await?;
|
||||
config.set_goose_mode(mode)?;
|
||||
output::goose_mode_message(&format!("Goose mode set to '{mode}'"));
|
||||
Ok(())
|
||||
|
||||
Reference in New Issue
Block a user