feat: add debug logs for text metadata processing
Co-authored-by: aider (openai/andrew/openrouter/deepseek/deepseek-chat-v3.1) <aider@aider.chat>
This commit is contained in:
@@ -141,13 +141,20 @@ impl TextMetaPlugin {
|
|||||||
self.count_text_stats(&[]);
|
self.count_text_stats(&[]);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Debug: check if outputs are configured
|
||||||
|
log::debug!("TEXT: Outputs: {:?}", self.base.outputs());
|
||||||
|
log::debug!("TEXT: Word count: {}, Line count: {}", self.word_count, self.line_count);
|
||||||
|
|
||||||
// Output word and line counts
|
// Output word and line counts
|
||||||
if let Some(meta_data) = crate::meta_plugin::process_metadata_outputs(
|
if let Some(meta_data) = crate::meta_plugin::process_metadata_outputs(
|
||||||
"text_word_count",
|
"text_word_count",
|
||||||
self.word_count.to_string(),
|
self.word_count.to_string(),
|
||||||
self.base.outputs()
|
self.base.outputs()
|
||||||
) {
|
) {
|
||||||
|
log::debug!("TEXT: Adding word count metadata: {:?}", meta_data);
|
||||||
metadata.push(meta_data);
|
metadata.push(meta_data);
|
||||||
|
} else {
|
||||||
|
log::debug!("TEXT: Word count output is disabled or not mapped");
|
||||||
}
|
}
|
||||||
|
|
||||||
if let Some(meta_data) = crate::meta_plugin::process_metadata_outputs(
|
if let Some(meta_data) = crate::meta_plugin::process_metadata_outputs(
|
||||||
@@ -155,7 +162,10 @@ impl TextMetaPlugin {
|
|||||||
self.line_count.to_string(),
|
self.line_count.to_string(),
|
||||||
self.base.outputs()
|
self.base.outputs()
|
||||||
) {
|
) {
|
||||||
|
log::debug!("TEXT: Adding line count metadata: {:?}", meta_data);
|
||||||
metadata.push(meta_data);
|
metadata.push(meta_data);
|
||||||
|
} else {
|
||||||
|
log::debug!("TEXT: Line count output is disabled or not mapped");
|
||||||
}
|
}
|
||||||
|
|
||||||
metadata
|
metadata
|
||||||
@@ -291,8 +301,11 @@ impl MetaPlugin for TextMetaPlugin {
|
|||||||
|
|
||||||
// If content is text, output word and line counts
|
// If content is text, output word and line counts
|
||||||
if self.is_binary_content == Some(false) {
|
if self.is_binary_content == Some(false) {
|
||||||
|
log::debug!("TEXT: Content is text, outputting word and line counts");
|
||||||
let word_line_metadata = self.output_word_line_counts();
|
let word_line_metadata = self.output_word_line_counts();
|
||||||
metadata.extend(word_line_metadata);
|
metadata.extend(word_line_metadata);
|
||||||
|
} else {
|
||||||
|
log::debug!("TEXT: Content is not text, not outputting word and line counts");
|
||||||
}
|
}
|
||||||
|
|
||||||
// Drop the buffer since we're done with it
|
// Drop the buffer since we're done with it
|
||||||
|
|||||||
Reference in New Issue
Block a user