mirror of
https://github.com/harivansh-afk/sandbox-agent.git
synced 2026-04-15 08:03:46 +00:00
feat: add default root route with server info
This commit is contained in:
parent
2f9e677a19
commit
55655cb28a
1 changed files with 9 additions and 1 deletions
|
|
@ -124,7 +124,9 @@ pub fn build_router_with_state(shared: Arc<AppState>) -> (Router, Arc<AppState>)
|
|||
));
|
||||
}
|
||||
|
||||
let mut router = Router::new().nest("/v1", v1_router);
|
||||
let mut router = Router::new()
|
||||
.route("/", get(get_root))
|
||||
.nest("/v1", v1_router);
|
||||
|
||||
if ui::is_enabled() {
|
||||
router = router.merge(ui::router());
|
||||
|
|
@ -3539,6 +3541,12 @@ async fn get_agent_modes(
|
|||
Ok(Json(AgentModesResponse { modes }))
|
||||
}
|
||||
|
||||
async fn get_root() -> &'static str {
|
||||
"This is a Sandbox Agent server for orchestrating coding agents.\n\
|
||||
See https://sandboxagent.dev for more information.\n\
|
||||
Visit /ui/ for the inspector UI."
|
||||
}
|
||||
|
||||
#[utoipa::path(
|
||||
get,
|
||||
path = "/v1/health",
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue