Skip to content

Commit

Permalink
feat: simplify CLI sessions
Browse files Browse the repository at this point in the history
  • Loading branch information
baxen committed Feb 10, 2025
1 parent 473225f commit 1ea02aa
Show file tree
Hide file tree
Showing 17 changed files with 1,274 additions and 1,227 deletions.
1 change: 0 additions & 1 deletion crates/goose-cli/src/commands/mod.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
pub mod agent_version;
pub mod configure;
pub mod mcp;
pub mod session;
pub mod version;
183 changes: 0 additions & 183 deletions crates/goose-cli/src/commands/session.rs

This file was deleted.

9 changes: 9 additions & 0 deletions crates/goose-cli/src/lib.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
pub mod commands;
pub mod log_usage;
pub mod logging;
pub mod session;
#[cfg(test)]
pub mod test_helpers;

// Re-export commonly used types
pub use session::Session;
2 changes: 1 addition & 1 deletion crates/goose-cli/src/log_usage.rs
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ mod tests {

#[test]
fn test_session_logging() {
run_with_tmp_dir(|| {
run_with_tmp_dir(|_| {
let home_dir = dirs::home_dir().unwrap();
let log_file = home_dir
.join(".config")
Expand Down
22 changes: 6 additions & 16 deletions crates/goose-cli/src/main.rs
Original file line number Diff line number Diff line change
@@ -1,26 +1,16 @@
use anyhow::Result;
use clap::{CommandFactory, Parser, Subcommand};

mod cli_prompt;
mod commands;
mod log_usage;
mod logging;
mod prompt;
mod session;

use commands::agent_version::AgentCommand;
use commands::configure::handle_configure;
use commands::mcp::run_server;
use commands::session::build_session;
use commands::version::print_version;
use console::style;
use goose::config::Config;
use logging::setup_logging;
use goose_cli::commands::agent_version::AgentCommand;
use goose_cli::commands::configure::handle_configure;
use goose_cli::commands::mcp::run_server;
use goose_cli::commands::version::print_version;
use goose_cli::logging::setup_logging;
use goose_cli::session::build_session;
use std::io::{self, Read};

#[cfg(test)]
mod test_helpers;

#[derive(Parser)]
#[command(author, about, long_about = None)]
struct Cli {
Expand Down
39 changes: 0 additions & 39 deletions crates/goose-cli/src/prompt.rs

This file was deleted.

Loading

0 comments on commit 1ea02aa

Please sign in to comment.