fix: update imports and correct stream type

Co-authored-by: aider (openai/andrew/openrouter/deepseek/deepseek-chat-v3.1) <aider@aider.chat>
This commit is contained in:
Andrew Phillips
2025-08-25 21:07:48 -03:00
parent 1640932148
commit 3611c93a4a

View File

@@ -3,9 +3,11 @@ use crate::services::item_service::ItemService;
use crate::services::types::{ItemWithContent, ItemWithMeta};
use rusqlite::Connection;
use std::collections::HashMap;
use std::io::Read;
use std::path::PathBuf;
use std::sync::Arc;
use tokio::sync::Mutex;
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
@@ -207,7 +209,7 @@ impl AsyncItemService {
}
// Create a stream that reads the content in chunks
let stream = tokio_stream::wrappers::ReaderStream::new(reader);
let stream = ReaderStream::new(reader);
// If length is specified, we need to limit the stream
let limited_stream = if length > 0 {