Skip to content

Request (Run ID: codestoryai_sidecar_issue_2117_4d6fbaf8) #2118

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
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
59 changes: 59 additions & 0 deletions sidecar/src/bin/sidecar.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1,59 @@
use clap::Command;
use tracing::info;

#[tokio::main]
async fn main() -> Result<(), Box<dyn std::error::Error>> {
// Initialize logging
tracing_subscriber::fmt::init();

info!("CodeStory Sidecar 🚀");

let matches = Command::new("sidecar")
.about("CodeStory Sidecar - AI-powered code assistant")
.version(env!("CARGO_PKG_VERSION"))
.subcommand(
Command::new("tools")
.about("Tools management")
.subcommand(
Command::new("list")
.about("List available tools")
)
)
.get_matches();

match matches.subcommand() {
Some(("tools", tools_matches)) => {
match tools_matches.subcommand() {
Some(("list", _)) => {
// List all available tools
println!("Available tools:");
for tool in get_available_tools() {
println!("- {}", tool);
}
}
_ => {
println!("Unknown tools subcommand. Try 'sidecar tools list'");
}
}
}
_ => {
println!("Unknown command. Try 'sidecar tools list'");
}
}

Ok(())
}

fn get_available_tools() -> Vec<String> {
// Return a list of available tools
// This is a placeholder implementation
vec![
"ListFiles".to_string(),
"ReadFile".to_string(),
"WriteFile".to_string(),
"ExecuteCommand".to_string(),
"SearchFiles".to_string(),
"CodeEdit".to_string(),
"RepoMap".to_string(),
]
}