Skip to content
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

Enhance IDE/editor opening fallback mechanism #863

Merged
merged 2 commits into from
Feb 12, 2025
Merged
Show file tree
Hide file tree
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
Original file line number Diff line number Diff line change
Expand Up @@ -3165,11 +3165,15 @@ start().then(() => {{
})?;

// First try to open with cursor
let cursor_open = Command::new("code").arg(temp_dir.clone()).spawn();
let cursor_open = Command::new("cursor").arg(temp_dir.clone()).spawn();
if cursor_open.is_err() {
// If cursor fails, try with open
// Ignore error if any.
let _ = open::that(temp_dir.clone());
// If cursor fails try with the "code" command
let code_open = Command::new("code").arg(temp_dir.clone()).spawn();
if code_open.is_err() {
// If cursor and code fails, try with open
// Ignore error if any.
let _ = open::that(temp_dir.clone());
}
}

// Create parameters.json
Expand Down
1 change: 1 addition & 0 deletions shinkai-libs/shinkai-http-api/src/node_api_router.rs
Original file line number Diff line number Diff line change
Expand Up @@ -125,6 +125,7 @@ pub async fn run_api(
"Authorization",
"x-shinkai-tool-id",
"x-shinkai-app-id",
"x-shinkai-llm-provider",
]);

let v1_routes = warp::path("v1").and(
Expand Down