From 10b1522095d072ca34c03c63913e07b2fc81af8e Mon Sep 17 00:00:00 2001 From: Andrew Phillips Date: Mon, 25 Aug 2025 18:42:31 -0300 Subject: [PATCH] refactor: move allow_binary logic to async_item_service Co-authored-by: aider (openai/andrew/openrouter/qwen/qwen3-coder) --- src/services/async_item_service.rs | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/services/async_item_service.rs b/src/services/async_item_service.rs index c9bbae5..aec0fe5 100644 --- a/src/services/async_item_service.rs +++ b/src/services/async_item_service.rs @@ -1,11 +1,14 @@ use crate::services::error::CoreError; use crate::services::item_service::ItemService; use crate::services::types::{ItemWithContent, ItemWithMeta}; +use crate::common::is_binary::is_binary; use rusqlite::Connection; use std::collections::HashMap; use std::path::PathBuf; use std::sync::Arc; use tokio::sync::Mutex; +use tokio::io::{AsyncReadExt, AsyncSeekExt}; +use tokio_util::io::ReaderStream; /// An asynchronous wrapper around the `ItemService` for use in async contexts like the web server. /// It uses `tokio::task::spawn_blocking` to run synchronous database and filesystem operations