Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion crates/goose-cli/src/commands/info.rs
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ fn print_aligned(label: &str, value: &str, width: usize) {
pub fn handle_info(verbose: bool) -> Result<()> {
let logs_dir = Paths::in_state_dir("logs");
let sessions_dir = Paths::in_data_dir("sessions");
let sessions_db = sessions_dir.join("sessions.db");
Comment on lines 13 to +14
Copy link

Copilot AI Nov 3, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The variable sessions_dir is now only used to construct sessions_db on the next line. Consider removing this intermediate variable and directly constructing the database path with Paths::in_data_dir(\"sessions\").join(\"sessions.db\") to reduce unnecessary variable declarations.

Suggested change
let sessions_dir = Paths::in_data_dir("sessions");
let sessions_db = sessions_dir.join("sessions.db");
let sessions_db = Paths::in_data_dir("sessions").join("sessions.db");

Copilot uses AI. Check for mistakes.

// Get paths using a stored reference to the global config
let config = Config::global();
Expand All @@ -19,7 +20,7 @@ pub fn handle_info(verbose: bool) -> Result<()> {
// Define the labels and their corresponding path values once.
let paths = [
("Config dir:", config_dir),
("Sessions dir:", sessions_dir.display().to_string()),
("Sessions DB (sqlite):", sessions_db.display().to_string()),
("Logs dir:", logs_dir.display().to_string()),
];

Expand Down