diff --git a/crates/agent/src/outline.rs b/crates/agent/src/outline.rs index 82592355295..3bb2e6997e8 100644 --- a/crates/agent/src/outline.rs +++ b/crates/agent/src/outline.rs @@ -30,7 +30,7 @@ pub async fn get_buffer_content_or_outline( path: Option<&str>, cx: &AsyncApp, ) -> Result { - let file_size = buffer.read_with(cx, |buffer, _| buffer.text().len()); + let file_size = buffer.read_with(cx, |buffer, _| buffer.len()); if file_size > AUTO_OUTLINE_SIZE { // For large files, use outline instead of full content