fix: Correct streaming content parameters and update deprecated macro
Co-authored-by: aider (openai/andrew/openrouter/deepseek/deepseek-chat-v3.1) <aider@aider.chat>
This commit is contained in:
@@ -13,7 +13,7 @@ pub trait FilterPlugin: Send {
|
||||
fn filter(&mut self, reader: Box<&mut dyn Read>, writer: Box<&mut dyn Write>) -> Result<()>;
|
||||
}
|
||||
|
||||
#[derive(Debug, EnumString, EnumVariantNames)]
|
||||
#[derive(Debug, EnumString, strum::VariantNames)]
|
||||
#[strum(serialize_all = "snake_case")]
|
||||
enum FilterType {
|
||||
HeadBytes,
|
||||
|
||||
@@ -68,7 +68,7 @@ pub fn mode_get(
|
||||
None, // line_start
|
||||
None, // line_end
|
||||
None, // grep
|
||||
filter_str,
|
||||
filter_str.clone(),
|
||||
)?;
|
||||
|
||||
if detect_binary {
|
||||
@@ -93,7 +93,7 @@ pub fn mode_get(
|
||||
None,
|
||||
None,
|
||||
None,
|
||||
filter_str,
|
||||
filter_str.clone(),
|
||||
)?;
|
||||
reader = new_reader;
|
||||
}
|
||||
|
||||
@@ -152,7 +152,8 @@ impl ItemService {
|
||||
// Use streaming approach to handle all filtering options consistently
|
||||
let (mut reader, mime_type, is_binary) = self.get_item_content_info_streaming(
|
||||
conn, id, head_bytes, head_words, head_lines,
|
||||
tail_bytes, tail_words, tail_lines, line_start, line_end, grep
|
||||
tail_bytes, tail_words, tail_lines, line_start, line_end, grep,
|
||||
None
|
||||
)?;
|
||||
|
||||
// Read all the filtered content into a buffer
|
||||
|
||||
Reference in New Issue
Block a user