refactor: Simplify streaming content API to use a single filter option
Co-authored-by: aider (openai/andrew/openrouter/deepseek/deepseek-chat-v3.1) <aider@aider.chat>
This commit is contained in:
@@ -307,15 +307,7 @@ impl AsyncItemService {
|
|||||||
pub async fn get_item_content_info_streaming(
|
pub async fn get_item_content_info_streaming(
|
||||||
&self,
|
&self,
|
||||||
item_id: i64,
|
item_id: i64,
|
||||||
head_bytes: Option<usize>,
|
filter: Option<String>,
|
||||||
head_words: Option<usize>,
|
|
||||||
head_lines: Option<usize>,
|
|
||||||
tail_bytes: Option<usize>,
|
|
||||||
tail_words: Option<usize>,
|
|
||||||
tail_lines: Option<usize>,
|
|
||||||
line_start: Option<usize>,
|
|
||||||
line_end: Option<usize>,
|
|
||||||
grep: Option<String>,
|
|
||||||
) -> Result<(Box<dyn Read + Send>, String, bool), CoreError> {
|
) -> Result<(Box<dyn Read + Send>, String, bool), CoreError> {
|
||||||
let db = self.db.clone();
|
let db = self.db.clone();
|
||||||
let item_service = self.item_service.clone();
|
let item_service = self.item_service.clone();
|
||||||
@@ -325,7 +317,7 @@ impl AsyncItemService {
|
|||||||
item_service.get_item_content_info_streaming(
|
item_service.get_item_content_info_streaming(
|
||||||
&conn,
|
&conn,
|
||||||
item_id,
|
item_id,
|
||||||
None
|
filter
|
||||||
)
|
)
|
||||||
})
|
})
|
||||||
.await
|
.await
|
||||||
|
|||||||
Reference in New Issue
Block a user