huskies: merge 950

This commit is contained in:
dave
2026-05-13 08:41:57 +00:00
parent 7491eec257
commit 4a8ed4348b
38 changed files with 354 additions and 4329 deletions
+5
View File
@@ -16,6 +16,7 @@ pub(super) async fn read_file(path: String, state: &SessionState) -> Result<Stri
.map_err(Error::Filesystem)
}
#[allow(dead_code)]
pub(super) async fn write_file(
path: String,
content: String,
@@ -26,6 +27,7 @@ pub(super) async fn write_file(
.map_err(Error::Filesystem)
}
#[allow(dead_code)]
pub(super) async fn list_directory(
path: String,
state: &SessionState,
@@ -41,6 +43,7 @@ pub(super) async fn list_directory_absolute(path: String) -> Result<Vec<FileEntr
.map_err(Error::Filesystem)
}
#[allow(dead_code)]
pub(super) async fn create_directory_absolute(path: String) -> Result<(), Error> {
crate::io::fs::create_directory_absolute(path)
.await
@@ -58,6 +61,7 @@ pub(super) async fn list_project_files(state: &SessionState) -> Result<Vec<Strin
.map_err(Error::Filesystem)
}
#[allow(dead_code)]
pub(super) async fn search_files(
query: String,
state: &SessionState,
@@ -67,6 +71,7 @@ pub(super) async fn search_files(
.map_err(Error::Filesystem)
}
#[allow(dead_code)]
pub(super) async fn exec_shell(
command: String,
args: Vec<String>,
+5
View File
@@ -65,12 +65,14 @@ pub async fn read_file(path: String, state: &SessionState) -> Result<String, Err
}
/// Write a file to the project root, creating parent directories as needed.
#[allow(dead_code)]
pub async fn write_file(path: String, content: String, state: &SessionState) -> Result<(), Error> {
validate_path(&path)?;
io::write_file(path, content, state).await
}
/// List directory entries at a project-relative path.
#[allow(dead_code)]
pub async fn list_directory(path: String, state: &SessionState) -> Result<Vec<FileEntry>, Error> {
io::list_directory(path, state).await
}
@@ -81,6 +83,7 @@ pub async fn list_directory_absolute(path: String) -> Result<Vec<FileEntry>, Err
}
/// Create a directory (and all parents) at an absolute path.
#[allow(dead_code)]
pub async fn create_directory_absolute(path: String) -> Result<(), Error> {
io::create_directory_absolute(path).await
}
@@ -96,11 +99,13 @@ pub async fn list_project_files(state: &SessionState) -> Result<Vec<String>, Err
}
/// Search the project for files whose contents contain `query`.
#[allow(dead_code)]
pub async fn search_files(query: String, state: &SessionState) -> Result<Vec<SearchResult>, Error> {
io::search_files(query, state).await
}
/// Execute an allowlisted shell command in the project root directory.
#[allow(dead_code)]
pub async fn exec_shell(
command: String,
args: Vec<String>,