Text-completion picker to select a project

This commit is contained in:
Dave
2026-02-16 19:44:29 +00:00
parent ffab287d16
commit 45bce740b6
7 changed files with 439 additions and 28 deletions

View File

@@ -67,6 +67,25 @@ impl IoApi {
Ok(Json(entries))
}
/// List files and folders at an absolute path (not scoped to the project root).
#[oai(path = "/io/fs/list/absolute", method = "post")]
async fn list_directory_absolute(
&self,
payload: Json<FilePathPayload>,
) -> OpenApiResult<Json<Vec<io_fs::FileEntry>>> {
let entries = io_fs::list_directory_absolute(payload.0.path)
.await
.map_err(bad_request)?;
Ok(Json(entries))
}
/// Get the user's home directory.
#[oai(path = "/io/fs/home", method = "get")]
async fn get_home_directory(&self) -> OpenApiResult<Json<String>> {
let home = io_fs::get_home_directory().map_err(bad_request)?;
Ok(Json(home))
}
/// Search the currently open project for files containing the provided query string.
#[oai(path = "/io/search", method = "post")]
async fn search_files(