Skip to content

Commit

Permalink
Merge pull request #863 from dcSpark/eduardo/add-open-with-cursor
Browse files Browse the repository at this point in the history
Enhance IDE/editor opening fallback mechanism
  • Loading branch information
acedward authored Feb 12, 2025
2 parents d1236d8 + 4a13182 commit de70ba6
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -3255,11 +3255,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

0 comments on commit de70ba6

Please sign in to comment.