feat: introduce sandbox-aware filesystem abstraction

This commit is contained in:
Michael Bolin
2026-03-17 15:01:21 -07:00
parent 904dbd414f
commit 5e89edef4f
15 changed files with 753 additions and 20 deletions
+8 -1
View File
@@ -62,9 +62,16 @@ pub fn load_for_prompt(
mode: PromptImageMode,
) -> Result<EncodedImage, ImageProcessingError> {
let path_buf = path.to_path_buf();
let file_bytes = read_file_bytes(path, &path_buf)?;
load_for_prompt_from_bytes(path, file_bytes, mode)
}
pub fn load_for_prompt_from_bytes(
path: &Path,
file_bytes: Vec<u8>,
mode: PromptImageMode,
) -> Result<EncodedImage, ImageProcessingError> {
let path_buf = path.to_path_buf();
let key = ImageCacheKey {
digest: sha1_digest(&file_bytes),
mode,