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:
Andrew Phillips
2025-09-02 18:31:42 -03:00
parent c55527ea6a
commit 3ed54ce6b3
3 changed files with 5 additions and 4 deletions

View File

@@ -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,

View File

@@ -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;
}

View File

@@ -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